/* ── regtech.com — Design System ─── */
:root {
  /* Light mode (default) */
  --bg-primary: #fafbfd;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f3f8;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fc;
  --bg-nav: rgba(255,255,255,0.92);
  --bg-hero: linear-gradient(135deg, #0c1426 0%, #0f1d3a 40%, #132347 70%, #0a1a35 100%);
  --bg-hero-overlay: rgba(10,20,40,0.6);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-on-dark: #e2e8f0;
  --text-on-dark-muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-glow: rgba(14,165,233,0.3);
  --accent-2: #6366f1;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --nav-height: 64px;
  --max-width: 1200px;
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

[data-theme="dark"] {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1e2640;
  --bg-card: #151c2e;
  --bg-card-hover: #1a2338;
  --bg-nav: rgba(10,14,26,0.95);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #1e293b;
  --border-light: #1e293b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.5);
}

/* ── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* ── Navigation ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 0;
  font-weight: 800; font-size: 1.45rem;
  color: var(--text-primary);
  flex-shrink: 0;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.dot-halo {
  animation: halo-glow 1.5s ease-in-out infinite;
}
@keyframes halo-glow {
  0%, 100% { box-shadow: 0 0 2px #0ea5e9, 0 0 6px rgba(14,165,233,0.4); transform: scale(1); }
  50% { box-shadow: 0 0 4px #0ea5e9, 0 0 12px rgba(14,165,233,0.7), 0 0 20px rgba(14,165,233,0.3); transform: scale(1.3); }
}
.scope-ring {
  animation: scope-expand 2.2s ease-in-out infinite;
}
@keyframes scope-expand {
  0%, 100% { transform: scale(1); opacity: 0; }
  30% { opacity: 1; }
  50% { transform: scale(1.3); opacity: 1; }
  80% { opacity: 0; }
  100% { transform: scale(1.3); }
}
.nav-brand .brand-tld {
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links {
  display: flex; align-items: center; gap: 8px;
}
.nav-links a {
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown > a::after {
  content: '';
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-top: 1px;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 4px 0;
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  border-radius: 0;
}
.nav-dropdown-menu a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
.nav-dropdown-menu a .coming-soon {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-tertiary, #f0f0f0);
  color: var(--text-tertiary, #888);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

.nav-actions {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}

.nav-btn-group {
  display: flex; align-items: center; gap: 4px; height: 36px;
  flex-shrink: 0;
}
.nav-btn-group .lang-selector { display: flex; align-items: center; height: 36px; }
.nav-btn-group .lang-btn { border-radius: var(--radius-sm, 6px); border: none; background: #0047AB; color: #fff; height: 36px; padding: 0 12px; }
.nav-btn-group .lang-btn:hover { background: #003d96; }
.nav-btn-group .theme-toggle { border-radius: var(--radius-sm, 6px); border: none; background: #0047AB; color: #fff; width: 36px; height: 36px; }
.nav-btn-group .theme-toggle:hover { background: #003d96; }
.nav-btn-group .nav-login-btn { border-radius: var(--radius-sm, 6px); border: none; background: #0047AB; color: #fff; height: 36px; padding: 0 18px; display: inline-flex; align-items: center; }
.nav-btn-group .nav-login-btn:hover { background: #003d96; opacity: 1; }
.nav-btn-group .nav-login-btn.logged-in { background: var(--bg-nav, #0f172a); color: #fff; border: none; }
.nav-btn-group .nav-login-btn.logged-in:hover { background: var(--bg-tertiary, #1e293b); color: #fff; }

/* Language Selector */
.lang-selector {
  position: relative;
}
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px;
  height: 36px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}
.lang-btn:hover { border-color: var(--accent); }
.lang-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  display: none; z-index: 100;
}
.lang-dropdown.open { display: block; }
.lang-dropdown button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  background: none; border: none;
  color: var(--text-primary);
  font-size: 0.87rem;
  text-align: left;
}
.lang-dropdown button:hover { background: var(--bg-tertiary); }
.lang-dropdown button.selected { color: var(--accent); font-weight: 600; }

/* Member Login Button */
.nav-login-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 18px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent, #0047AB);
  color: #fff;
  font-size: 0.82rem; font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-login-btn:hover { opacity: 0.9; }
.nav-login-btn.logged-in {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.nav-login-btn.logged-in:hover { border-color: var(--accent); color: var(--accent); }

/* === LOGIN-HIDE (temporary, SEO/public phase 2026-07-10) ===
   Hides the member Login entry point site-wide while the site is fully public
   for search crawling. Reversible: delete this single block to restore login. */
.nav-login-btn { display: none !important; }
/* === END LOGIN-HIDE === */
.member-avatar-sm {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent, #0047AB); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
}

/* Theme Toggle */
.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  background: none; border: none;
  color: var(--text-primary); font-size: 1.3rem;
}

