/* ═══════════════════════════════════════════════════════════════
   VINDEX LAW LIBRARY — Adaptive Theme System
   Light / Sepia / Dark — Matching vindexprivatus.com brand
   "Information should be free."
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  /* ── Sepia Mode (Default — warm, inviting study environment) ── */
  --void: #FBF0D9;
  --abyss: #F0E4CC;
  --obsidian: #E8D5B5;
  --surface: #F8F1E3;
  --surface-light: #F5EDDA;
  --surface-hover: #F0E4CC;

  /* Olive Green — warm, natural accent */
  --teal-deep: #4A3728;
  --teal: #5A7A3A;
  --teal-mid: #6B8B4A;
  --teal-bright: #5A7A3A;
  --teal-glow: rgba(90, 122, 58, 0.15);
  --teal-glow-strong: rgba(90, 122, 58, 0.25);
  --teal-glow-hex: #6B8B4A;

  /* Amber / Gold */
  --gold: #C9A84C;
  --gold-light: #8B6914;

  /* Neutrals — warm browns */
  --ivory: #4A3728;
  --bone: #5F4B32;
  --silver: #7A6B5A;
  --slate: #9E8E7E;
  --dim: #D4C4AD;

  /* Semantic */
  --text: #5F4B32;
  --text-muted: #9E8E7E;
  --text-dim: #B8A895;
  --border: #E8D5B5;
  --border-light: #F0E4CC;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(74, 55, 40, 0.06);
  --shadow: 0 2px 8px rgba(74, 55, 40, 0.08);
  --shadow-md: 0 4px 16px rgba(74, 55, 40, 0.1);
  --shadow-lg: 0 8px 24px rgba(74, 55, 40, 0.1);
  --shadow-glow: 0 0 20px rgba(90, 122, 58, 0.1);
  --radius: 6px;
  --radius-lg: 10px;

  /* Topbar */
  --topbar-bg: rgba(251, 240, 217, 0.92);
  --topbar-border: rgba(90, 122, 58, 0.15);

  /* Search box inner */
  --search-inner-bg: linear-gradient(145deg, rgba(248, 241, 227, 0.98), rgba(245, 237, 218, 0.99));
  --search-inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 24px rgba(74, 55, 40, 0.08);

  /* Autocomplete dropdown */
  --suggest-bg: rgba(248, 241, 227, 0.96);
  --suggest-shadow: 0 12px 40px rgba(74, 55, 40, 0.15), 0 0 20px rgba(90, 122, 58, 0.04);

  /* Hero gradient visibility */
  --hero-blob-teal: rgba(90, 122, 58, 0.06);
  --hero-blob-gold: rgba(201, 168, 76, 0.08);
  --hero-spotlight: rgba(90, 122, 58, 0.04);

  /* Search border conic gradient */
  --search-border-base-opacity: 0.6;
  --body-line-color: rgba(90, 122, 58, 0.06);

  --search-conic-1: rgba(74, 55, 40, 0.12);
  --search-conic-2: #5A7A3A;
  --search-conic-3: #6B8B4A;
  --search-conic-4: #7A9B5A;
  --search-conic-5: rgba(74, 55, 40, 0.05);
  --search-conic-6: rgba(201, 168, 76, 0.15);

  --skeleton-shimmer: rgba(74, 55, 40, 0.04);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ── Light Mode (Clean white) ── */
[data-theme="light"] {
  --void: #FAF9F6;
  --abyss: #F0EDE8;
  --obsidian: #E8E6E1;
  --surface: #FFFFFF;
  --surface-light: #F7F6F3;
  --surface-hover: #F0EDE8;
  --teal-deep: #0A1628;
  --teal: #0d5c6b;
  --teal-mid: #1a7a8a;
  --teal-bright: #0d5c6b;
  --teal-glow: rgba(13, 92, 107, 0.12);
  --teal-glow-strong: rgba(13, 92, 107, 0.2);
  --teal-glow-hex: #1a7a8a;
  --gold: #C9A84C;
  --gold-light: #B8972F;
  --ivory: #0A1628;
  --bone: #2D2D2D;
  --silver: #555555;
  --slate: #888888;
  --dim: #CCCCCC;
  --text: #2D2D2D;
  --text-muted: #888888;
  --text-dim: #AAAAAA;
  --border: #E5E5E0;
  --border-light: #EEECE8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(13, 92, 107, 0.1);
  --topbar-bg: rgba(250, 249, 246, 0.92);
  --topbar-border: rgba(13, 92, 107, 0.15);
  --search-inner-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 246, 243, 0.99));
  --search-inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 24px rgba(0, 0, 0, 0.08);
  --suggest-bg: rgba(255, 255, 255, 0.96);
  --suggest-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 20px rgba(13, 92, 107, 0.04);
  --hero-blob-teal: rgba(13, 92, 107, 0.08);
  --hero-blob-gold: rgba(201, 168, 76, 0.06);
  --hero-spotlight: rgba(13, 92, 107, 0.04);
  --body-line-color: rgba(13, 92, 107, 0.06);
  --search-conic-1: rgba(10, 22, 40, 0.15);
  --search-conic-2: #0d5c6b;
  --search-conic-3: #1a7a8a;
  --search-conic-4: #2d9aad;
  --search-conic-5: rgba(10, 22, 40, 0.06);
  --search-conic-6: rgba(201, 168, 76, 0.12);
  --skeleton-shimmer: rgba(0, 0, 0, 0.03);
}

/* ── Sepia Mode ── */
[data-theme="sepia"] {
  --void: #FBF0D9;
  --abyss: #F0E4CC;
  --obsidian: #E8D5B5;
  --surface: #F8F1E3;
  --surface-light: #F5EDDA;
  --surface-hover: #F0E4CC;

  --teal-deep: #4A3728;
  --teal: #5A7A3A;
  --teal-mid: #6B8B4A;
  --teal-bright: #5A7A3A;
  --teal-glow: rgba(90, 122, 58, 0.15);
  --teal-glow-strong: rgba(90, 122, 58, 0.25);
  --teal-glow-hex: #6B8B4A;

  --gold: #C9A84C;
  --gold-light: #8B6914;

  --ivory: #4A3728;
  --bone: #5F4B32;
  --silver: #7A6B5A;
  --slate: #9E8E7E;
  --dim: #D4C4AD;

  --text: #5F4B32;
  --text-muted: #9E8E7E;
  --text-dim: #B8A895;
  --border: #E8D5B5;
  --border-light: #F0E4CC;

  --shadow-sm: 0 1px 3px rgba(74, 55, 40, 0.06);
  --shadow: 0 2px 8px rgba(74, 55, 40, 0.08);
  --shadow-md: 0 4px 16px rgba(74, 55, 40, 0.1);
  --shadow-lg: 0 8px 24px rgba(74, 55, 40, 0.1);
  --shadow-glow: 0 0 20px rgba(90, 122, 58, 0.1);

  --topbar-bg: rgba(251, 240, 217, 0.92);
  --topbar-border: rgba(90, 122, 58, 0.15);

  --search-inner-bg: linear-gradient(145deg, rgba(248, 241, 227, 0.98), rgba(245, 237, 218, 0.99));
  --search-inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 24px rgba(74, 55, 40, 0.08);

  --suggest-bg: rgba(248, 241, 227, 0.96);
  --suggest-shadow: 0 12px 40px rgba(74, 55, 40, 0.15), 0 0 20px rgba(90, 122, 58, 0.04);

  --hero-blob-teal: rgba(90, 122, 58, 0.06);
  --hero-blob-gold: rgba(201, 168, 76, 0.08);
  --hero-spotlight: rgba(90, 122, 58, 0.04);

  --search-conic-1: rgba(74, 55, 40, 0.12);
  --search-conic-2: #5A7A3A;
  --search-conic-3: #6B8B4A;
  --search-conic-4: #7A9B5A;
  --search-conic-5: rgba(74, 55, 40, 0.05);
  --search-conic-6: rgba(201, 168, 76, 0.15);

  --skeleton-shimmer: rgba(74, 55, 40, 0.04);

  --body-line-color: rgba(90, 122, 58, 0.06);
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --void: #1A1A2E;
  --abyss: #16162A;
  --obsidian: #1E1E32;
  --surface: #222240;
  --surface-light: #282848;
  --surface-hover: #2A2A44;

  --teal-deep: #003B46;
  --teal: #0d5c6b;
  --teal-mid: #1a7a8a;
  --teal-bright: #2d9aad;
  --teal-glow: rgba(13, 92, 107, 0.25);
  --teal-glow-strong: rgba(13, 92, 107, 0.4);
  --teal-glow-hex: #3ab8cc;

  --gold: #D4B86A;
  --gold-light: #d4a960;

  --ivory: #E0E0E0;
  --bone: #C8C8D0;
  --silver: #A0A0B0;
  --slate: #707080;
  --dim: #3A3A50;

  --text: #E0E0E0;
  --text-muted: #707080;
  --text-dim: #505060;
  --border: #2E2E48;
  --border-light: rgba(138, 139, 149, 0.08);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(13, 92, 107, 0.25);

  --topbar-bg: rgba(26, 26, 46, 0.88);
  --topbar-border: rgba(13, 92, 107, 0.2);

  --search-inner-bg: linear-gradient(145deg, rgba(30, 30, 50, 0.95), rgba(34, 34, 64, 0.98));
  --search-inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 24px rgba(0, 0, 0, 0.3);

  --suggest-bg: rgba(26, 26, 46, 0.92);
  --suggest-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(13, 92, 107, 0.06);

  --hero-blob-teal: rgba(13, 92, 107, 0.12);
  --hero-blob-gold: rgba(176, 141, 87, 0.07);
  --hero-spotlight: rgba(13, 92, 107, 0.07);

  --search-conic-1: rgba(13, 92, 107, 0.3);
  --search-conic-2: #0d5c6b;
  --search-conic-3: #2d9aad;
  --search-conic-4: #3ab8cc;
  --search-conic-5: rgba(13, 92, 107, 0.1);
  --search-conic-6: rgba(176, 141, 87, 0.15);

  --skeleton-shimmer: rgba(255, 255, 255, 0.03);

  --body-line-color: rgba(13, 92, 107, 0.08);
}

body {
  font-family: 'Libre Franklin', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--void);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height — tracks Safari toolbar */
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

::selection {
  background: var(--teal);
  color: white;
}

/* ═══ CUSTOM SCROLLBAR ═══ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--abyss);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--teal-deep), var(--teal));
  border-radius: 4px;
  border: 2px solid var(--abyss);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--teal), var(--teal-bright));
}
::-webkit-scrollbar-corner {
  background: var(--abyss);
}
/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--teal-deep) var(--abyss);
}

/* ═══ FOCUS INDICATORS (Accessibility + Beauty) ═══ */
:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
  border-radius: var(--radius);
}
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}

/* ═══ SCROLL PROGRESS BAR ═══ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-bright), var(--teal-glow-hex));
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--teal-glow-strong), 0 0 20px var(--teal-glow);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ═══ V MARK (Logo) ═══ */
.v-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1.5px solid var(--teal);
  border-radius: 2px;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.v-mark span {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px var(--teal-glow));
}
.v-mark-sm {
  width: 30px;
  height: 30px;
}
.v-mark-sm span {
  font-size: 17px;
}

/* ═══ INTRO SPLASH ═══ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--void);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashFade 0.5s ease 2.8s forwards;
  pointer-events: all;
  transition: background-color 0.3s ease;
}
.splash-inner {
  text-align: center;
}
.splash-logo {
  margin-bottom: 28px;
  opacity: 0;
  animation: splashLogoIn 0.6s var(--ease-out) 0.3s forwards;
}
.splash-logo .v-mark {
  width: 72px;
  height: 72px;
  border-width: 2px;
  box-shadow: 0 0 60px var(--teal-glow), 0 0 120px var(--teal-glow);
  background: linear-gradient(145deg, var(--void), var(--surface-light), var(--void));
}
.splash-logo .v-mark span {
  font-size: 42px;
}
.splash-text {
  overflow: hidden;
}
.splash-line {
  font-family: 'Cormorant Garamond', Georgia, serif;
  opacity: 0;
  transform: translateY(20px);
}
.splash-line-1 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--ivory);
  letter-spacing: 0.02em;
  animation: splashTextIn 0.6s var(--ease-out) 0.8s forwards;
}
.splash-line-2 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--teal);
  font-style: italic;
  letter-spacing: 0.04em;
  animation: splashTextIn 0.6s var(--ease-out) 1.3s forwards;
}

@keyframes splashLogoIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes splashTextIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes splashFade {
  to { opacity: 0; pointer-events: none; }
}

/* ═══ TOP BAR ═══ */
.topbar {
  background: var(--topbar-bg);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--topbar-border);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ivory);
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--bone);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.topnav { display: flex; gap: 18px; align-items: center; flex-wrap: nowrap; }
.topnav a {
  color: var(--silver);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.2s;
  position: relative;
}
.topnav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright), var(--teal-glow-hex));
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--teal-glow);
}
.topnav a:hover { color: var(--teal-bright); }
.topnav a:hover::after { width: 100%; left: 0; }

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--silver);
  transition: all 0.3s;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 0 16px;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 10px 0;
  color: var(--silver);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.mobile-menu a:hover { color: var(--teal-bright); }

