/* RAT Fleet — theme families (body.theme-{theme_family}) */
/* Per-domain overrides can be set inline on <body> from Jinja. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--theme-body-font, "Source Serif 4", serif);
  background: var(--theme-primary, #0a0a0a);
  color: rgba(255, 255, 255, 0.92);
}

h1, h2, h3 {
  font-family: var(--theme-heading-font, "Source Serif 4", serif);
  font-weight: 600;
}

a {
  color: var(--theme-accent);
}

.accent {
  color: var(--theme-accent);
}

.accent-border {
  border-left: 3px solid var(--theme-accent);
}

.btn-primary {
  background: var(--theme-accent);
  color: var(--theme-primary);
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.hero {
  background-image: var(--theme-hero-bg);
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 38vh;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--theme-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
}

.hero-content h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.hero-content .subhead {
  font-size: 1.2rem;
  color: var(--theme-accent);
  margin: 0.25rem 0;
}

.hero-content .subhead-2 {
  font-size: 1rem;
  opacity: 0.85;
  margin: 0.5rem 0 0;
}

/* ── Legal ── */
.theme-dark_justice {
  --theme-primary: #0d1b2a;
  --theme-accent: #b8860b;
  --theme-overlay: rgba(13, 27, 42, 0.82);
  --theme-heading-font: "Playfair Display", serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Technical ── */
.theme-blueprint_precision {
  --theme-primary: #0a1628;
  --theme-accent: #4a9eff;
  --theme-overlay: rgba(10, 22, 40, 0.82);
  --theme-heading-font: "Rajdhani", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Education ── */
.theme-scholarly_warm {
  --theme-primary: #2c1810;
  --theme-accent: #d4a843;
  --theme-overlay: rgba(44, 24, 16, 0.82);
  --theme-heading-font: "Libre Baskerville", serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Security ── */
.theme-tactical_dark {
  --theme-primary: #0d0d0d;
  --theme-accent: #cc0000;
  --theme-overlay: rgba(13, 13, 13, 0.82);
  --theme-heading-font: "Oswald", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Finance ── */
.theme-executive_slate {
  --theme-primary: #1c2333;
  --theme-accent: #7eb8c9;
  --theme-overlay: rgba(28, 35, 51, 0.82);
  --theme-heading-font: "Montserrat", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Real estate ── */
.theme-property_copper {
  --theme-primary: #1e1e24;
  --theme-accent: #b87333;
  --theme-overlay: rgba(30, 30, 36, 0.82);
  --theme-heading-font: "Raleway", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Personal (per-brand) ── */
.theme-personal_scottepage {
  --theme-primary: #162032;
  --theme-accent: #5fa8d3;
  --theme-overlay: rgba(22, 32, 50, 0.82);
  --theme-heading-font: "IBM Plex Serif", serif;
  --theme-body-font: "Source Serif 4", serif;
}

.theme-personal_sigma {
  --theme-primary: #0f0f0f;
  --theme-accent: #e8c547;
  --theme-overlay: rgba(15, 15, 15, 0.82);
  --theme-heading-font: "Cinzel", serif;
  --theme-body-font: "Source Serif 4", serif;
}

.theme-personal_power {
  --theme-primary: #1a1a2e;
  --theme-accent: #c9a84c;
  --theme-overlay: rgba(26, 26, 46, 0.82);
  --theme-heading-font: "Cormorant Garamond", serif;
  --theme-body-font: "Source Serif 4", serif;
}

.theme-personal_duke {
  --theme-primary: #1a0a00;
  --theme-accent: #ff6600;
  --theme-overlay: rgba(26, 10, 0, 0.82);
  --theme-heading-font: "Black Han Sans", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
}

.theme-personal_yashua {
  --theme-primary: #0a0a14;
  --theme-accent: #9b59b6;
  --theme-overlay: rgba(10, 10, 20, 0.82);
  --theme-heading-font: "Cinzel Decorative", serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Health ── */
.theme-clean_trust {
  --theme-primary: #0f2027;
  --theme-accent: #2ecc71;
  --theme-overlay: rgba(15, 32, 39, 0.82);
  --theme-heading-font: "Nunito", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Psychology ── */
.theme-deep_mind {
  --theme-primary: #1a0a2e;
  --theme-accent: #9b59b6;
  --theme-overlay: rgba(26, 10, 46, 0.82);
  --theme-heading-font: "Abril Fatface", serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Business ── */
.theme-professional_clean {
  --theme-primary: #1c2b3a;
  --theme-accent: #3498db;
  --theme-overlay: rgba(28, 43, 58, 0.82);
  --theme-heading-font: "Inter", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── Crypto ── */
.theme-digital_edge {
  --theme-primary: #0d0d0d;
  --theme-accent: #f7931a;
  --theme-overlay: rgba(13, 13, 13, 0.82);
  --theme-heading-font: "Exo 2", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── RAT core brand ── */
/* ── Clean White (Police & Security, etc.) ── */
.theme-clean_white {
  --theme-primary: #ffffff;
  --theme-accent: #1a3a5c;
  --theme-overlay: rgba(255, 255, 255, 0.92);
  --theme-heading-font: "Oswald", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
  --text-primary: #1a1a1a;
  --text-secondary: rgba(26, 26, 26, 0.7);
  --text-tertiary: rgba(26, 26, 26, 0.45);
  --accent-color: #1a3a5c;
  --hero-title-silver: #1a1a1a;
  --status-value-blue: #1a3a5c;
}
.theme-clean_white .welcome-card,
.theme-clean_white .message.assistant .message-content,
.theme-clean_white .sidebar {
  background: rgba(240, 243, 247, 0.95);
  color: #1a1a1a;
}
.theme-clean_white .message.user .message-content {
  background: #1a3a5c;
  color: #ffffff;
}
.theme-clean_white .input-area input {
  background: #f0f3f7;
  color: #1a1a1a;
  border: 1px solid #ccd3dc;
}
.theme-clean_white .input-area input::placeholder {
  color: rgba(26, 26, 26, 0.45);
}
.theme-clean_white .sidebar-header {
  color: #1a3a5c;
}
.theme-clean_white .sidebar-topic h3 {
  color: #1a1a1a;
}
.theme-clean_white .sidebar-topic p {
  color: rgba(26, 26, 26, 0.6);
}
.theme-clean_white .sidebar-footer,
.theme-clean_white .sidebar-copyright {
  color: rgba(26, 26, 26, 0.5);
}
.theme-clean_white .quick-question-btn {
  background: #f0f3f7;
  color: #1a3a5c;
  border: 1px solid #ccd3dc;
}
.theme-clean_white .quick-question-btn:hover {
  background: #1a3a5c;
  color: #ffffff;
}
.theme-clean_white .report-btn {
  background: #f0f3f7;
  color: #1a3a5c;
  border: 1px solid #ccd3dc;
}
.theme-clean_white .report-btn-primary {
  background: #1a3a5c;
  color: #ffffff;
}
.theme-clean_white .welcome-guidance-label {
  color: #1a3a5c;
}
.theme-clean_white .welcome-brand-line {
  color: #1a3a5c;
}

.theme-rat_brand {
  --theme-primary: #0a0a0a;
  --theme-accent: #00ff88;
  --theme-overlay: rgba(10, 10, 10, 0.82);
  --theme-heading-font: "Space Grotesk", sans-serif;
  --theme-body-font: "Source Serif 4", serif;
}

/* ── RAT Hero Section ── */
.rat-hero {
  background: var(--theme-primary, #1a0a2e);
  background: linear-gradient(135deg, var(--theme-primary, #1a0a2e) 0%, color-mix(in srgb, var(--theme-primary, #1a0a2e), #000 30%) 100%);
  padding: 3rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--theme-accent, #9b59b6);
}
.rat-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(155,89,182,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.rat-hero-content { position: relative; z-index: 1; }
.rat-hero-icon { font-size: 3.5rem; margin-bottom: 0.5rem; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4)); }
.rat-hero-title {
  font-family: var(--theme-heading-font, 'Abril Fatface', serif);
  font-size: 2.2rem;
  color: #fff;
  margin: 0.3rem 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.rat-hero-sub {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  margin-top: 0.3rem;
  font-family: var(--theme-body-font, 'Source Serif 4', serif);
}
.examples-area { margin-top: 0.75rem; }
.examples-label { color: var(--theme-accent, #9b59b6); font-size: 0.85rem; margin-bottom: 0.4rem; }
.examples-inline { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.example-btn {
  background: transparent;
  border: 1px solid var(--theme-accent, #9b59b6);
  color: var(--theme-accent, #9b59b6);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.example-btn:hover { background: var(--theme-accent, #9b59b6); color: #fff; }
.custom-app-banner { margin-top: 1.5rem; }
.banner-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  color: var(--theme-accent, #9b59b6);
  font-size: 0.9rem;
}
.banner-body { display: none; padding: 1rem; background: rgba(0,0,0,0.3); border-radius: 0 0 8px 8px; }
.banner-chevron { transition: transform 0.3s; }
.custom-footer {
  margin-top: 1.5rem; padding: 1rem; text-align: center;
  font-size: 0.8rem; color: rgba(255,255,255,0.5);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.custom-footer a { color: var(--theme-accent, #9b59b6); text-decoration: none; }
.custom-footer a:hover { text-decoration: underline; }
.coffee-link { display: inline-block; margin-top: 0.5rem; }