/* ── Hero Section ─── */
.hero {
  position: relative;
  min-height: 57vh;
  background: var(--bg-hero);
  overflow: hidden;
  display: flex; align-items: center;
  padding-top: var(--nav-height);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(14,165,233,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(99,102,241,0.06) 0%, transparent 50%);
}
.hero-grid {
  display: none;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: rgba(14,165,233,0.1);
  border: 1px solid rgba(14,165,233,0.2);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}
.hero-badge .pulse {
  width: 8px; height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 700px;
}
.hero h1 .accent { color: var(--accent); }
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-on-dark-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 36px;
}
.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
}
.hero-stat {
  text-align: left;
}
.hero-stat .number {
  font-size: 1.8rem; font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hero-stat .label {
  font-size: 0.8rem; color: var(--text-on-dark-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 500;
}

/* Light mode hero overrides */
:root:not([data-theme="dark"]) .hero {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 40%, #dfe7f0 70%, #edf1f7 100%);
}
:root:not([data-theme="dark"]) .hero::before {
  background: radial-gradient(ellipse at 30% 50%, rgba(14,165,233,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(99,102,241,0.04) 0%, transparent 50%);
}
:root:not([data-theme="dark"]) .hero h1 { color: #0f172a; }
:root:not([data-theme="dark"]) .hero-subtitle { color: #475569; }
:root:not([data-theme="dark"]) .hero-stat .number { color: #0f172a; }
:root:not([data-theme="dark"]) .hero-stat .label { color: #64748b; }
:root:not([data-theme="dark"]) .hero-badge {
  background: rgba(14,165,233,0.08);
  border-color: rgba(14,165,233,0.15);
}
:root:not([data-theme="dark"]) .hero-articles {
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.08) !important;
  backdrop-filter: none !important;
}
:root:not([data-theme="dark"]) .hero-articles a {
  background: rgba(0,0,0,0.03) !important;
}
:root:not([data-theme="dark"]) .hero-articles a:hover {
  background: rgba(0,0,0,0.06) !important;
}
:root:not([data-theme="dark"]) .hero-articles a div:first-child {
  color: #64748b !important;
}
:root:not([data-theme="dark"]) .hero-articles a div:last-child {
  color: #0f172a !important;
}

/* Light mode Global Radar overrides */
:root:not([data-theme="dark"]) .map-section {
  background: var(--bg-tertiary);
}
:root:not([data-theme="dark"]) .map-title { color: var(--text-primary); }
:root:not([data-theme="dark"]) .pulse-subtitle { color: var(--text-secondary); }
:root:not([data-theme="dark"]) .region-btn {
  background: rgba(0,0,0,0.04);
  border-color: var(--border);
  color: var(--text-secondary);
}
:root:not([data-theme="dark"]) .region-btn:hover {
  background: rgba(0,0,0,0.08);
  color: var(--text-primary);
}
:root:not([data-theme="dark"]) .region-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
:root:not([data-theme="dark"]) .map-viewport {
  background-color: #0f172a !important;
  border-color: var(--border);
}
:root:not([data-theme="dark"]) .pulse-mobile-search input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
:root:not([data-theme="dark"]) .pulse-mobile-search input::placeholder { color: var(--text-muted); }
:root:not([data-theme="dark"]) .pulse-mobile-item {
  color: var(--text-primary);
  border-bottom-color: var(--border-light);
}
:root:not([data-theme="dark"]) .pulse-mobile-item:hover,
:root:not([data-theme="dark"]) .pulse-mobile-item.active {
  background: rgba(14,165,233,0.06);
}
:root:not([data-theme="dark"]) .pulse-mobile-item-count {
  color: var(--text-secondary);
}

/* ── Map Section ─── */
.map-section {
  position: relative;
  background: #0f172a;
  padding: 40px 0 60px;
  margin-top: -1px;
}
.map-controls {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.map-title {
  color: var(--text-on-dark);
  font-size: 1.1rem; font-weight: 600;
}
.region-filters {
  display: flex; gap: 6px;
}
.region-btn {
  padding: 7px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  color: var(--text-on-dark-muted);
  font-size: 0.83rem; font-weight: 500;
  transition: all var(--transition);
}
.region-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.region-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.map-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
.map-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: url('../img/map-base.png') center/cover no-repeat;
  border: 1px solid rgba(255,255,255,0.06);
}
.map-svg-wrap {
  position: absolute; inset: 0;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.map-svg-wrap svg {
  width: 100%; height: 100%;
}

/* Map hotspot dots */
.map-dot {
  position: absolute;
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  z-index: 10;
}
.map-dot::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.3;
  animation: dot-pulse 3s ease infinite;
}
.map-dot:hover {
  transform: translate(-50%, -50%) scale(1.6);
  z-index: 20;
}
.map-dot.dimmed {
  opacity: 0.12;
}
.map-dot .dot-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; font-weight: 700;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(2.2); opacity: 0; }
}

/* Map tooltip */
.map-tooltip {
  position: fixed;
  padding: 16px 20px;
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
  min-width: 220px;
}
.map-tooltip.visible { opacity: 1; transform: translateY(0); }
.map-tooltip .tt-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.map-tooltip .tt-flag { font-size: 1.4rem; }
.map-tooltip .tt-name { font-weight: 700; font-size: 1rem; }
.map-tooltip .tt-region {
  font-size: 0.7rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 600;
}
.map-tooltip .tt-stat {
  display: flex; justify-content: space-between;
  padding: 4px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.map-tooltip .tt-stat-label { color: var(--text-on-dark-muted); }
.map-tooltip .tt-stat-value { font-weight: 600; }
.map-tooltip .tt-regulators {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem; color: var(--text-on-dark-muted);
}
.map-tooltip .tt-cta {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

/* ── News Feed Section ─── */
.section {
  padding: 80px 24px;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap; gap: 16px;
}
.section-title {
  font-size: 1.6rem; font-weight: 700;
  color: var(--text-primary);
}
.section-subtitle {
  font-size: 0.95rem; color: var(--text-secondary);
  margin-top: 6px;
}
.section-link {
  font-size: 0.9rem; font-weight: 600;
  color: var(--accent);
  display: flex; align-items: center; gap: 4px;
}

/* Article Cards */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.article-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.article-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.article-category {
  padding: 3px 10px;
  background: rgba(14,165,233,0.08);
  color: var(--accent);
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: 100px;
}
.article-jurisdiction {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.article-card h3 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.article-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.article-date {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Topic Pills ─── */
.topic-section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 40px;
}
.topic-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.topic-search-wrap {
  position: relative; flex: 0 0 260px;
}
.topic-search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-muted); pointer-events: none;
}
.topic-search {
  width: 100%; padding: 8px 12px 8px 36px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: 100px; font-size: 0.82rem; color: var(--text-primary);
  font-family: inherit; transition: border-color var(--transition);
}
.topic-search:focus { outline: none; border-color: var(--accent); }
.topic-search::placeholder { color: var(--text-muted); }
.topic-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.topic-pill {
  padding: 6px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.topic-pill:hover, .topic-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.topic-pill.hidden { display: none; }
.topic-more-btn {
  padding: 6px 16px;
  background: transparent; border: 1px dashed var(--border);
  border-radius: 100px; font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.topic-more-btn:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) {
  .topic-header { flex-direction: column; align-items: stretch; }
  .topic-search-wrap { flex: 1 1 100%; }
}

/* ── Footer ─── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 24px 30px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 12px;
  max-width: 300px;
}
.footer h4 {
  font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer ul li { margin-bottom: 10px; }
.footer ul a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer ul a:hover { color: var(--text-primary); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-social {
  display: flex; gap: 16px; align-items: center;
}
.footer-social a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-social a:hover {
  color: var(--text-primary);
}

/* ── Help Bot Tab ─── */
.help-tab {
  position: fixed;
  right: 12px;
  bottom: 24px;
  z-index: 1000;
  cursor: pointer;
  background: none;
  padding: 0;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
}
.help-tab:hover {
  transform: scale(1.1);
}
.help-tab-icon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.help-tab-label {
  text-transform: uppercase;
}

/* ── AI Chatbox ── */
.chatbox-overlay {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 370px;
  max-width: calc(100vw - 40px);
  height: 520px;
  max-height: calc(100vh - 40px);
  z-index: 1001;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  display: none;
  flex-direction: column;
  background: #fff;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}
.chatbox-overlay.open {
  display: flex;
}
.chatbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #0047AB;
  color: #fff;
  flex-shrink: 0;
}
.chatbox-header-title {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chatbox-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chatbox-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s;
}
.chatbox-close:hover {
  background: rgba(255,255,255,0.2);
}
.chatbox-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}
.chatbox-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-wrap: break-word;
}
.chatbox-msg.bot {
  align-self: flex-start;
  background: #e2e8f0;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}
.chatbox-msg.user {
  align-self: flex-end;
  background: #0047AB;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chatbox-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}
.chatbox-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 0.88rem;
  outline: none;
  background: #f8fafc;
  color: #1e293b;
  transition: border-color 0.15s;
}
.chatbox-input:focus {
  border-color: #0047AB;
}
.chatbox-input::placeholder {
  color: #94a3b8;
}
.chatbox-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #0047AB;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.chatbox-send:hover {
  opacity: 0.85;
}
.chatbox-send svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

@media (max-width: 480px) {
  .chatbox-overlay {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ── Subpage Styles ─── */
.page-header {
  padding: calc(var(--nav-height) + 60px) 24px 60px;
  background: var(--bg-hero);
  text-align: center;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; color: #fff;
  margin-bottom: 12px;
}
.page-header p {
  font-size: 1.1rem;
  color: var(--text-on-dark-muted);
  max-width: 600px;
  margin: 0 auto;
}
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}
.page-content h2 {
  font-size: 1.5rem; font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 16px;
}
.page-content h2:first-child { margin-top: 0; }
.page-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.page-content ul {
  margin: 16px 0;
  padding-left: 24px;
  list-style: disc;
}
.page-content li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}

/* Stat cards for subpages */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}
.stat-card .number {
  font-size: 2rem; font-weight: 800;
  color: var(--accent);
}
.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.feature-icon {
  width: 48px; height: 48px;
  background: rgba(14,165,233,0.08);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CTA section */
.cta-section {
  background: var(--bg-hero);
  padding: 80px 24px;
  text-align: center;
}
.cta-section h2 {
  font-size: 2rem; font-weight: 800;
  color: #fff; margin-bottom: 12px;
}
.cta-section p {
  color: var(--text-on-dark-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: 500px; margin-left: auto; margin-right: auto;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem; font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
  color: #fff;
}

/* ── Jurisdiction Detail Panel ─── */
.jurisdiction-panel {
  position: fixed;
  top: 0; right: -480px;
  width: 460px; max-width: 90vw;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 24px;
}
.jurisdiction-panel.open { right: 0; }
.jurisdiction-panel .panel-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--text-secondary);
}
.panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.panel-overlay.open { opacity: 1; pointer-events: auto; }

/* ── Admin CMS ─── */
.admin-layout {
  display: flex; min-height: 100vh;
  padding-top: var(--nav-height);
}
.admin-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 20px;
  flex-shrink: 0;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem; font-weight: 500;
  margin-bottom: 4px;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: var(--bg-tertiary); color: var(--text-primary);
}
.admin-main {
  flex: 1; padding: 24px 32px;
  min-width: 0;
}
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.admin-header h1 { font-size: 1.5rem; font-weight: 700; }

/* Form elements */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea { min-height: 200px; resize: vertical; }
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 14px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
.data-table tr:hover td { background: var(--bg-tertiary); }
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase;
}
.status-badge.published { background: rgba(16,185,129,0.1); color: var(--accent-green); }
.status-badge.draft { background: rgba(245,158,11,0.1); color: var(--accent-amber); }

/* ── Responsive ─── */
@media (max-width: 768px) {
  .nav-inner { padding: 0 12px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    padding: 8px;
  }
  .nav-brand { font-size: 1.15rem; }
  .nav-btn-group { gap: 2px; height: 26px; }
  .nav-btn-group .lang-btn { height: 26px; padding: 0 6px; font-size: 0.7rem; }
  .nav-btn-group .theme-toggle { width: 26px; height: 26px; font-size: 0.75rem; }
  .nav-btn-group .nav-login-btn { height: 26px; padding: 0 8px; font-size: 0.7rem; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 20px; }
  .hero-stat .number { font-size: 1.4rem; }
  .map-viewport { aspect-ratio: 4/3; }
  .region-filters { flex-wrap: wrap; }
  .article-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 48px 16px; }
  .cta-section { padding: 60px 16px; }
  .newsletter-form { flex-direction: column; padding: 0; max-width: 100%; }
  .newsletter-form input { width: 100%; }
  .cta-btn { width: 100%; justify-content: center; padding: 14px 24px; }
  .admin-sidebar { display: none; }
  .jurisdiction-panel { width: 100%; right: -100%; }
}

/* RTL support */
[dir="rtl"] .nav-inner { direction: rtl; }
[dir="rtl"] .hero-content { text-align: right; }
[dir="rtl"] .article-card { text-align: right; }
[dir="rtl"] .jurisdiction-panel { right: auto; left: -480px; border-left: none; border-right: 1px solid var(--border); }
[dir="rtl"] .jurisdiction-panel.open { left: 0; }

/* ── Animations ─── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.animate-in { animation: fadeIn 0.5s ease both; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* Newsletter */
.newsletter-form {
  display: flex; gap: 8px;
  max-width: 420px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 16px;
}
.newsletter-form input {
  flex: 1; padding: 12px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  color: #fff; font-size: 0.9rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form input:focus { outline: none; border-color: var(--accent); }