/* ═══ HERO ═══ */
.hero {
  position: relative;
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
  background: var(--void);
}
/* Floating mesh gradient blobs — Stripe-inspired ambient background */
.hero-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--teal-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}
.hero::before {
  content: '';
  position: absolute;
  top: -15%;
  left: -8%;
  width: 55%;
  height: 55%;
  background: radial-gradient(ellipse at center, var(--hero-blob-teal) 0%, transparent 70%);
  pointer-events: none;
  animation: floatBlob1 14s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -15%;
  right: -8%;
  width: 45%;
  height: 45%;
  background: radial-gradient(ellipse at center, var(--hero-blob-gold) 0%, transparent 70%);
  pointer-events: none;
  animation: floatBlob2 18s ease-in-out infinite;
}
@keyframes floatBlob1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-25px, 20px) scale(0.95); }
}
@keyframes floatBlob2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-35px, 25px) scale(1.05); }
  66% { transform: translate(30px, -20px) scale(0.92); }
}
/* Cursor spotlight — follows mouse */
.hero-spotlight {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--hero-spotlight) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: left 0.2s ease, top 0.2s ease;
  opacity: 0;
}
.hero:hover .hero-spotlight { opacity: 1; }
.hero-inner {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--teal-bright);
  letter-spacing: 0.02em;
  line-height: 1.7;
  margin-bottom: 40px;
  opacity: 0.8;
  max-width: 700px;
  position: relative;
  padding: 0 24px;
}
.hero-quote::before,
.hero-quote::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  left: 50%;
  transform: translateX(-50%);
}
.hero-quote::before { top: -16px; }
.hero-quote::after { bottom: -16px; }
.hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 7rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: uppercase;
  text-align: center;
  padding-left: 0.06em; /* compensate for trailing letter-spacing visual shift */
}
.hero-title-word {
  color: var(--ivory);
  font-weight: 300;
}
.hero-title-word.accent {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright), var(--teal-glow-hex), var(--teal-bright), var(--teal));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px var(--teal-glow));
  font-weight: 400;
  animation: gradientTextShift 6s ease-in-out infinite;
}
@keyframes gradientTextShift {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}
.hero-subtitle {
  color: var(--silver);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.92rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 20px;
}
.hero-sub {
  color: var(--silver);
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 36px;
  line-height: 1.6;
}
.stat-glow {
  background: linear-gradient(90deg, var(--teal-bright), var(--teal-glow-hex), var(--teal-bright));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  filter: drop-shadow(0 0 12px var(--teal-glow));
  animation: statShimmer 3s ease-in-out infinite;
}
@keyframes statShimmer {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}
/* Live database indicator */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-bright);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-bright);
  position: relative;
  flex-shrink: 0;
}
.live-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--teal-bright);
  opacity: 0.4;
  animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(2); opacity: 0; }
}

/* Search Box — Premium Glassmorphism with Always-Visible Animated Border */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 20px;
  overflow: visible;
  width: 100%;
  max-width: 780px;
  margin: 0 auto 28px;
  transition: all 0.4s var(--ease-out);
  padding: 2.5px; /* acts as border thickness for the gradient */
}
/* Always-visible animated gradient border */
.search-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: conic-gradient(
    from var(--search-border-angle, 0deg),
    var(--search-conic-1) 0%,
    var(--search-conic-2) 8%,
    var(--search-conic-3) 16%,
    var(--search-conic-4) 24%,
    var(--search-conic-5) 32%,
    var(--search-conic-6) 50%,
    var(--search-conic-1) 68%,
    var(--search-conic-2) 76%,
    var(--search-conic-3) 84%,
    var(--search-conic-1) 100%
  );
  z-index: 0;
  opacity: var(--search-border-base-opacity, 0.6);
  transition: opacity 0.5s var(--ease-out);
  animation: searchBorderSpin 6s linear infinite;
}
.search-box:focus-within::before {
  opacity: 1;
}
/* Outer glow — always slightly visible, brighter on focus */
.search-box::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 24px;
  background: conic-gradient(
    from var(--search-border-angle, 0deg),
    transparent 0%,
    var(--teal-glow) 10%,
    var(--teal-glow-strong) 20%,
    transparent 35%,
    transparent 65%,
    var(--teal-glow) 80%,
    transparent 100%
  );
  filter: blur(12px);
  z-index: -1;
  opacity: 0.4;
  transition: opacity 0.5s;
  animation: searchBorderSpin 6s linear infinite;
}
.search-box:focus-within::after {
  opacity: 1;
}
/* Inner fill — the actual input background */
.search-box-inner {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--search-inner-bg);
  border-radius: 18px;
  position: relative;
  z-index: 1;
  box-shadow: var(--search-inner-shadow);
  transition: box-shadow 0.4s var(--ease-out), background 0.3s ease;
}
@keyframes searchBorderSpin {
  to { --search-border-angle: 360deg; }
}
@property --search-border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.search-box:focus-within .search-box-inner {
  box-shadow:
    inset 0 1px 0 rgba(45, 154, 173, 0.08),
    0 8px 40px rgba(0, 0, 0, 0.1),
    0 0 60px var(--teal-glow);
}
.search-box:hover:not(:focus-within) .search-box-inner {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 32px rgba(0, 0, 0, 0.08);
}
.search-icon {
  display: flex;
  align-items: center;
  padding: 0 0 0 20px;
  color: var(--teal-bright);
  opacity: 0.5;
  transition: all 0.4s var(--ease-out);
}
.search-box:focus-within .search-icon {
  opacity: 1;
  color: var(--teal-glow-hex);
  filter: drop-shadow(0 0 6px var(--teal-glow));
}
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 20px 22px;
  font-size: 1.08rem;
  font-family: inherit;
  outline: none;
  color: var(--text);
  position: relative;
  z-index: 1;
  letter-spacing: 0.01em;
}
.search-box input::placeholder {
  color: var(--slate);
  transition: color 0.3s;
}
.search-box:focus-within input::placeholder {
  color: var(--silver);
}
.search-box button {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  color: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 0 16px 16px 0;
  padding: 22px 36px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
/* Shimmer sweep on button */
.search-box button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.5s;
}
.search-box button:hover::after {
  left: 100%;
}
.search-box button:hover {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  box-shadow: var(--shadow-glow);
  letter-spacing: 0.08em;
}
/* Keyboard shortcut badge */
.search-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--slate);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  margin-right: 12px;
  flex-shrink: 0;
  transition: opacity 0.3s;
  z-index: 1;
}
.search-box:focus-within .search-shortcut {
  opacity: 0;
  pointer-events: none;
}

/* Recent Searches Panel (inline, pushes content down) */
.recent-searches-panel {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  background: linear-gradient(145deg, var(--surface), var(--teal-glow));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  animation: recentSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes recentSlideIn {
  from {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    max-height: 400px;
    margin-top: 20px;
    margin-bottom: 0;
    transform: translateY(0);
  }
}
.recent-searches-panel .recent-label {
  padding: 12px 20px 6px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 6px;
}
.recent-searches-panel .recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 20px;
  background: none;
  border: none;
  color: var(--silver);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.recent-searches-panel .recent-item:hover {
  background: var(--teal-glow);
  color: var(--ivory);
}
.recent-searches-panel .recent-item svg {
  opacity: 0.3;
  flex-shrink: 0;
}
.recent-searches-panel .recent-item:hover svg {
  opacity: 0.6;
}

/* Search Suggestions Dropdown (kept for compat) */
.search-suggestions-label {
  padding: 8px 16px 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  font-weight: 600;
}
.search-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--bone);
  font-size: 0.88rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.search-suggestion:hover {
  background: var(--teal-glow);
  color: var(--ivory);
}

/* Search Examples */
.search-examples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.search-examples-label {
  color: var(--slate);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.search-examples button {
  background: var(--teal-glow);
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.search-examples button:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
  background: var(--teal-glow-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--teal-glow);
}

/* ═══ HERO GUIDE CTA ═══ */
.hero-guide-cta {
  max-width: 860px;
  margin: 32px auto 0;
}
.hero-guide-cta-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(145deg, var(--surface), var(--surface-light), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  position: relative;
  overflow: hidden;
}
.hero-guide-cta-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, var(--teal-glow) 40%, transparent 80%);
  pointer-events: none;
  animation: ctaSheen 4s ease-in-out infinite;
}
@keyframes ctaSheen {
  0%, 100% { opacity: 0; transform: translateX(-100%); }
  50% { opacity: 1; transform: translateX(100%); }
}
.hero-guide-cta-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--teal-glow));
}
.hero-guide-cta-text {
  flex: 1;
}
.hero-guide-cta-text strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  color: var(--ivory);
  margin-bottom: 2px;
}
.hero-guide-cta-text p {
  color: var(--silver);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
}
.hero-guide-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  color: white;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: all 0.3s var(--ease-out);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.hero-guide-cta-btn:hover {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ═══ REVEAL ANIMATIONS ═══ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ═══ SECTION HEADERS ═══ */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.section-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 10px;
}
.section-sub {
  color: var(--silver);
  font-size: 1rem;
  font-weight: 300;
}

/* ═══ TOPICS GRID ═══ */
.topics-section {
  padding: 80px 24px;
  background: var(--abyss);
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.topic-card {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 50%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-bright));
  opacity: 0;
  transition: opacity 0.3s;
}
.topic-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, var(--teal-glow) 45%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.topic-card:hover {
  border-color: var(--teal);
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
}
.topic-card:hover::before { opacity: 1; }
.topic-card:hover::after { opacity: 1; }
.topic-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.topic-icon { font-size: 1.5rem; }
.topic-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ivory);
}
.topic-subtitle {
  color: var(--silver);
  font-size: 0.88rem;
  font-weight: 300;
  margin-bottom: 14px;
  line-height: 1.5;
}
.topic-situations {
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.topic-situations li {
  padding: 4px 0;
  padding-left: 18px;
  position: relative;
}
.topic-situations li::before {
  content: '?';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.75rem;
}
.topic-count {
  margin-top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--slate);
}

/* ═══ TOPIC DETAIL ═══ */
.topic-detail { padding: 40px 24px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 24px;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--teal-bright); }
.topic-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  color: var(--ivory);
  margin-bottom: 8px;
}
.topic-header p { color: var(--silver); font-size: 1rem; margin-bottom: 4px; font-weight: 300; }
.topic-statute {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--teal-bright);
  padding: 6px 14px;
  border-radius: 2px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  margin-top: 12px;
}
.topic-rights {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0;
}
.topic-rights h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  margin-bottom: 14px;
  color: var(--ivory);
}
.topic-rights ul { list-style: none; }
.topic-rights li {
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--bone);
}
.topic-rights li:last-child { border-bottom: none; }
.topic-rights li::before {
  content: '\2713';
  position: absolute;
  left: 4px;
  color: var(--teal);
  font-weight: 700;
}
.topic-cases h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--ivory);
}

/* ═══ SEARCH RESULTS ═══ */
.results-section { padding: 40px 24px; flex: 1; }
.results-header { margin-bottom: 20px; }
.results-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  color: var(--ivory);
  margin-bottom: 4px;
}
.results-header .count {
  color: var(--silver);
  font-size: 0.88rem;
  font-weight: 300;
}
.results-topic-hint {
  background: var(--teal-glow);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--bone);
}
.results-topic-hint a { color: var(--teal-bright); font-weight: 600; text-decoration: none; }
.results-topic-hint a:hover { text-decoration: underline; }

/* Result Cards */
.result-card {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 50%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.result-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--teal-deep), var(--teal-bright), var(--teal-glow-hex));
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 0 2px 2px 0;
}
.result-card:hover {
  border-color: var(--teal);
  background: linear-gradient(145deg, var(--surface-hover) 0%, var(--surface-light) 50%, var(--surface-hover) 100%);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.result-card:hover::after { opacity: 1; }

/* Shimmer loading skeleton */
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--skeleton-shimmer) 50%, transparent 100%);
  animation: shimmer 1.8s ease-in-out infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skeleton-line {
  height: 14px;
  background: var(--surface-light);
  border-radius: 6px;
  margin-bottom: 10px;
}
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-100 { width: 100%; }
.skeleton-line.h-lg { height: 20px; }
.result-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ivory);
  margin-bottom: 4px;
}
.result-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--slate);
  margin-bottom: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.result-snippet {
  font-size: 0.86rem;
  color: var(--silver);
  line-height: 1.5;
}
.result-snippet mark {
  background: var(--teal-glow-strong);
  color: var(--teal-bright);
  padding: 2px 4px;
  border-radius: 3px;
  box-shadow: 0 0 6px var(--teal-glow);
}
.result-area-tag {
  display: inline-block;
  background: var(--teal-glow);
  border: 1px solid var(--border);
  color: var(--teal);
  padding: 2px 10px;
  border-radius: 2px;
  font-size: 0.72rem;
  font-family: 'IBM Plex Mono', monospace;
}

/* ═══ PAGINATION ═══ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding-bottom: 40px;
}
.pagination button {
  background: linear-gradient(145deg, var(--surface), var(--surface-light));
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  transition: all 0.25s var(--ease-out);
}
.pagination button:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.pagination button.active {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal), var(--teal-mid));
  color: white;
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

/* ═══ CASE VIEWER ═══ */
.case-viewer { padding: 40px 24px; flex: 1; }
.case-header {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--teal-deep);
}
.case-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  color: var(--ivory);
  margin-bottom: 8px;
  line-height: 1.3;
}
.case-citation {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--teal);
  font-size: 0.88rem;
}
.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.case-meta-item {
  background: linear-gradient(145deg, var(--surface), var(--surface-light), var(--surface));
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius);
  transition: border-color 0.3s;
}
.case-meta-item:hover {
  border-color: var(--teal);
}
.case-meta-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 3px;
}
.case-meta-value {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--bone);
}

/* Case Actions */
.case-actions {
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal), var(--teal-mid));
  color: white;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s var(--ease-out);
  letter-spacing: 0.03em;
}
.btn-download:hover {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright), var(--teal-mid));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  font-family: inherit;
  letter-spacing: 0.02em;
}
.btn-action:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
  background: var(--teal-glow);
}

/* Opinion Text Container */
.case-opinion {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: var(--radius-lg);
  max-width: 100%;
  overflow-x: auto;
  color: var(--bone);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Opinion Toolbar */
.case-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: linear-gradient(145deg, var(--surface), var(--surface-light), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.case-toolbar button, .case-toolbar select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.case-toolbar button:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
  background: var(--teal-glow);
}
.case-toolbar .toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}
.case-toolbar .font-size-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.case-toolbar .font-size-ctrl button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.case-toolbar .font-size-label {
  font-size: 0.72rem;
  color: var(--slate);
  margin-right: 4px;
}

/* Opinion Label */
.opinion-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Opinion Body Text */
.opinion-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.02rem;
  color: var(--bone);
  line-height: 1.9;
}
.opinion-text p {
  text-indent: 2em;
  text-align: justify;
  margin: 0 0 8px 0;
}
.opinion-text p.no-indent {
  text-indent: 0;
}

/* Section headings in opinion */
.opinion-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ivory);
  margin: 24px 0 10px;
  text-indent: 0;
}
.opinion-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bone);
  margin: 18px 0 8px;
  text-indent: 0;
}

/* ALL CAPS headings (MEMORANDUM OPINION, BACKGROUND, etc.) */
.opinion-text .heading-caps {
  text-align: center;
  text-indent: 0;
  font-weight: bold;
  color: var(--ivory);
  margin: 24px 0 12px;
  letter-spacing: 1.5px;
  font-size: 0.92rem;
}

/* Judge attribution */
.opinion-text .judge-line {
  font-weight: bold;
  text-indent: 0;
  margin: 12px 0;
  color: var(--ivory);
}

/* Inline footnotes */
.opinion-text .footnote {
  font-size: 0.78rem;
  color: var(--silver);
  line-height: 1.5;
  padding: 4px 0 4px 20px;
  text-indent: -20px;
  margin: 2px 0;
  border-left: 2px solid var(--dim);
  margin-left: 8px;
}
.opinion-text .footnote-num {
  font-weight: bold;
  color: var(--teal);
  margin-right: 4px;
}

/* Clickable citations in opinion text */
.opinion-text .cite-link {
  color: var(--teal-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--teal-glow-strong);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  border-radius: 2px;
  padding: 0 2px;
}
.opinion-text .cite-link:hover {
  color: var(--teal-glow-hex);
  border-bottom-color: var(--teal-bright);
  background: var(--teal-glow);
}

/* Star pagination markers */
.opinion-text .page-marker {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: bold;
  margin: 0 2px;
  vertical-align: super;
}

/* Search term highlighting in opinion */
.opinion-text mark {
  background: var(--teal-glow-strong);
  color: var(--teal-bright);
  padding: 0 2px;
  border-radius: 2px;
}

/* Headnotes Panel */
.case-headnotes {
  background: linear-gradient(145deg, var(--teal-glow-strong), var(--teal-glow));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.headnotes-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.headnote-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.headnote-item:last-child { border-bottom: none; }
.headnote-topic {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.headnote-text {
  font-size: 0.88rem;
  color: var(--bone);
  line-height: 1.6;
}

/* Counsel / Parties Panel */
.case-counsel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--bone);
  line-height: 1.6;
}
.counsel-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 6px;
}

/* Footnotes Section */
.case-footnotes {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 24px;
}
.footnotes-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 12px;
}
.footnote-entry {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.82rem;
  color: var(--silver);
  line-height: 1.5;
  border-bottom: 1px solid var(--border-light);
}
.footnote-entry:last-child { border-bottom: none; }
.footnote-entry-num {
  font-weight: bold;
  color: var(--teal);
  flex-shrink: 0;
  min-width: 20px;
}

/* Separate Opinions (Concurrence, Dissent) */
.separate-opinion {
  border-top: 2px solid var(--teal-deep);
  margin-top: 28px;
  padding-top: 20px;
}
.separate-opinion-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Table of Authorities */
.case-authorities, .case-citing {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 24px;
}
.authorities-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.authority-item, .citing-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
}
.authority-item:last-child, .citing-item:last-child { border-bottom: none; }
.authority-cite {
  color: var(--teal-bright);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
}
.authority-cite:hover { color: var(--teal-glow-hex); text-decoration: underline; }
.authority-parenthetical {
  color: var(--silver);
  font-style: italic;
  font-size: 0.78rem;
}
.authority-weight {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: bold;
  margin-left: auto;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  z-index: 9999;
  animation: toastIn 0.3s var(--ease-out);
  box-shadow: var(--shadow-lg);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Print Styles */
@media print {
  body { background: white; color: black; }
  .topbar, .footer, .case-topic-banner, .case-actions, .case-toolbar,
  .back-link, .case-branding, .hero, .topics-section, .guide-section,
  .about-section, .results-section, .splash { display: none !important; }
  .case-viewer { padding: 0; }
  .case-opinion { border: none; padding: 0; background: white; }
  .opinion-text { color: black; font-size: 11pt; }
  .opinion-text .cite-link { color: black; border-bottom: none; }
  .opinion-text .page-marker { color: #666; }
  .case-header h2 { color: black; }
  .case-citation { color: #333; }
  .case-meta-grid { display: none; }
  .case-headnotes, .case-counsel { border-color: #ccc; background: white; }
  .headnotes-title, .counsel-label, .opinion-label, .authorities-title, .footnotes-title { color: #333; }
}
.case-topic-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 2px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 16px;
  color: white;
}
.case-branding {
  text-align: center;
  margin-top: 36px;
  padding: 24px;
  color: var(--slate);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}
.case-branding a { color: var(--teal); text-decoration: none; }
.case-branding a:hover { text-decoration: underline; }
.case-source-line { margin-bottom: 6px; font-size: 0.85rem; }
.case-maintained-line { margin-bottom: 10px; font-size: 0.85rem; color: var(--bone); }

/* ═══ ABOUT ═══ */
.about-section { padding: 60px 24px; flex: 1; }
.about-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 740px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--bone);
}
.about-content p { margin-bottom: 16px; }
.about-content h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  margin: 28px 0 14px;
  font-size: 1.2rem;
  color: var(--ivory);
}
.about-content a { color: var(--teal-bright); text-decoration: none; }
.about-content a:hover { text-decoration: underline; }
.about-content .disclaimer { color: var(--silver); font-style: italic; font-size: 0.88rem; }

/* Founder Quote */
.founder-quote {
  background: linear-gradient(135deg, var(--teal-glow-strong), var(--teal-glow));
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  padding: 32px 36px;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--ivory);
  position: relative;
}
.founder-quote cite {
  display: block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--teal);
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.03em;
}

.about-firm {
  background: var(--surface-light);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius);
  margin-top: 28px;
  line-height: 1.8;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.about-firm a { color: var(--teal-bright); }

/* ═══ FOOTER ═══ */
.footer {
  background: var(--abyss);
  border-top: 1px solid var(--border);
  color: var(--slate);
  padding: 40px 24px;
  margin-top: auto;
  font-size: 0.84rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--bone);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer a { color: var(--teal); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-motto {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  color: var(--slate);
}

/* ═══ LOADING ═══ */
.loading {
  text-align: center;
  padding: 60px;
  color: var(--slate);
  font-size: 0.9rem;
}
.loading::after {
  content: '';
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--dim);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Loading skeleton for case viewer */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-light) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
  width: 100%;
}
.skeleton-line.short { width: 60%; }
.skeleton-line.shorter { width: 40%; }
.skeleton-title { height: 28px; width: 80%; margin-bottom: 16px; }
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ═══ CTA CARD ═══ */
.cta-card {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 40%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, var(--teal-glow) 40%, transparent 80%);
  pointer-events: none;
}
.cta-icon { font-size: 2.4rem; margin-bottom: 14px; position: relative; z-index: 1; }
.cta-card h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  color: var(--ivory);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.cta-card p {
  color: var(--silver);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}
.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal), var(--teal-mid));
  color: white;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: all 0.3s var(--ease-out);
  position: relative;
  z-index: 1;
}
.cta-button:hover {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright), var(--teal-mid));
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  letter-spacing: 0.05em;
}
.cta-phone {
  color: var(--slate) !important;
  font-size: 0.88rem !important;
  margin-bottom: 0 !important;
}
.cta-phone a { color: var(--teal-bright); text-decoration: none; }
.cta-phone a:hover { text-decoration: underline; }

/* ═══ FOOTER CTA ═══ */
.footer-cta {
  color: var(--silver);
  font-size: 0.84rem;
}
.footer-cta a {
  color: var(--teal-bright);
  text-decoration: none;
  font-weight: 500;
}
.footer-cta a:hover { text-decoration: underline; }

/* ═══ GUIDED SEARCH (QUESTIONNAIRE) ═══ */
.guide-section {
  padding: 60px 24px;
  flex: 1;
}
.guide-wizard {
  max-width: 680px;
  margin: 0 auto;
}

/* Category Grid */
.guide-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.guide-category-card {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 50%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  animation: guideCardIn 0.5s var(--ease-out) forwards;
}
.guide-category-card:nth-child(1) { animation-delay: 0s; }
.guide-category-card:nth-child(2) { animation-delay: 0.04s; }
.guide-category-card:nth-child(3) { animation-delay: 0.08s; }
.guide-category-card:nth-child(4) { animation-delay: 0.12s; }
.guide-category-card:nth-child(5) { animation-delay: 0.16s; }
.guide-category-card:nth-child(6) { animation-delay: 0.2s; }
.guide-category-card:nth-child(7) { animation-delay: 0.24s; }
.guide-category-card:nth-child(8) { animation-delay: 0.28s; }
.guide-category-card:nth-child(9) { animation-delay: 0.32s; }
.guide-category-card:nth-child(10) { animation-delay: 0.36s; }
.guide-category-card:nth-child(11) { animation-delay: 0.4s; }
.guide-category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, var(--teal-glow) 45%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.guide-category-card:hover {
  border-color: var(--teal);
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-lg);
}
.guide-category-card:hover::before { opacity: 1; }
.guide-category-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  transition: transform 0.3s var(--ease-out);
}
.guide-category-card:hover .guide-category-icon {
  transform: scale(1.15);
}
.guide-category-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ivory);
}

/* Progress Bar */
.guide-progress {
  height: 3px;
  background: var(--surface);
  border-radius: 2px;
  margin-bottom: 28px;
  overflow: hidden;
  position: relative;
}
.guide-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-mid), var(--teal-bright));
  transition: width 0.6s var(--ease-out);
  box-shadow: 0 0 12px var(--teal-glow-strong);
  position: relative;
}
.guide-progress-fill::after {
  content: '';
  position: absolute;
  right: 0; top: -2px; bottom: -2px;
  width: 20px;
  background: radial-gradient(circle, var(--teal-bright), transparent);
  animation: progressPulse 1.5s ease-in-out infinite;
}
@keyframes progressPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Step Card */
@keyframes guideStepIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes guideCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.guide-step {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-light) 50%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 36px;
  animation: guideStepIn 0.45s var(--ease-out) forwards;
  position: relative;
  overflow: hidden;
}
.guide-step::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--teal-glow));
  pointer-events: none;
  opacity: 0.3;
}
.guide-question {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 24px;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.guide-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}
@keyframes guideOptionIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
.guide-option {
  background: linear-gradient(145deg, var(--surface-light), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 20px;
  color: var(--bone);
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s var(--ease-out);
  opacity: 0;
  animation: guideOptionIn 0.35s var(--ease-out) forwards;
  position: relative;
  overflow: hidden;
}
.guide-option:nth-child(1) { animation-delay: 0.08s; }
.guide-option:nth-child(2) { animation-delay: 0.14s; }
.guide-option:nth-child(3) { animation-delay: 0.2s; }
.guide-option:nth-child(4) { animation-delay: 0.26s; }
.guide-option:nth-child(5) { animation-delay: 0.32s; }
.guide-option:nth-child(6) { animation-delay: 0.38s; }
.guide-option:nth-child(7) { animation-delay: 0.44s; }
.guide-option::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(180deg, var(--teal-deep), var(--teal));
  transition: width 0.3s var(--ease-out);
}
.guide-option:hover {
  border-color: var(--teal);
  background: linear-gradient(145deg, var(--teal-glow), var(--surface-hover));
  transform: translateX(4px);
  box-shadow: var(--shadow);
}
.guide-option:hover::before { width: 3px; }
.guide-option:active {
  transform: translateX(2px) scale(0.99);
}
.guide-option.selected {
  border-color: var(--teal);
  border-left: 3px solid var(--teal-bright);
  background: var(--teal-glow);
  color: var(--ivory);
}

/* Back Button */
.guide-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.2s;
}
.guide-back-btn:hover { color: var(--teal-bright); }

/* SOL Warning */
@keyframes solPulse {
  0%, 100% { border-color: rgba(176, 141, 87, 0.3); box-shadow: 0 0 0 rgba(176, 141, 87, 0); }
  50% { border-color: rgba(212, 169, 96, 0.5); box-shadow: 0 0 16px rgba(176, 141, 87, 0.1); }
}
.guide-sol-warning {
  background: linear-gradient(145deg, rgba(176, 141, 87, 0.06), rgba(176, 141, 87, 0.1), rgba(176, 141, 87, 0.06));
  border: 1px solid rgba(176, 141, 87, 0.3);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--gold-light);
  line-height: 1.6;
  animation: guideStepIn 0.4s var(--ease-out), solPulse 3s ease-in-out infinite 0.5s;
}

/* Guide Location Form */
.guide-location-form {
  display: flex;
  flex-direction: column;
}
.guide-form-label {
  color: var(--silver);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-weight: 600;
}
.guide-select,
.guide-text-input {
  padding: 10px 14px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ivory);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.guide-select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238a8b95' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.guide-select option {
  background: var(--surface);
  color: var(--ivory);
}
.guide-select:focus,
.guide-text-input:focus {
  border-color: var(--teal);
}
.guide-dca-info {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--teal-glow);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--teal-bright);
  font-size: 0.84rem;
  line-height: 1.6;
}
.guide-location-next {
  margin-top: 20px;
  text-align: center;
  justify-content: center;
  font-weight: 600;
}
.guide-location-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
/* Authority badges on results */
.result-card[data-authority="controlling"]::before {
  content: 'CONTROLLING';
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  color: var(--ivory);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 2px;
}
.result-card[data-authority="controlling"] {
  border-left: 3px solid var(--teal);
  position: relative;
}
.result-card[data-authority="persuasive"]::before {
  content: 'PERSUASIVE';
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--surface-hover);
  color: var(--silver);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 2px;
}
.result-card[data-authority="persuasive"] {
  position: relative;
}

.guide-location-badge {
  background: var(--teal-glow);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  color: var(--teal-bright);
  font-size: 0.82rem;
  margin-bottom: 16px;
  display: inline-block;
}

/* Guide Results */
.guide-results {
  margin-top: 28px;
}
.guide-results-header {
  margin-bottom: 20px;
}
.guide-results-header h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  color: var(--ivory);
  margin-bottom: 6px;
}
.guide-results-header p {
  color: var(--silver);
  font-size: 0.88rem;
}

/* ═══ DONATE SECTION ═══ */
.donate-section {
  padding: 80px 24px 60px;
  flex: 1;
}
.donate-inner {
  max-width: 680px;
  margin: 0 auto;
}
.donate-header {
  text-align: center;
  margin-bottom: 40px;
}
.donate-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--ivory);
  letter-spacing: 0.02em;
}
.donate-message {
  line-height: 1.9;
  color: var(--bone);
  font-size: 0.95rem;
  margin-bottom: 40px;
  text-align: justify;
}
.donate-message p {
  margin-bottom: 14px;
}
.donate-message strong {
  color: var(--ivory);
}
.donate-closing {
  margin-top: 24px;
  font-size: 1.05rem;
  color: var(--ivory);
}
.donate-signature {
  margin-top: 8px;
  color: var(--teal-bright);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
}
.donate-amounts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}
.donate-amounts-label {
  color: var(--silver);
  font-size: 0.88rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.donate-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.donate-amt {
  flex: 1;
  min-width: 80px;
  padding: 14px 16px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ivory);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.donate-amt:hover {
  border-color: var(--teal);
  background: var(--teal-glow);
  box-shadow: var(--shadow);
}
.donate-amt.featured {
  border-color: var(--teal);
  background: linear-gradient(135deg, var(--teal-glow-strong), var(--teal-glow));
  position: relative;
}
.donate-amt.featured::after {
  content: 'popular';
  position: absolute;
  top: -8px;
  right: 8px;
  background: var(--teal);
  color: var(--ivory);
  font-size: 0.6rem;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 2px;
}
.donate-custom {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.donate-custom-label {
  color: var(--silver);
  font-size: 0.85rem;
}
.donate-custom-input {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 200px;
}
.donate-currency {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-right: none;
  padding: 10px 10px;
  color: var(--silver);
  font-size: 0.95rem;
  border-radius: var(--radius) 0 0 var(--radius);
}
.donate-custom-input input {
  flex: 1;
  padding: 10px 12px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--ivory);
  font-size: 0.95rem;
  outline: none;
}
.donate-custom-input input:focus {
  border-color: var(--teal);
}
.donate-custom-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  border: 1px solid var(--teal);
  color: var(--ivory);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.donate-custom-btn:hover {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
}
.donate-secure {
  margin-top: 16px;
  color: var(--slate);
  font-size: 0.78rem;
  text-align: center;
}
.donate-footer {
  text-align: center;
  color: var(--slate);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
}
.donate-thank-you {
  text-align: center;
  background: linear-gradient(135deg, var(--teal-glow-strong), var(--teal-glow));
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}
.donate-thank-you h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 8px;
}
.donate-thank-you p {
  color: var(--bone);
  line-height: 1.7;
}

/* Support Us nav link highlight */
.nav-donate {
  color: var(--teal-bright) !important;
  font-weight: 600;
}
.nav-donate:hover {
  color: var(--ivory) !important;
}

/* ═══ FEATURED CASE CARD ═══ */
.featured-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--teal-glow) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.featured-card:hover {
  border-color: var(--teal-bright);
  box-shadow: var(--shadow-lg);
}
.featured-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal-bright);
  margin-bottom: 10px;
}
.featured-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--ivory);
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}
.featured-cite {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--teal-bright);
  margin-bottom: 12px;
}
.featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--silver);
  margin-bottom: 14px;
}
.featured-court {
  font-weight: 600;
  color: var(--bone);
}
.featured-snippet {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--silver);
  line-height: 1.6;
  margin-bottom: 16px;
  border-left: 2px solid var(--border);
  padding-left: 14px;
}
.featured-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.featured-actions button {
  background: none;
  border: 1px solid var(--border);
  color: var(--teal-bright);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.featured-actions button:hover {
  background: var(--teal-glow);
  border-color: var(--teal-bright);
}

/* ═══ DID YOU MEAN ═══ */
.did-you-mean {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--silver);
  padding: 10px 0 4px;
}
.did-you-mean a {
  color: var(--teal-bright);
  font-weight: 600;
  text-decoration: none;
  font-style: italic;
}
.did-you-mean a:hover {
  text-decoration: underline;
}

/* ═══ SEARCH FILTERS BAR ═══ */
.search-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-toggle:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}
.filter-pills {
  display: flex;
  gap: 6px;
}
.filter-pill {
  background: none;
  border: 1px solid var(--border);
  color: var(--slate);
  padding: 5px 14px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-pill:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}
.filter-pill.active {
  background: var(--teal-glow);
  border-color: var(--teal);
  color: var(--teal-bright);
  font-weight: 600;
}

/* ═══ RELATED SEARCHES ═══ */
.related-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
}
.related-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--slate);
  margin-right: 4px;
}
.related-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 5px 14px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.related-pill:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
  background: var(--teal-glow);
}

/* ═══ PAGERANK BADGES ═══ */
.pr-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--teal-glow-strong), var(--teal-glow));
  border: 1px solid var(--border);
  color: var(--teal-bright);
  padding: 3px 10px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pr-badge-sm {
  display: inline-flex;
  align-items: center;
  background: var(--teal-glow);
  color: var(--teal);
  padding: 2px 8px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ═══ BOOKMARK BUTTON ═══ */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bookmark-btn:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}
.bookmark-btn.bookmarked {
  border-color: var(--teal);
  color: var(--teal-bright);
  background: var(--teal-glow);
}

/* ═══ AUTOCOMPLETE SUGGESTIONS ═══ */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--suggest-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 12px;
  z-index: 200;
  max-height: 380px;
  overflow-y: auto;
  box-shadow: var(--suggest-shadow);
  animation: suggestionsReveal 0.25s var(--ease-out) forwards;
}
@keyframes suggestionsReveal {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.search-suggestions-label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  padding: 10px 16px 4px;
  display: block;
}
.search-suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--silver);
}
.search-suggestion:hover,
.search-suggestion.selected {
  background: var(--teal-glow);
  color: var(--ivory);
}
.suggest-cat {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  min-width: 48px;
}
.suggest-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══ WIDE-SCREEN SIDE FILL ═══ */
body {
  background-image:
    radial-gradient(ellipse at 0% 30%, var(--body-line-color) 0%, transparent 60%),
    radial-gradient(ellipse at 100% 60%, var(--body-line-color) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 0%, var(--teal-glow) 0%, transparent 50%);
}
body::before,
body::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--body-line-color) 20%,
    var(--body-line-color) 50%,
    var(--body-line-color) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}
body::before { left: max(0px, calc((100vw - 1200px) / 4)); }
body::after { right: max(0px, calc((100vw - 1200px) / 4)); }

@media (min-width: 1400px) {
  body {
    background-image:
      radial-gradient(ellipse at -5% 25%, var(--body-line-color) 0%, transparent 50%),
      radial-gradient(ellipse at 105% 65%, var(--body-line-color) 0%, transparent 50%),
      radial-gradient(ellipse at 50% 0%, var(--teal-glow) 0%, transparent 40%);
  }
}

/* ═══ BOTTOM NAV (mobile) ═══ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--void);
  border-top: 1px solid var(--border);
  z-index: 300;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: background-color 0.3s ease;
  /* iOS Safari fix: force GPU layer so it tracks the real viewport bottom */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  /* Use dynamic viewport units to handle Safari toolbar show/hide */
  will-change: transform;
  /* Allow horizontal scrolling for 7 nav items */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 0;
  color: var(--slate);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
  min-height: 48px;
  flex: 1;
}
.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--teal-bright);
}
.bottom-nav-item.active svg {
  stroke: var(--teal-bright);
}

/* ═══ COLLAPSING HEADER ═══ */
.topbar.header-hidden {
  transform: translateY(-100%);
}
.topbar {
  transition: transform 0.3s ease;
}

/* ═══ READER MODE ═══ */
.reader-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.reader-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}
.reader-btn:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}
.reader-btn.active {
  background: var(--teal-glow);
  border-color: var(--teal);
  color: var(--teal-bright);
}
.font-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.font-btn {
  background: none;
  border: none;
  border-right: 1px solid var(--border-light);
  color: var(--silver);
  padding: 6px 10px;
  font-family: var(--font-serif);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 36px;
  min-width: 36px;
}
.font-btn:last-child { border-right: none; }
.font-btn:hover {
  background: var(--teal-glow);
  color: var(--teal-bright);
}

/* Reader mode active: strip all chrome */
body.reader-active .topbar,
body.reader-active .bottom-nav,
body.reader-active .back-link,
body.reader-active .case-meta-grid {
  display: none !important;
}
body.reader-active .case-viewer {
  padding-top: 0;
}
body.reader-active .case-opinion {
  max-width: 65ch;
  margin: 0 auto;
  line-height: 1.9;
  padding: 24px 16px;
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal), var(--teal-bright), var(--teal-glow-hex));
  z-index: 400;
  transition: width 0.1s linear;
  pointer-events: none;
  box-shadow: 0 0 12px var(--teal-glow-strong), 0 0 24px var(--teal-glow);
}

/* Share button */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}
.share-btn:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}

/* ═══ SAFE AREA INSETS ═══ */
body {
  padding-top: env(safe-area-inset-top, 0px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ═══ TOUCH TARGETS (coarse pointer devices) ═══ */
@media (any-pointer: coarse) {
  .search-examples button { min-height: 44px; padding: 10px 16px; }
  .back-link { padding: 12px 0; min-height: 44px; display: inline-flex; align-items: center; }
  .result-card { padding: 16px; }
  .guide-option { min-height: 48px; }
  .filter-pill { min-height: 36px; padding: 8px 14px; }
  .related-pill { min-height: 36px; padding: 8px 14px; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .topnav { display: none; }
  #theme-toggle { display: none; }
  .mobile-menu-btn { display: flex; }
  .bottom-nav { display: flex; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

  .hero { padding: 60px 20px 50px; }
  .hero-title { font-size: 3.2rem; white-space: normal; letter-spacing: 0.04em; }
  .hero-quote { font-size: 1.1rem; }
  .hero-sub { font-size: 0.95rem; }
  .search-box { border-radius: 16px; max-width: 100%; margin: 0 auto 20px; }
  .search-box-inner { flex-direction: column; border-radius: 14px; }
  .search-box input {
    padding: 18px 16px;
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }
  .search-box input:focus {
    white-space: normal;
    overflow: visible;
  }
  .search-box input::placeholder {
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .search-box button {
    padding: 14px 20px;
    border-radius: 0 0 12px 12px;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
  }
  .search-shortcut { display: none; }
  .search-icon { display: none; }
  .search-examples { gap: 6px; }
  .search-examples button { padding: 4px 10px; font-size: 0.72rem; }
  .hero-guide-cta-inner { flex-direction: column; text-align: center; padding: 20px; }
  .hero-guide-cta-btn { width: 100%; justify-content: center; }

  .topics-section { padding: 50px 16px; }
  .topics-grid { grid-template-columns: 1fr; }
  .section-header h2 { font-size: 1.8rem; }

  .logo-text { display: none; }
  .guide-category-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-step { padding: 24px; }
  .guide-question { font-size: 1.15rem; }
  .case-opinion { padding: 20px; font-size: 0.88rem; }
  .about-content { padding: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .case-meta-grid { grid-template-columns: 1fr 1fr; }
  .result-meta { flex-direction: column; gap: 4px; }
  .about-firm { flex-direction: column; align-items: center; text-align: center; }

  .featured-card { padding: 20px; }
  .featured-name { font-size: 1.15rem; }
  .featured-meta { font-size: 0.72rem; }
  .featured-actions { flex-direction: column; }
  .search-filters { flex-wrap: wrap; }
  .filter-pills { flex-wrap: wrap; }
  .related-searches { gap: 6px; }

  .donate-section { padding: 60px 16px 40px; }
  .donate-amounts { padding: 24px; }
  .donate-buttons { flex-direction: column; }
  .donate-amt { min-width: unset; }
  .donate-custom { flex-direction: column; align-items: stretch; }
  .donate-custom-input { min-width: unset; }

  .splash-line-1 { font-size: 1.6rem; }
}

/* ═══ THEME TOGGLE ═══ */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 1px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  margin-left: 8px;
  flex-shrink: 0;
}
.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  padding: 0;
}
.theme-btn:hover {
  color: var(--ivory);
  background: var(--border);
}
.theme-btn.active {
  background: var(--teal);
  color: white;
}

/* Mobile theme toggle in mobile menu */
.mobile-theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.mobile-theme-toggle .theme-label {
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 500;
  margin-right: auto;
}
.mobile-theme-toggle .theme-btn {
  width: 32px;
  height: 32px;
}

/* Smooth transitions for theme-sensitive elements */
.topbar,
.splash,
.hero,
.topics-section,
.topic-detail,
.results-section,
.case-viewer,
.guide-section,
.about-section,
.donate-section,
.footer,
.bottom-nav,
.v-mark,
.topic-card,
.result-card,
.case-opinion,
.case-meta-item,
.about-content,
.guide-step,
.guide-category-card,
.guide-option,
.donate-amounts,
.donate-amt,
.cta-card,
.featured-card,
.case-headnotes,
.case-counsel,
.topic-rights,
.topic-statute,
.search-box-inner,
.case-toolbar,
.verdicts-section,
.judges-section {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Scrollbar adapts to theme */
[data-theme="light"] ::-webkit-scrollbar-track,
:root ::-webkit-scrollbar-track {
  background: var(--abyss);
}
[data-theme="sepia"] ::-webkit-scrollbar-track {
  background: var(--abyss);
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--abyss);
}
[data-theme="light"] ::-webkit-scrollbar-thumb,
:root ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--teal), var(--teal-bright));
  border: 2px solid var(--abyss);
}

@media (max-width: 480px) {
  .hero { padding: 40px 16px; }
  .hero-title { font-size: 2.2rem; white-space: normal; letter-spacing: 0.03em; }
  .topbar-inner { height: 52px; }
  .case-meta-grid { grid-template-columns: 1fr; }
  .guide-category-grid { grid-template-columns: 1fr 1fr; }
  .splash-logo .v-mark { width: 56px; height: 56px; }
  .splash-logo .v-mark span { font-size: 32px; }
  .case-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .case-tab { padding: 10px 16px; font-size: 0.82rem; white-space: nowrap; }
}

/* ═══════════════════════════════════════════════════════════════
   CITATOR — Tab Bar, Treatment Badge, Citing/Authorities/Treatment
   ═══════════════════════════════════════════════════════════════ */

/* ── Tab Bar ── */
.case-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.case-tab {
  padding: 12px 24px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.case-tab:hover {
  color: var(--ivory);
}
.case-tab.active {
  color: var(--teal-bright);
  border-bottom-color: var(--teal-bright);
}
.case-tab .tab-count {
  font-size: 0.72rem;
  background: var(--surface-hover);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  color: var(--silver);
  font-family: 'IBM Plex Mono', monospace;
}

/* ── Treatment Badge ── */
.treatment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-left: 12px;
  vertical-align: middle;
}
.treatment-badge.positive {
  background: rgba(45, 138, 78, 0.12);
  color: #2D8A4E;
}
.treatment-badge.caution {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
}
.treatment-badge.negative {
  background: rgba(220, 53, 69, 0.12);
  color: #DC3545;
}
.treatment-badge.unknown {
  background: var(--surface-hover);
  color: var(--slate);
}
[data-theme="dark"] .treatment-badge.positive {
  background: rgba(45, 138, 78, 0.18);
  color: #5EC87A;
}
[data-theme="dark"] .treatment-badge.negative {
  background: rgba(220, 53, 69, 0.18);
  color: #F06070;
}

/* ── Tab Content Panels ── */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ── Citator Loading Spinner ── */
.citator-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--slate);
  font-size: 0.88rem;
}
.citator-loading .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: citatorSpin 0.7s linear infinite;
}
@keyframes citatorSpin {
  to { transform: rotate(360deg); }
}

/* ── Citator Count Header ── */
.citator-count {
  font-size: 0.88rem;
  color: var(--silver);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.citator-count strong {
  color: var(--ivory);
}

/* ── Citing Case Card ── */
.citing-card {
  padding: 14px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.citing-card:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}
.citing-card-name {
  font-weight: 500;
  color: var(--teal-bright);
  font-size: 0.92rem;
  margin-bottom: 4px;
  transition: color 0.2s;
}
.citing-card:hover .citing-card-name {
  color: var(--teal-glow-hex);
  text-decoration: underline;
}
.citing-card-meta {
  font-size: 0.78rem;
  color: var(--slate);
  font-family: 'IBM Plex Mono', monospace;
}
.citing-card-parenthetical {
  font-size: 0.82rem;
  color: var(--silver);
  font-style: italic;
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
  line-height: 1.5;
}

/* ── Treatment Summary Bar ── */
.treatment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.treatment-stat {
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.treatment-stat .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.treatment-stat .dot.green { background: #2D8A4E; }
.treatment-stat .dot.yellow { background: var(--gold); }
.treatment-stat .dot.red { background: #DC3545; }
.treatment-stat .dot.gray { background: var(--slate); }
.treatment-stat-count {
  color: var(--ivory);
}
.treatment-stat-label {
  color: var(--silver);
  font-weight: 400;
}

/* ── Treatment Entry ── */
.treatment-entry {
  padding: 14px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.treatment-entry:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}
.treatment-entry-name {
  font-weight: 500;
  color: var(--teal-bright);
  font-size: 0.92rem;
  flex: 1;
  min-width: 200px;
}
.treatment-entry:hover .treatment-entry-name {
  text-decoration: underline;
}
.treatment-entry-meta {
  font-size: 0.78rem;
  color: var(--slate);
  font-family: 'IBM Plex Mono', monospace;
  width: 100%;
}
.treatment-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  white-space: nowrap;
}
.treatment-type-badge.followed,
.treatment-type-badge.affirmed,
.treatment-type-badge.positive {
  background: rgba(45, 138, 78, 0.12);
  color: #2D8A4E;
}
.treatment-type-badge.cited {
  background: var(--surface-hover);
  color: var(--silver);
}
.treatment-type-badge.discussed,
.treatment-type-badge.mentioned {
  background: var(--surface-hover);
  color: var(--silver);
}
.treatment-type-badge.distinguished,
.treatment-type-badge.questioned,
.treatment-type-badge.caution {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
}
.treatment-type-badge.overruled,
.treatment-type-badge.reversed,
.treatment-type-badge.superseded,
.treatment-type-badge.negative {
  background: rgba(220, 53, 69, 0.12);
  color: #DC3545;
}
.treatment-entry-parenthetical {
  font-size: 0.82rem;
  color: var(--silver);
  font-style: italic;
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
  width: 100%;
  line-height: 1.5;
}

/* ── Citator Empty State ── */
.citator-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--slate);
  font-size: 0.88rem;
}
.citator-empty svg {
  display: block;
  margin: 0 auto 12px;
  opacity: 0.4;
}

/* ── Print: hide citator tabs ── */
@media print {
  .case-tabs, .treatment-badge, .reader-toolbar { display: none !important; }
}

/* ── Reader mode: hide tabs ── */
body.reader-active .case-tabs { display: none !important; }

/* ── Theme transitions for citator elements ── */
.citing-card,
.treatment-entry,
.treatment-summary,
.case-tabs,
.treatment-badge,
.treatment-type-badge {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   JURISDICTION FILTERS — Pill bar + Authority Badges
   ═══════════════════════════════════════════════════════════════ */

.jurisdiction-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.jurisdiction-filter-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate);
  margin-right: 4px;
}
.jurisdiction-pill {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--silver);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.jurisdiction-pill:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
}
.jurisdiction-pill.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

/* Authority badge (binding / persuasive) on result cards */
.authority-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 4px;
}
.authority-badge.binding {
  background: rgba(45, 138, 78, 0.12);
  color: #2D8A4E;
}
.authority-badge.persuasive {
  background: var(--surface-hover);
  color: var(--slate);
}

/* Jurisdiction count badges on filter pills */
.jurisdiction-pill .jf-count {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-left: 4px;
  font-family: 'IBM Plex Mono', monospace;
}

/* Theme transitions for jurisdiction elements */
.jurisdiction-filters,
.jurisdiction-pill,
.authority-badge {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   FLASHCARDS — Spaced Repetition Study System
   ═══════════════════════════════════════════════════════════════ */

.flashcard-section {
  padding: 40px 24px 80px;
}
.flashcard-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.flashcard-header {
  margin-bottom: 32px;
}
.flashcard-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 8px;
}
.flashcard-header p {
  color: var(--silver);
  font-size: 0.9rem;
}
.flashcard-progress {
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 20px;
}
.flashcard-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-weight: 600;
}

/* The card itself */
.flashcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  user-select: none;
}
.flashcard:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.flashcard-front, .flashcard-back {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
}
.flashcard-front {
  font-weight: 500;
}
.flashcard-back {
  font-style: italic;
}
.flashcard-flip-hint {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.03em;
}
.flashcard-case-ref {
  font-size: 0.78rem;
  color: var(--slate);
  font-family: 'IBM Plex Mono', monospace;
  margin-top: 12px;
}

/* Rating buttons */
.flashcard-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.flashcard-rate-btn {
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}
.flashcard-rate-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.flashcard-rate-btn.again {
  border-color: #DC3545;
  color: #DC3545;
}
.flashcard-rate-btn.again:hover {
  background: rgba(220, 53, 69, 0.08);
}
.flashcard-rate-btn.hard {
  border-color: var(--gold);
  color: var(--gold);
}
.flashcard-rate-btn.hard:hover {
  background: rgba(201, 168, 76, 0.08);
}
.flashcard-rate-btn.good {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
}
.flashcard-rate-btn.good:hover {
  background: var(--teal-glow);
}
.flashcard-rate-btn.easy {
  border-color: #2D8A4E;
  color: #2D8A4E;
}
.flashcard-rate-btn.easy:hover {
  background: rgba(45, 138, 78, 0.08);
}

/* Flashcard list view (manage cards) */
.flashcard-list {
  text-align: left;
  margin-top: 32px;
}
.flashcard-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
}
.flashcard-list-item:hover {
  border-color: var(--border);
  background: var(--surface-hover);
}
.flashcard-list-front {
  font-size: 0.88rem;
  color: var(--text);
  flex: 1;
}
.flashcard-list-meta {
  font-size: 0.72rem;
  color: var(--slate);
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap;
}
.flashcard-list-delete {
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.flashcard-list-delete:hover {
  color: #DC3545;
  background: rgba(220, 53, 69, 0.08);
}

/* Flashcard empty state */
.flashcard-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--slate);
}
.flashcard-empty svg {
  display: block;
  margin: 0 auto 16px;
  opacity: 0.3;
}
.flashcard-empty p {
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Tabs for study / manage views */
.flashcard-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.flashcard-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  color: var(--slate);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.flashcard-tab:hover {
  color: var(--teal-bright);
}
.flashcard-tab.active {
  color: var(--teal-bright);
  border-bottom-color: var(--teal-bright);
}

/* Add card form */
.flashcard-form {
  text-align: left;
  margin-top: 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.flashcard-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--silver);
  margin-bottom: 6px;
}
.flashcard-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--void);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s;
}
.flashcard-form textarea:focus {
  border-color: var(--teal-bright);
}
.flashcard-form-row {
  margin-bottom: 16px;
}
.flashcard-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.flashcard-form-btn {
  padding: 8px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.flashcard-form-btn.primary {
  background: var(--teal);
  color: white;
  border: 1px solid var(--teal);
}
.flashcard-form-btn.primary:hover {
  background: var(--teal-bright);
}
.flashcard-form-btn.secondary {
  background: none;
  color: var(--silver);
  border: 1px solid var(--border);
}
.flashcard-form-btn.secondary:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}

/* Flashcard done state */
.flashcard-done {
  text-align: center;
  padding: 40px 20px;
}
.flashcard-done-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  filter: grayscale(0.2);
}
.flashcard-done h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  color: var(--ivory);
  margin-bottom: 8px;
}
.flashcard-done p {
  color: var(--silver);
  font-size: 0.9rem;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Theme transitions for flashcard elements */
.flashcard,
.flashcard-rate-btn,
.flashcard-list-item,
.flashcard-form,
.flashcard-form textarea,
.flashcard-tab {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Print: hide flashcard section */
@media print {
  .flashcard-section { display: none !important; }
}

/* ── Responsive: Flashcards ── */
@media (max-width: 600px) {
  .flashcard {
    padding: 28px 20px;
    min-height: 160px;
  }
  .flashcard-actions {
    flex-wrap: wrap;
  }
  .flashcard-rate-btn {
    padding: 10px 16px;
    font-size: 0.82rem;
    flex: 1;
    min-width: 70px;
  }
  .flashcard-form {
    padding: 16px;
  }
}

/* ── Responsive: Jurisdiction filters ── */
@media (max-width: 600px) {
  .jurisdiction-pill {
    padding: 5px 12px;
    font-size: 0.75rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   AI CASE BRIEF — FIRAC Brief Panel
   ═══════════════════════════════════════════════════════════════ */

.brief-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.brief-btn:hover {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}
.brief-btn:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
  box-shadow: none;
}
.brief-btn .brief-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.brief-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 16px 0;
  line-height: 1.8;
  animation: briefFadeIn 0.4s var(--ease-out) forwards;
}
@keyframes briefFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.brief-panel h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  color: var(--teal-bright);
  margin-bottom: 8px;
}
.brief-panel h3 {
  font-size: 0.95rem;
  color: var(--gold);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
}
.brief-panel p {
  color: var(--bone);
  margin: 6px 0;
  font-size: 0.92rem;
}
.brief-panel strong {
  color: var(--ivory);
}
.brief-panel ul, .brief-panel ol {
  color: var(--bone);
  padding-left: 20px;
  margin: 6px 0;
}

.brief-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--slate);
  font-family: 'IBM Plex Mono', monospace;
}

.plain-english-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(45, 138, 78, 0.08);
  border: 1px solid rgba(45, 138, 78, 0.2);
  border-radius: var(--radius);
  color: #2D8A4E;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.plain-english-toggle:hover {
  background: rgba(45, 138, 78, 0.15);
  border-color: rgba(45, 138, 78, 0.35);
}
.plain-english-toggle.active {
  background: rgba(45, 138, 78, 0.15);
  border-color: #2D8A4E;
}
[data-theme="dark"] .plain-english-toggle {
  color: #5EC87A;
  background: rgba(45, 138, 78, 0.12);
  border-color: rgba(94, 200, 122, 0.2);
}
[data-theme="dark"] .plain-english-toggle:hover,
[data-theme="dark"] .plain-english-toggle.active {
  background: rgba(45, 138, 78, 0.2);
  border-color: rgba(94, 200, 122, 0.4);
}

.plain-english-box {
  background: rgba(45, 138, 78, 0.08);
  border-left: 4px solid #2D8A4E;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 12px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--bone);
  animation: briefFadeIn 0.3s var(--ease-out) forwards;
}
[data-theme="dark"] .plain-english-box {
  background: rgba(45, 138, 78, 0.1);
  border-left-color: #5EC87A;
}
.plain-english-box strong {
  color: #2D8A4E;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 6px;
}
[data-theme="dark"] .plain-english-box strong {
  color: #5EC87A;
}

.brief-loading-text {
  text-align: center;
  padding: 28px;
  color: var(--slate);
  font-size: 0.88rem;
  line-height: 1.6;
}
.brief-loading-text .brief-spinner-lg {
  display: block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 14px;
}

.brief-error {
  padding: 16px 20px;
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: var(--radius);
  color: #DC3545;
  font-size: 0.85rem;
  margin: 12px 0;
}
[data-theme="dark"] .brief-error {
  background: rgba(220, 53, 69, 0.12);
  color: #F06070;
}

/* Streaming brief content */
.brief-stream-content {
  min-height: 60px;
  line-height: 1.8;
}
.brief-stream-content.brief-streaming {
  position: relative;
}
.brief-stream-content.brief-streaming::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--teal-bright);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: briefCursorBlink 0.8s ease-in-out infinite;
}
@keyframes briefCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.brief-stream-content h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  color: var(--teal-bright);
  margin-bottom: 8px;
}
.brief-stream-content h3 {
  font-size: 0.95rem;
  color: var(--gold);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
}
.brief-stream-content p {
  color: var(--bone);
  margin: 6px 0;
  font-size: 0.92rem;
}
.brief-stream-content strong {
  color: var(--ivory);
}
.brief-stream-content ul, .brief-stream-content ol {
  color: var(--bone);
  padding-left: 20px;
  margin: 6px 0;
}

/* Sepia theme adjustments for streaming */
[data-theme="sepia"] .brief-stream-content.brief-streaming::after {
  background: var(--teal);
}

/* Dark theme adjustments for streaming */
[data-theme="dark"] .brief-stream-content.brief-streaming::after {
  background: var(--teal-bright);
}

/* Theme transitions for brief elements */
.brief-panel,
.brief-btn,
.plain-english-box,
.plain-english-toggle,
.brief-stream-content {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   STUDY MODE — Bookmarks, Collections, Notes
   ═══════════════════════════════════════════════════════════════ */

.study-bookmark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--slate);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.study-bookmark-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.study-bookmark-btn.active {
  color: var(--gold);
  background: rgba(201, 168, 76, 0.12);
  border-color: var(--gold);
}
.study-bookmark-btn.active svg {
  fill: var(--gold);
}

.study-panel {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.study-section {
  margin-bottom: 32px;
}
.study-section h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.study-section-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--slate);
  font-weight: 400;
}

.study-case-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.study-case-item:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}
.study-case-name {
  font-weight: 500;
  color: var(--teal-bright);
  flex: 1;
  font-size: 0.92rem;
}
.study-case-cite {
  font-size: 0.78rem;
  color: var(--slate);
  font-family: 'IBM Plex Mono', monospace;
}
.study-case-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.study-case-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--slate);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.study-case-actions button:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
  background: var(--teal-glow);
}
.study-case-actions .remove-btn:hover {
  border-color: #DC3545;
  color: #DC3545;
  background: rgba(220, 53, 69, 0.08);
}

.collection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.collection-header h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ivory);
  display: flex;
  align-items: center;
  gap: 8px;
}
.collection-header .collection-actions {
  display: flex;
  gap: 6px;
}
.collection-header .collection-actions button {
  background: none;
  border: 1px solid var(--border);
  color: var(--slate);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s;
}
.collection-header .collection-actions button:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}
.collection-header .collection-actions .delete-collection-btn:hover {
  border-color: #DC3545;
  color: #DC3545;
}

.collection-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.collection-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.collection-create-btn:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}

.collection-create-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.collection-create-form input {
  flex: 1;
  padding: 8px 12px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ivory);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}
.collection-create-form input:focus {
  border-color: var(--teal);
}
.collection-create-form button {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.collection-create-form button:hover {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
}

.add-to-collection-select {
  padding: 4px 8px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ivory);
  font-family: inherit;
  font-size: 0.72rem;
  outline: none;
  cursor: pointer;
  max-width: 140px;
}
.add-to-collection-select:focus {
  border-color: var(--teal);
}

.case-note {
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.case-note:focus {
  border-color: var(--teal);
}
.case-note-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.study-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--slate);
}
.study-empty svg {
  display: block;
  margin: 0 auto 12px;
  opacity: 0.3;
}
.study-empty p {
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.study-empty .study-empty-hint {
  font-size: 0.82rem;
  color: var(--dim);
}

.study-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: none;
  color: var(--silver);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}
.study-export-btn:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}

/* Theme transitions for study elements */
.study-bookmark-btn,
.study-case-item,
.collection-block,
.collection-create-btn,
.case-note,
.study-export-btn {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Print: hide study elements */
@media print {
  .study-bookmark-btn, .brief-btn, .brief-panel, .plain-english-toggle { display: none !important; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .brief-panel { padding: 16px 18px; }
  .study-panel { padding: 16px; }
  .study-case-item { padding: 10px 12px; gap: 8px; }
  .study-case-cite { display: none; }
  .collection-header { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════════
   CASE COMPARISON VIEW
   ═══════════════════════════════════════════════════════════════ */

.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.compare-toggle:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
}
.compare-toggle.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.compare-fab {
  position: fixed;
  bottom: 80px;
  right: 24px;
  padding: 12px 24px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 100;
  transition: all 0.2s;
  animation: fabBounce 0.3s ease;
}
@keyframes fabBounce {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.compare-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

.compare-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}
.compare-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.2s;
}
.compare-back-btn:hover { color: var(--teal-bright); }

.compare-header {
  margin-bottom: 24px;
}
.compare-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  color: var(--ivory);
  margin-bottom: 4px;
}
.compare-header p {
  color: var(--silver);
  font-size: 0.88rem;
}

.compare-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.compare-row {
  display: grid;
  grid-template-columns: 120px repeat(var(--compare-cols, 2), 1fr);
  border-bottom: 1px solid var(--border-light);
}
.compare-row:last-child { border-bottom: none; }
.compare-label {
  padding: 12px 16px;
  background: var(--surface-hover);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: flex-start;
}
.compare-cell {
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text);
  border-left: 1px solid var(--border-light);
  line-height: 1.6;
  word-break: break-word;
}
.compare-cell.case-name {
  font-weight: 600;
  color: var(--teal-bright);
  cursor: pointer;
}
.compare-cell.case-name:hover { text-decoration: underline; }

.compare-cell.holding-cell {
  max-height: 200px;
  overflow-y: auto;
}

.compare-checkbox {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.compare-checkbox:hover {
  border-color: var(--teal-bright);
}
.compare-checkbox.checked {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}
.compare-checkbox .check-icon {
  display: none;
}
.compare-checkbox.checked .check-icon {
  display: block;
}

/* Theme transitions for compare elements */
.compare-toggle,
.compare-fab,
.compare-table,
.compare-label,
.compare-cell,
.compare-checkbox {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Responsive compare */
@media (max-width: 768px) {
  .compare-row {
    grid-template-columns: 80px repeat(var(--compare-cols, 2), 1fr);
  }
  .compare-label {
    font-size: 0.72rem;
    padding: 10px 8px;
  }
  .compare-cell {
    font-size: 0.78rem;
    padding: 10px 8px;
  }
  .compare-section {
    padding: 16px;
  }
}

/* Print: hide compare UI elements */
@media print {
  .compare-toggle, .compare-fab, .compare-checkbox { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   PROGRESS TRACKING & STUDY DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

.progress-dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}
.progress-dashboard-header {
  margin-bottom: 32px;
}
.progress-dashboard-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  color: var(--ivory);
  margin-bottom: 4px;
}
.progress-dashboard-header p {
  color: var(--silver);
  font-size: 0.88rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal-bright);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-heatmap-container {
  margin-bottom: 32px;
}
.activity-heatmap {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 3px;
  margin-bottom: 8px;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--surface-hover);
  transition: background-color 0.2s;
  position: relative;
}
.heatmap-cell:hover {
  outline: 1px solid var(--teal-bright);
  outline-offset: 1px;
}
.heatmap-cell[title] {
  cursor: default;
}
.heatmap-cell.level-1 { background: rgba(45, 138, 78, 0.2); }
.heatmap-cell.level-2 { background: rgba(45, 138, 78, 0.4); }
.heatmap-cell.level-3 { background: rgba(45, 138, 78, 0.6); }
.heatmap-cell.level-4 { background: rgba(45, 138, 78, 0.8); }

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--slate);
}
.heatmap-legend-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.heatmap-legend-cell.l0 { background: var(--surface-hover); }
.heatmap-legend-cell.l1 { background: rgba(45, 138, 78, 0.2); }
.heatmap-legend-cell.l2 { background: rgba(45, 138, 78, 0.4); }
.heatmap-legend-cell.l3 { background: rgba(45, 138, 78, 0.6); }
.heatmap-legend-cell.l4 { background: rgba(45, 138, 78, 0.8); }

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.achievement {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.achievement:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
}
.achievement.locked {
  opacity: 0.4;
  filter: grayscale(1);
}
.achievement.unlocked {
  border-color: var(--gold);
}
.achievement-icon { font-size: 1.5rem; flex-shrink: 0; }
.achievement-info { flex: 1; min-width: 0; }
.achievement-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}
.achievement-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Theme transitions for progress elements */
.stat-card,
.heatmap-cell,
.achievement {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Responsive: Progress Dashboard */
@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .stat-number {
    font-size: 1.5rem;
  }
  .stat-label {
    font-size: 0.72rem;
  }
  .activity-heatmap {
    grid-template-columns: repeat(15, 1fr);
  }
  .achievements-grid {
    grid-template-columns: 1fr;
  }
  .progress-dashboard {
    padding: 16px;
  }
}
@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Print: hide progress dashboard */
@media print {
  .progress-dashboard { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   PWA INSTALL BANNER
   ═══════════════════════════════════════════════════════════════ */

.install-banner {
  position: fixed;
  bottom: 70px;
  left: 16px;
  right: 16px;
  background: var(--surface);
  border: 1px solid var(--teal);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 500;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.install-banner.visible {
  transform: translateY(0);
}
.install-banner-text {
  flex: 1;
}
.install-banner-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.install-banner-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.install-banner-btn {
  padding: 10px 20px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.install-banner-btn:hover {
  opacity: 0.85;
}
.install-banner-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  line-height: 1;
}
.install-banner-close:hover {
  color: var(--text);
}

@media (min-width: 769px) {
  .install-banner {
    bottom: 24px;
    left: auto;
    right: 24px;
    max-width: 420px;
  }
}

@media print {
  .install-banner { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE EXPERIENCE UPGRADE
   Reading mode, font controls, scroll memory, swipe nav,
   touch targets, offline banner, skeleton loading
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Mobile Reading Mode ── */
@media (max-width: 768px) {
  .case-opinion {
    padding: 16px 18px;
    font-size: var(--reading-font-size, 17px);
    line-height: 1.7;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin: 0 -16px;
    box-shadow: none;
  }
  .opinion-text {
    font-size: var(--reading-font-size, 17px);
    line-height: 1.75;
    text-align: left;
  }
  .opinion-text p {
    text-indent: 1.5em;
    margin-bottom: 1.2em;
  }
  .opinion-text p.no-indent {
    text-indent: 0;
  }
}

/* ── 2. Mobile Font Size Controls ── */
.mobile-font-controls {
  display: none;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 12px;
}
@media (max-width: 768px) {
  .mobile-font-controls {
    display: flex;
  }
}
.mobile-font-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-font-btn:active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.mobile-font-btn:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}

/* ── 3. Continue Reading Banner ── */
.continue-reading-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--teal-glow);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text);
  animation: crBannerSlide 0.3s ease;
}
@keyframes crBannerSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.continue-reading-banner span:first-child {
  flex: 1;
}
.continue-reading-banner button {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.continue-reading-banner .cr-resume {
  background: var(--teal);
  color: white;
}
.continue-reading-banner .cr-resume:hover {
  background: var(--teal-bright);
}
.continue-reading-banner .cr-dismiss {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.continue-reading-banner .cr-dismiss:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}

/* ── 4. Swipe Navigation Indicator ── */
.swipe-indicator {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: var(--shadow-md);
}
.swipe-indicator.left { left: 8px; }
.swipe-indicator.right { right: 8px; }
.swipe-indicator.visible { opacity: 1; }

/* Case navigation bar (swipe context) */
.case-nav-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .case-nav-bar {
    display: flex;
  }
}
.case-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  color: var(--silver);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
}
.case-nav-btn:hover {
  border-color: var(--teal);
  color: var(--teal-bright);
}
.case-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.case-nav-position {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--slate);
}

/* ── 5. Mobile Touch Target Improvements ── */
@media (max-width: 768px) {
  button, .btn, a.cta-button, .filter-pill, .jurisdiction-pill,
  .case-tab, .theme-btn, .flashcard-rate-btn, .bookmark-btn {
    min-height: 44px;
  }

  .result-card {
    padding: 16px 18px;
    margin-bottom: 10px;
  }

  .citing-card {
    padding: 14px 16px;
  }

  .case-tab {
    padding: 14px 16px;
    font-size: 0.82rem;
  }

  .bottom-nav-item {
    min-width: 64px;
    padding: 8px 12px;
  }

  /* Case actions wrap nicely on mobile */
  .case-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .case-actions .btn-download,
  .case-actions .btn-action,
  .case-actions .brief-btn {
    min-height: 44px;
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
    font-size: 0.82rem;
    padding: 10px 14px;
  }

  /* Bigger back link on mobile */
  .back-link {
    min-height: 44px;
    padding: 10px 0;
    font-size: 0.95rem;
  }

  /* Reader toolbar stacks better */
  .reader-toolbar {
    gap: 6px;
    padding: 10px 0 14px;
  }
  .reader-btn, .share-btn {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  /* Larger meta items on mobile */
  .case-meta-item {
    padding: 14px 16px;
  }

  /* Case header adjustments */
  .case-header h2 {
    font-size: 1.3rem;
    line-height: 1.35;
  }

  /* Toolbar wraps better */
  .case-toolbar {
    padding: 8px 12px;
    gap: 6px;
  }
  .case-toolbar button {
    min-height: 40px;
    padding: 8px 14px;
  }
}

/* ── 6. Offline Detection Banner ── */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #DC3545;
  color: white;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  z-index: 9999;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.offline-banner.visible {
  transform: translateY(0);
}

/* ── 7. Mobile Skeleton Loading Enhancement ── */
@media (max-width: 768px) {
  .skeleton-card {
    padding: 16px 18px;
    margin-bottom: 10px;
    border-radius: var(--radius);
  }
  .skeleton-line {
    height: 12px;
    margin-bottom: 8px;
  }
  .skeleton-line.h-lg {
    height: 18px;
  }
}

/* ── Theme-aware transitions for new mobile elements ── */
.mobile-font-btn,
.continue-reading-banner,
.offline-banner,
.swipe-indicator,
.case-nav-btn {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ── Dark theme adjustments ── */
[data-theme="dark"] .offline-banner {
  background: #B82E3B;
}

/* ── Sepia theme adjustments ── */
[data-theme="sepia"] .continue-reading-banner {
  background: rgba(90, 122, 58, 0.1);
  border-color: var(--teal);
}

/* ── Print: hide mobile-only elements ── */
@media print {
  .mobile-font-controls,
  .continue-reading-banner,
  .offline-banner,
  .swipe-indicator,
  .case-nav-bar { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   BRIEF VALIDATOR — "Check My Citations"
   ═══════════════════════════════════════════════════════════════ */

.brief-check-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}
.brief-check-textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, background-color 0.3s, color 0.3s;
}
.brief-check-textarea::placeholder {
  color: var(--text-muted);
}
.brief-check-textarea:focus {
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 3px var(--teal-glow);
}
.brief-check-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.brief-check-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.brief-check-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.brief-check-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.brief-check-clear {
  padding: 12px 20px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.brief-check-clear:hover {
  border-color: var(--teal);
  color: var(--text);
}
.brief-check-output {
  margin-top: 24px;
}
.brief-check-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0;
  font-size: 0.88rem;
  transition: background-color 0.3s, border-color 0.3s;
}
.brief-check-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.brief-check-stat .stat-icon {
  font-size: 1rem;
}
.brief-check-stat .stat-num {
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
}
.brief-check-results {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s;
}
.brief-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  transition: background-color 0.2s, border-color 0.3s;
}
.brief-check-row:last-child { border-bottom: none; }
.brief-check-row:hover { background: var(--surface-hover); }
.citation-status {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: background-color 0.3s;
}
.citation-status.good { background: rgba(45, 138, 78, 0.15); color: #2D8A4E; }
.citation-status.caution { background: rgba(201, 168, 76, 0.2); color: var(--gold); }
.citation-status.negative { background: rgba(220, 53, 69, 0.15); color: #DC3545; }
.citation-status.unknown { background: var(--surface-hover); color: var(--text-muted); }
.citation-cite {
  min-width: 140px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.citation-name {
  flex: 1;
  color: var(--teal-bright);
  cursor: pointer;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.citation-name:hover { text-decoration: underline; }
.citation-name.not-found {
  color: var(--text-muted);
  cursor: default;
  font-style: italic;
  font-weight: 400;
}
.citation-name.not-found:hover { text-decoration: none; }
.citation-treatment {
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
.citation-treatment.good { background: rgba(45, 138, 78, 0.12); color: #2D8A4E; }
.citation-treatment.caution { background: rgba(201, 168, 76, 0.15); color: var(--gold); }
.citation-treatment.negative { background: rgba(220, 53, 69, 0.12); color: #DC3545; }
.citation-treatment.unknown { background: var(--surface-hover); color: var(--text-muted); }
.citation-treatment.neutral { background: var(--surface-hover); color: var(--text-muted); }

/* Dark theme adjustments for citation statuses */
[data-theme="dark"] .citation-status.good { background: rgba(45, 138, 78, 0.25); }
[data-theme="dark"] .citation-status.caution { background: rgba(201, 168, 76, 0.2); }
[data-theme="dark"] .citation-status.negative { background: rgba(220, 53, 69, 0.25); }
[data-theme="dark"] .citation-treatment.good { background: rgba(45, 138, 78, 0.2); }
[data-theme="dark"] .citation-treatment.caution { background: rgba(201, 168, 76, 0.2); }
[data-theme="dark"] .citation-treatment.negative { background: rgba(220, 53, 69, 0.2); }

/* Sepia theme adjustments */
[data-theme="sepia"] .citation-status.good { background: rgba(45, 100, 50, 0.15); color: #3A7A2E; }
[data-theme="sepia"] .citation-status.caution { background: rgba(180, 140, 40, 0.15); color: #8B6914; }
[data-theme="sepia"] .citation-status.negative { background: rgba(180, 50, 50, 0.15); color: #B03030; }
[data-theme="sepia"] .citation-treatment.good { background: rgba(45, 100, 50, 0.12); color: #3A7A2E; }
[data-theme="sepia"] .citation-treatment.caution { background: rgba(180, 140, 40, 0.12); color: #8B6914; }
[data-theme="sepia"] .citation-treatment.negative { background: rgba(180, 50, 50, 0.12); color: #B03030; }

.brief-check-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.brief-check-loading .spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .brief-check-section { padding: 60px 16px 40px; }
  .brief-check-row {
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 12px;
  }
  .citation-cite { min-width: unset; width: 100%; order: 2; }
  .citation-name { width: 100%; order: 3; white-space: normal; }
  .citation-treatment { order: 4; }
  .citation-status { order: 1; }
  .brief-check-summary { gap: 12px; }
  .brief-check-actions { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════════════
   SEARCH ALERTS — Saved Searches
   ═══════════════════════════════════════════════════════════════ */

.save-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.save-search-btn:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
}
.save-search-btn.saved {
  background: var(--teal-glow);
  border-color: var(--teal-bright);
  color: var(--teal-bright);
}

.alerts-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alert-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface);
}
.alert-item:hover { background: var(--surface-hover); }
.alert-icon {
  color: var(--teal);
  flex-shrink: 0;
}
.alert-query {
  flex: 1;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alert-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.alert-new-count {
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.alert-new-count.has-new {
  background: var(--teal);
  color: white;
}
.alert-new-count.no-new {
  background: var(--surface-hover);
  color: var(--text-muted);
}
.alert-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1.1rem;
  border-radius: var(--radius);
  transition: all 0.2s;
  flex-shrink: 0;
}
.alert-delete:hover {
  color: #DC3545;
  background: rgba(220, 53, 69, 0.1);
}
.alert-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 50%;
  background: #DC3545;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.alerts-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.alerts-empty p {
  margin: 0;
  line-height: 1.6;
}

/* Mobile responsiveness for alerts */
@media (max-width: 768px) {
  .alerts-section { padding: 60px 16px 40px; }
  .alert-item {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
  }
  .alert-meta { width: 100%; order: 5; }
}

/* Theme transitions for new elements */
.brief-check-section,
.alerts-section,
.alert-item,
.brief-check-results,
.brief-check-row,
.brief-check-summary {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   VERDICT SEARCH SECTION
   ═══════════════════════════════════════════════════════════════ */
.verdicts-section {
  padding: 80px 24px 60px;
  flex: 1;
}

/* Verdict Stats Row */
.verdict-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.verdict-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.verdict-stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.verdict-stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--teal-bright);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.verdict-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  font-family: 'IBM Plex Mono', monospace;
}

/* Top Verdicts Quick List */
.verdict-top-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.verdict-top-list h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 12px;
}
.verdict-top-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.15s ease;
}
.verdict-top-item:last-child {
  border-bottom: none;
}
.verdict-top-item:hover {
  padding-left: 8px;
  color: var(--teal-bright);
}
.verdict-top-item-name {
  font-size: 0.88rem;
  color: var(--teal-bright);
  font-weight: 500;
}
.verdict-top-item-amount {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold);
  font-family: 'IBM Plex Mono', monospace;
}

/* Verdict Search Bar */
.verdict-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.verdict-search-input {
  flex: 2;
  min-width: 200px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.verdict-search-input:focus {
  border-color: var(--teal);
  box-shadow: var(--shadow-glow);
}
.verdict-filter-select {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  min-width: 140px;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.verdict-filter-select:focus {
  border-color: var(--teal);
}
.verdict-amount-input {
  width: 100px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.verdict-amount-input:focus {
  border-color: var(--teal);
}
/* Hide number input spinners */
.verdict-amount-input::-webkit-inner-spin-button,
.verdict-amount-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.verdict-amount-input[type=number] {
  -moz-appearance: textfield;
}
.verdict-search-btn {
  padding: 12px 24px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.verdict-search-btn:hover {
  background: var(--teal-bright);
  box-shadow: var(--shadow-glow);
}

/* Verdict Results */
.verdict-results {
  min-height: 40px;
}
.verdict-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.verdict-card:hover {
  background: var(--surface-hover);
  box-shadow: var(--shadow);
  border-color: var(--teal-glow-hex);
}
.verdict-amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 130px;
  text-align: right;
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap;
}
.verdict-info {
  flex: 1;
  min-width: 0;
}
.verdict-case-name {
  font-weight: 500;
  color: var(--teal-bright);
  font-size: 0.92rem;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.verdict-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.verdict-meta span + span::before {
  content: '\00b7';
  margin-right: 6px;
}
.verdict-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.verdict-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--teal-glow);
  color: var(--teal-bright);
  white-space: nowrap;
}
.verdict-outcome-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.verdict-outcome-badge.plaintiff {
  background: rgba(45, 138, 78, 0.12);
  color: #2D8A4E;
}
.verdict-outcome-badge.defense {
  background: rgba(220, 53, 69, 0.1);
  color: #DC3545;
}
.verdict-outcome-badge.settled {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
}

/* Verdict empty/loading */
.verdict-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.verdict-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════════════════════════════
   JUDGE DIRECTORY SECTION
   ═══════════════════════════════════════════════════════════════ */
.judges-section {
  padding: 80px 24px 60px;
  flex: 1;
}

/* Judge Search Bar */
.judge-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.judge-search-input {
  flex: 1;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.judge-search-input:focus {
  border-color: var(--teal);
  box-shadow: var(--shadow-glow);
}
.judge-search-btn {
  padding: 12px 24px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.judge-search-btn:hover {
  background: var(--teal-bright);
  box-shadow: var(--shadow-glow);
}

/* Judge Results */
.judge-results {
  min-height: 40px;
}
.judge-card {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.judge-card:hover {
  background: var(--surface-hover);
  box-shadow: var(--shadow);
  border-color: var(--teal-glow-hex);
}
.judge-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.judge-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ivory);
  margin-bottom: 4px;
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.judge-court {
  font-size: 0.82rem;
  color: var(--teal-bright);
}
.judge-case-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
}
.judge-stats {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.judge-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.judge-area-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 500;
  background: var(--teal-glow);
  color: var(--teal-bright);
  text-transform: capitalize;
}

/* Judge Profile (detail view) */
.judge-profile {
  margin-top: 0;
}
.judge-profile-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--teal-bright);
  text-decoration: none;
  margin-bottom: 20px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.judge-profile-back:hover {
  opacity: 0.75;
}
.judge-profile-header {
  margin-bottom: 24px;
}
.judge-profile-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ivory);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.judge-profile-court {
  font-size: 0.95rem;
  color: var(--teal-bright);
  margin-top: 4px;
}
.judge-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.judge-profile-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.judge-profile-stat-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--teal-bright);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.judge-profile-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
  font-family: 'IBM Plex Mono', monospace;
}

/* Practice area bars */
.judge-practice-areas {
  margin: 24px 0;
}
.judge-practice-areas h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 14px;
}
.practice-area-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}
.practice-area-label {
  min-width: 140px;
  color: var(--silver);
  text-transform: capitalize;
  font-weight: 500;
}
.practice-area-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.practice-area-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--teal);
  transition: width 0.6s ease;
}
.practice-area-count {
  min-width: 40px;
  text-align: right;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
}

/* Most-cited case highlight */
.judge-most-cited {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  cursor: pointer;
  transition: all 0.2s ease;
}
.judge-most-cited:hover {
  border-color: var(--teal-glow-hex);
  box-shadow: var(--shadow);
}
.judge-most-cited-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 4px;
}
.judge-most-cited-name {
  font-size: 0.95rem;
  color: var(--teal-bright);
  font-weight: 500;
}
.judge-most-cited-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Recent cases in judge profile */
.judge-recent-cases {
  margin-top: 24px;
}
.judge-recent-cases h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 14px;
}
.judge-case-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.judge-case-item:hover {
  background: var(--surface-hover);
  border-color: var(--teal-glow-hex);
}
.judge-case-item-name {
  font-size: 0.88rem;
  color: var(--teal-bright);
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.judge-case-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  flex-shrink: 0;
}

/* Judge empty/loading */
.judge-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.judge-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ═══ Sepia theme overrides for verdict outcome badges ═══ */
[data-theme="sepia"] .verdict-outcome-badge.plaintiff {
  background: rgba(45, 100, 50, 0.15);
  color: #3A7A2E;
}
[data-theme="sepia"] .verdict-outcome-badge.defense {
  background: rgba(180, 50, 50, 0.12);
  color: #B03030;
}

/* ═══ Dark theme overrides for verdict outcome badges ═══ */
[data-theme="dark"] .verdict-outcome-badge.plaintiff {
  background: rgba(45, 138, 78, 0.25);
  color: #5ACA78;
}
[data-theme="dark"] .verdict-outcome-badge.defense {
  background: rgba(220, 53, 69, 0.2);
  color: #FF6B7A;
}
[data-theme="dark"] .verdict-outcome-badge.settled {
  background: rgba(212, 184, 106, 0.15);
  color: var(--gold);
}

/* ═══ Mobile Responsive — Verdicts & Judges ═══ */
@media (max-width: 768px) {
  .verdicts-section, .judges-section {
    padding: 60px 16px 40px;
  }
  .verdict-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .verdict-stat-number {
    font-size: 1.4rem;
  }
  .verdict-search-bar {
    flex-direction: column;
  }
  .verdict-search-input {
    min-width: unset;
  }
  .verdict-filter-select,
  .verdict-amount-input {
    width: 100%;
  }
  .verdict-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .verdict-amount {
    min-width: auto;
    text-align: left;
    font-size: 1.2rem;
  }
  .judge-search-bar {
    flex-direction: column;
  }
  .judge-profile-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .practice-area-label {
    min-width: 100px;
    font-size: 0.78rem;
  }
  .judge-case-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .judge-case-item-name {
    white-space: normal;
  }
  .verdict-top-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* Theme transitions for new sections */
.verdicts-section,
.judges-section,
.verdict-card,
.verdict-stat-card,
.judge-card,
.judge-profile,
.judge-most-cited,
.judge-case-item,
.verdict-top-list {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
