/* Bank Statement Compiler — Corporate trust theme (navy / slate / gold) */
:root,
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-surface: rgba(11, 31, 51, 0.94);
  --card: rgba(15, 36, 58, 0.92);
  --card-2: rgba(10, 26, 42, 0.96);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #c9a227;
  --accent-2: #1e4d7b;
  --accent-soft: #d4b84a;
  --danger: #f87171;
  --warn: #fbbf24;
  --success: #34d399;
  --border: rgba(201, 162, 39, 0.28);
  --border-subtle: rgba(148, 163, 184, 0.16);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  --radius: var(--ainna-radius-card, 16px);
  --radius-compact: var(--ainna-radius-card-compact, 12px);
  --xlsx-green: #22c55e;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --map-ocean-a: #0a1628;
  --map-ocean-b: #050d16;
  --map-pulse: #c9a227;
  --crayon-pink: #ff6b9d;
  --crayon-blue: #4ecdc4;
  --crayon-mint: #95e1d3;
  --crayon-lavender: #dda0dd;
  --crayon-peach: #ffcba4;
  --theme-dur: 0.45s;
  --trust-line: rgba(201, 162, 39, 0.45);
}

[data-theme="light"] {
  --bg: #fafaf8;
  --bg-surface: rgba(255, 255, 255, 0.94);
  --card: rgba(255, 255, 255, 0.96);
  --card-2: rgba(241, 245, 249, 0.98);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f3d68;
  --accent-2: #1e4d7b;
  --accent-soft: #1e4d7b;
  --danger: #dc2626;
  --warn: #b45309;
  --success: #047857;
  --border: rgba(15, 61, 104, 0.16);
  --border-subtle: rgba(100, 116, 139, 0.14);
  --shadow: 0 14px 40px rgba(15, 61, 104, 0.1);
  --map-ocean-a: #e8eef5;
  --map-ocean-b: #dce6f0;
  --map-pulse: #0f3d68;
  --trust-line: rgba(15, 61, 104, 0.2);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--theme-dur) ease, color var(--theme-dur) ease;
}

/*
 * No body padding-bottom here — the shared footer cutout dock owns bottom
 * clearance (ainna-page-footer--cutout padding-bottom + cutout row).
 * Extra body pb lifts the footer cutout ~96px above the fixed cyberpunk
 * globe / cookie hole when consent is already set.
 */
body { position: relative; padding-bottom: 0; }

/* Background layers — night: aurora borealis · day: crayon pastel (AINNA-style) */
.cosmic-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.br-aurora,
.br-crayon {
  position: absolute;
  inset: 0;
  transition: opacity var(--theme-dur) ease;
}

.br-aurora {
  opacity: 1;
  overflow: hidden;
}

[data-theme="light"] .br-aurora { opacity: 0; }

.br-aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.58;
  animation: brAuroraFloat 22s infinite ease-in-out;
  mix-blend-mode: screen;
  will-change: transform;
}

.br-aurora-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, #ff6b9d, #8b5cf6);
  top: -20%;
  left: -10%;
  animation-duration: 25s;
}

.br-aurora-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #00f5ff, #0066ff);
  top: 50%;
  right: -15%;
  animation-delay: -5s;
  animation-duration: 30s;
}

.br-aurora-3 {
  width: 700px;
  height: 700px;
  background: linear-gradient(135deg, #8b5cf6, #ff6b9d);
  bottom: -25%;
  left: 30%;
  animation-delay: -10s;
  animation-duration: 28s;
}

.br-aurora-4 {
  width: 450px;
  height: 450px;
  background: linear-gradient(135deg, #0066ff, #00f5ff);
  top: 30%;
  left: 20%;
  animation-delay: -15s;
  animation-duration: 32s;
}

@keyframes brAuroraFloat {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(10%, 15%) scale(1.1) rotate(90deg); }
  50% { transform: translate(-5%, 10%) scale(0.9) rotate(180deg); }
  75% { transform: translate(15%, -10%) scale(1.05) rotate(270deg); }
}

.br-crayon {
  opacity: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 107, 157, 0.07) 0%, transparent 52%),
    radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.07) 0%, transparent 52%),
    radial-gradient(circle at 55% 18%, rgba(221, 160, 221, 0.06) 0%, transparent 48%),
    radial-gradient(circle at 12% 88%, rgba(255, 203, 164, 0.08) 0%, transparent 45%);
}

[data-theme="light"] .br-crayon { opacity: 1; }

.br-crayon-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.42;
  animation: brCrayonDrift 20s infinite ease-in-out;
  will-change: transform;
}

.br-crayon-1 {
  width: 420px;
  height: 420px;
  background: var(--crayon-pink);
  top: -8%;
  left: -6%;
  animation-duration: 24s;
}

.br-crayon-2 {
  width: 360px;
  height: 360px;
  background: var(--crayon-blue);
  top: 42%;
  right: -8%;
  animation-delay: -4s;
  animation-duration: 26s;
}

.br-crayon-3 {
  width: 480px;
  height: 480px;
  background: var(--crayon-mint);
  bottom: -12%;
  left: 24%;
  animation-delay: -9s;
  animation-duration: 22s;
}

.br-crayon-4 {
  width: 300px;
  height: 300px;
  background: var(--crayon-lavender);
  top: 18%;
  left: 58%;
  animation-delay: -13s;
  animation-duration: 28s;
}

.br-crayon-5 {
  width: 340px;
  height: 340px;
  background: var(--crayon-peach);
  bottom: 8%;
  right: 18%;
  animation-delay: -6s;
  animation-duration: 30s;
}

@keyframes brCrayonDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4%, -6%) scale(1.04); }
  66% { transform: translate(-5%, 4%) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  .br-aurora-blob,
  .br-crayon-blob { animation: none; }
}

@media (max-width: 768px) {
  .br-aurora-blob {
    filter: blur(56px);
    opacity: 0.45;
  }

  .br-crayon-blob {
    filter: blur(48px);
    opacity: 0.34;
  }
}

.shell {
  position: relative;
  z-index: 1;
}

/* ── Supported Banks Grid ── */
.br-supported-banks {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px 32px;
}

.br-supported-banks-inner {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-compact);
  padding: 20px 24px 18px;
}

.br-supported-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 14px;
}

.br-bank-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.br-bank-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 8px;
  background: var(--card-2);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}

.br-bank-item:hover {
  border-color: var(--border);
  background: var(--card);
}

.br-bank-logo {
  width: 28px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.br-bank-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.br-bank-item[data-type="ewallet"] .br-bank-label {
  color: var(--accent);
}

.br-bank-item[data-type="cc"] .br-bank-label {
  color: var(--danger);
}

.br-supported-footnote {
  font-size: 0.7rem;
  color: var(--muted);
  margin: 12px 0 0;
  text-align: center;
}

@media (max-width: 600px) {
  .br-supported-banks { padding: 0 12px 24px; }
  .br-supported-banks-inner { padding: 14px 14px 12px; }
  .br-bank-item { padding: 3px 8px 3px 4px; }
  .br-bank-logo { width: 24px; height: 16px; }
  .br-bank-label { font-size: 0.7rem; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--theme-dur) ease, border-color var(--theme-dur) ease;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.topbar-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-crumb a {
  color: var(--accent-soft);
  text-decoration: none;
}

.topbar-crumb a:hover { text-decoration: underline; }

.topbar-crumb .crumb-current { color: var(--text); font-weight: 500; }

.desktop-only { display: flex; }

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #1e4d7b 0%, #0b1f33 55%, #c9a227 160%);
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 14px rgba(11, 31, 51, 0.35);
  letter-spacing: 0.02em;
}

[data-theme="light"] .logo-mark {
  background: linear-gradient(145deg, #0f3d68 0%, #1e4d7b 70%);
  box-shadow: 0 4px 14px rgba(15, 61, 104, 0.2);
}

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

.brand-text strong { font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-text small { color: var(--muted); font-size: 0.74rem; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.topbar-right .ainna-boost-toggle {
  position: static;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  font-size: 12px;
}

/* Issue? — clear label; admin gets subtle green pulse when unread */
.br-issue-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-2) 65%, transparent);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.br-issue-label {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1;
}

.br-issue-btn:hover,
.br-issue-btn:focus-visible {
  border-color: var(--border);
  background: var(--card-2);
  box-shadow: 0 2px 10px var(--border-subtle);
}

.br-issue-btn:hover .br-issue-label,
.br-issue-btn:focus-visible .br-issue-label {
  color: var(--accent-soft);
}

.br-issue-btn--has-msg .br-issue-label {
  color: var(--text);
}

.br-issue-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--success) 35%, transparent);
  animation: brPulse 1.8s ease-out infinite;
}

/* Hero section issue button */
.hero-content .br-issue-btn {
  margin-top: 16px;
}

.br-issue-pulse.hidden {
  display: none !important;
}

@keyframes brIssuePulse {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.25);
  }
  50% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
  }
}

/* Compact toggle: hide hero + banks overview */
.br-compact-toggle {
  background:none;
  border:1px solid var(--color-border,#333);
  border-radius:50%;
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:16px;
  color:var(--color-text,inherit);
  margin-left:6px;
  flex-shrink:0;
  transition: background .2s, border-color .2s;
}
.br-compact-toggle:hover {
  background:var(--card-hover,rgba(255,255,255,.06));
  border-color:var(--accent);
}
.br-hero-hidden .br-hero,
.br-hero-hidden .br-supported-banks,
.br-hero-hidden .ainna-semicon-promo-strip,
.br-hero-hidden .ainna-edgeai-promo-strip,
.br-hero-hidden .ainna-ci-promo-strip,
.br-hero-hidden .ainna-bioresearch-promo-strip {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .br-issue-pulse {
    animation: none;
    opacity: 0.85;
  }
}

.br-msg-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 18, 31, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.br-msg-overlay.hidden {
  display: none !important;
}

.br-msg-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 20px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

.br-msg-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.br-msg-close:hover {
  color: var(--text);
  background: var(--border-subtle);
}

.br-msg-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.br-msg-lead {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.br-msg-hint {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

#brMsgForm textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
}

#brMsgForm textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-subtle);
}

.tagline {
  font-family: var(--font-mono);
  color: var(--accent-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.tagline strong { font-weight: 600; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 18px var(--border-subtle);
  transform: translateY(-1px);
}

.theme-toggle-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-toggle-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border);
}

[data-theme="light"] .theme-toggle-track {
  background: linear-gradient(135deg, #e8e4f8, #d4e8df);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.45);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle.is-night .theme-toggle-thumb { transform: translateX(20px); }

/* Override ainna-hub .hero (style.min.css uses min-height:100vh !important) */
[data-bank-recompiler="1"] .hero,
html[data-bank-recompiler="1"] .hero {
  position: relative;
  display: block;
  min-height: auto !important;
  height: auto !important;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 20px !important;
  overflow: visible !important;
  overflow-x: clip;
  background: transparent !important;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  text-align: left;
}

[data-theme="dark"][data-bank-recompiler="1"] .hero,
html[data-theme="dark"][data-bank-recompiler="1"] .hero {
  background: transparent !important;
}

.br-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
}

.hero-content { min-width: 0; }

.hero-visual { min-width: 0; max-width: 100%; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

.hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}

.hero-accent {
  color: var(--accent-soft);
  font-weight: 700;
}

/* Compact SME owner layout — less chrome, one column */
.br-clean .br-hero--compact {
  padding: 20px 20px 8px !important;
  max-width: 640px;
}

.br-clean .br-hero-inner--single {
  display: block;
  grid-template-columns: none;
}

.br-clean .hero h1 {
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  margin-bottom: 8px;
}

.br-clean .lead {
  font-size: 1rem;
  line-height: 1.5;
  max-width: 36em;
  margin: 0 0 12px;
  color: var(--muted);
}

.br-clean .hero-trust-one {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.br-clean .hero-trust-one strong {
  color: var(--text);
  font-weight: 600;
}

/* Hero SLA — single link opens popup (no cards) */
.br-hero-sla-line {
  margin: 12px 0 0;
  text-align: left;
}
.br-hero-sla-line .br-sla-link {
  margin-left: 0;
  font-size: 0.84rem;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  color: var(--muted);
  text-decoration: none;
}
.br-hero-sla-line .br-sla-link:hover { color: var(--accent); }

/* Live presence indicator (top bar + compact) */
.br-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(16, 185, 129, 0.06));
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.12);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.2;
  width: fit-content;
  max-width: 100%;
  flex-shrink: 0;
}

/* Top bar placement — compact pill next to day/night toggle */
.topbar-right .br-live-indicator--topbar,
.br-live-indicator--topbar {
  margin-top: 0;
  margin-right: 2px;
  padding: 5px 10px 5px 8px;
  font-size: 0.78rem;
  height: 34px;
  box-sizing: border-box;
}

.topbar-right .br-live-indicator--topbar .br-live-count {
  font-size: 0.9rem;
}

.topbar-right .br-live-indicator--topbar .br-live-text {
  font-size: 0.72rem;
}

@media (max-width: 520px) {
  .topbar-right .br-live-indicator--topbar .br-live-text {
    display: none; /* show only green dot + number on narrow screens */
  }
  .topbar-right .br-live-indicator--topbar {
    padding: 5px 8px;
    min-width: 0;
  }
}

.br-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: brLivePulse 1.8s ease-out infinite;
  flex-shrink: 0;
}

@keyframes brLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.br-live-label {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.br-live-count {
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-weight: 700;
  font-size: 0.95rem;
  color: #16a34a;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.br-live-text {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
}

html[data-theme="dark"] .br-live-indicator,
body[data-theme="dark"] .br-live-indicator,
.br-night .br-live-indicator {
  border-color: rgba(74, 222, 128, 0.4);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(15, 23, 42, 0.45));
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .br-live-count,
body[data-theme="dark"] .br-live-count,
.br-night .br-live-count {
  color: #86efac;
}

html[data-theme="dark"] .br-live-dot,
body[data-theme="dark"] .br-live-dot,
.br-night .br-live-dot {
  background: #4ade80;
}

@media (prefers-reduced-motion: reduce) {
  .br-live-dot { animation: none; }
}

.br-clean .br-panel-upload {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.br-clean .field-hint { display: none; }

.br-clean .footer--compact {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  text-align: center;
}

.br-clean .footer--compact .footer-reassure {
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-parser-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
}

.parser-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: var(--radius-compact);
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--muted);
}

.parser-chip--ai {
  border-color: rgba(34, 197, 94, 0.35);
  color: var(--xlsx-green);
  background: rgba(34, 197, 94, 0.08);
}

.trust-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px !important;
  font-size: 0.84rem;
  color: var(--muted);
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
  transform: none !important;
}

.trust-pill strong { color: var(--text); font-weight: 600; }

.trust-pill-icon { font-size: 1rem; flex-shrink: 0; }

.hero-trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--font-mono);
  padding-top: 4px;
}

.trust-stat .stat-value {
  color: var(--accent-soft);
  font-weight: 700;
  font-size: 0.95rem;
}

.trust-stat-sep { opacity: 0.45; }

/* Pipeline visual (hero right) */
.pipeline-mock {
  padding: 18px !important;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

.pipeline-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-compact);
  border: 1px solid var(--border-subtle);
  background: var(--card-2);
  min-width: 72px;
}

.pipeline-step--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--border-subtle);
}

.pipeline-step--out {
  border-color: rgba(34, 197, 94, 0.35);
}

.pipeline-step-icon { font-size: 1.1rem; }

.pipeline-step-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pipeline-arrow {
  color: var(--accent-soft);
  font-size: 0.85rem;
  opacity: 0.7;
}

.sheet-mock {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-compact);
  overflow: hidden;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.sheet-mock-row {
  display: grid;
  grid-template-columns: 0.7fr 1.4fr 0.7fr 0.8fr;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--muted);
}

.sheet-mock-row:last-child { border-bottom: none; }

.sheet-mock-head {
  background: var(--card-2);
  color: var(--accent-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.55rem;
}

.sheet-mock-row span:last-child,
.sheet-mock-row span:nth-child(4) { text-align: right; }

.bank-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.bank-chip {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--muted);
  background: var(--card-2);
}

.lead {
  margin: 0 0 12px;
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

.result-parsers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.parser-used,
.guardrail-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.parser-used {
  background: rgba(129, 140, 248, 0.12);
  color: var(--accent-soft);
}

.parser-used.ai {
  background: rgba(74, 222, 128, 0.12);
  color: var(--success);
}

.guardrail-badge {
  background: rgba(74, 222, 128, 0.1);
  color: var(--success);
}

.guardrail-badge.warn {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warn);
}

.muted { color: var(--muted); }

.br-panel {
  position: relative;
  max-width: 960px;
  margin: 0 auto 48px;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  padding: 24px;
  transition: background var(--theme-dur) ease, border-color var(--theme-dur) ease, box-shadow 0.3s ease;
}

.br-panel-upload {
  margin-top: 4px;
}

.br-panel-upload::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.br-panel-upload > * { position: relative; z-index: 1; }

.br-panel-upload.is-parsing {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--border-subtle), 0 12px 40px color-mix(in srgb, var(--accent) 18%, transparent) !important;
}

.br-panel-upload.is-success {
  border-color: rgba(34, 197, 94, 0.4) !important;
}

.compiler-dock-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.compiler-dock-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.compiler-dock-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.compiler-dock-header-row .br-issue-btn {
  margin-top: 0;
  flex-shrink: 0;
}

.compiler-terminal {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 10px 12px;
  border-radius: var(--radius-compact);
  background: var(--card-2);
  border: 1px solid var(--border-subtle);
  color: var(--muted);
  overflow-x: auto;
  white-space: nowrap;
}

.compiler-terminal-prompt {
  color: var(--accent-soft);
  margin-right: 8px;
}

.compiler-terminal-line { color: var(--text); }

.compiler-terminal.is-parsing .compiler-terminal-line {
  color: var(--warn);
}

.compiler-terminal.is-success .compiler-terminal-line {
  color: var(--xlsx-green);
}

.rules-accordion {
  margin: 20px 0 0;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--card-2);
  overflow: hidden;
}

.rules-accordion summary {
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.rules-accordion summary::-webkit-details-marker { display: none; }

.rules-accordion summary::before {
  content: '▸ ';
  color: var(--accent);
  font-size: 0.75rem;
}

.rules-accordion[open] summary::before { content: '▾ '; }

.rules-accordion[open] summary {
  border-bottom: 1px solid var(--border-subtle);
}

.rules-accordion ul {
  margin: 0;
  padding: 12px 14px 14px 32px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }

label { font-size: 0.9rem; font-weight: 500; }
label .req { color: var(--danger); margin-left: 3px; }
label .optional { color: var(--muted); font-weight: 400; font-size: 0.82rem; margin-left: 6px; }

.field-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

input[type="text"],
input[type="tel"],
input[type="password"] {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background var(--theme-dur) ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-subtle);
}

.file-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-compact);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.compiler-dropzone .dropzone-icon {
  display: block;
  margin: 0 auto 12px;
  color: var(--accent-soft);
  opacity: 0.85;
}

.dropzone-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.file-area:hover,
.file-area.dragover {
  border-color: var(--accent);
  background: var(--border-subtle);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 16%, transparent);
}

.password-field-wrap {
  position: relative;
}

.password-field-wrap input {
  width: 100%;
  padding-left: 40px;
}

.password-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.7;
  pointer-events: none;
}

.file-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-prompt { pointer-events: none; }
.file-meta { margin-top: 10px; font-size: 0.85rem; color: var(--accent); min-height: 1.2em; }

.consent { margin: 22px 0; }
.consent-ai {
  margin-top: -8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.consent-ai-note {
  margin: 8px 0 0 24px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.checkbox input { margin-top: 3px; accent-color: var(--accent); }

button {
  border: none;
  border-radius: 10px;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary,
#submitBtn.ainna-btn--primary {
  width: 100%;
  background: var(--ainna-gradient, linear-gradient(90deg, var(--accent), var(--accent-2))) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px var(--border-subtle);
  border: none !important;
}

.btn-primary:hover:not(:disabled),
#submitBtn.ainna-btn--primary:hover:not(:disabled) { transform: translateY(-1px); }

.btn-secondary,
#downloadBtn.ainna-btn--primary {
  background: var(--xlsx-green) !important;
  color: #fff !important;
  border: none !important;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.actions { display: flex; gap: 12px; margin-top: 20px; }

.message {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.message.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.message.success {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--success);
}

.result { margin-top: 28px; animation: fadeIn 0.4s ease; }

.result-terminal {
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.compile-success-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-compact);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--xlsx-green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.compile-success-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--xlsx-green);
  color: #fff;
  font-size: 0.75rem;
}

.result-head-main { min-width: 0; }

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

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.result-head h3 { margin: 0 0 8px; }

.confidence {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.confidence-ring {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.confidence-ring-svg {
  width: 100%;
  height: 100%;
}

.confidence-ring-bg {
  stroke: var(--border-subtle);
}

.confidence-ring-fill {
  stroke: var(--xlsx-green);
  stroke-dasharray: 213.6;
  stroke-dashoffset: 213.6;
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}

.confidence-ring.warn .confidence-ring-fill { stroke: var(--warn); }
.confidence-ring.critical .confidence-ring-fill { stroke: var(--danger); }

.confidence-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.confidence-detail {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.confidence-bar {
  width: 100%;
  height: 8px;
  background: var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
}

#confidenceFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--danger, #ef4444), var(--warn, #f59e0b), var(--success, #10b981));
  border-radius: 4px;
  transition: width 0.6s ease;
}

.confidence-note {
  font-size: 0.75rem;
  color: var(--muted);
}

.ainna-conf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--mono, ui-monospace, monospace);
  border: 1px solid transparent;
}

.ainna-conf-badge.is-good {
  color: #065f46;
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.35);
}

.ainna-conf-badge.is-warn {
  color: #92400e;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.35);
}

.ainna-conf-badge.is-critical {
  color: #991b1b;
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.35);
}

.ainna-conf-badge.is-unknown {
  color: var(--muted);
  background: transparent;
  border-color: var(--border, rgba(255,255,255,0.12));
}

.disclaimer {
  color: var(--warn);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.28);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 18px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.meta-item {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.meta-item span { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.meta-item strong {
  font-size: 1.05rem;
  font-family: var(--font-mono);
}

.preview-terminal {
  overflow: auto;
  max-height: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius-compact);
  background: var(--card-2);
}

/* Horizontal scroll table — override ainna global mobile table rotate */
[data-bank-recompiler="1"] .preview-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}

[data-bank-recompiler="1"] .preview-wrap::-webkit-scrollbar {
  height: 8px;
}

[data-bank-recompiler="1"] .preview-wrap::-webkit-scrollbar-track {
  background: var(--border-subtle);
  border-radius: 999px;
}

[data-bank-recompiler="1"] .preview-wrap::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 55%, var(--border-subtle));
  border-radius: 999px;
}

[data-bank-recompiler="1"] .preview-table,
[data-bank-recompiler="1"] .preview-wrap table {
  transform: none !important;
  transform-origin: initial !important;
  width: max-content !important;
  min-width: 640px !important;
  margin: 0 !important;
}

.preview-scroll-hint {
  display: none;
  margin: 8px 0 0;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.04em;
}

.preview-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--card) 50%, transparent); }

.preview-table td:nth-child(3),
.preview-table td:nth-child(4),
.preview-table td:nth-child(5),
.preview-table th:nth-child(3),
.preview-table th:nth-child(4),
.preview-table th:nth-child(5) {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.preview-wrap {
  overflow: auto;
  max-height: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius-compact);
  background: var(--card-2);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}

.preview-table th,
.preview-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-table th {
  position: sticky;
  top: 0;
  background: var(--card);
  color: var(--accent);
  font-weight: 600;
  z-index: 1;
}

.preview-table tr:last-child td { border-bottom: none; }

[data-bank-recompiler="1"] .preview-table th,
[data-bank-recompiler="1"] .preview-table td {
  white-space: nowrap;
}

[data-bank-recompiler="1"] .preview-table td:nth-child(2) {
  min-width: 160px;
  max-width: 320px;
  white-space: normal;
  word-break: break-word;
}

/* Override global ainna style.min.css: footer { background: #1A1A1A } */
footer.footer,
.footer {
  text-align: center;
  padding: 28px 20px 100px;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
  background: transparent;
}

[data-theme="light"] footer.footer,
[data-theme="light"] .footer {
  background: #ffffff;
  color: var(--muted);
}

[data-theme="light"] .footer-reassure,
[data-theme="light"] .footer-reassure strong {
  color: var(--muted);
}

[data-theme="light"] .footer--compact .ainna-page-footer-lang a {
  --footer-lang-bg: linear-gradient(135deg, rgba(15, 61, 104, 0.08), rgba(30, 77, 123, 0.06));
  --footer-lang-border: rgba(15, 61, 104, 0.22);
  --footer-lang-text: var(--accent-soft);
}

.footer-reassure {
  margin: 0 0 10px;
  line-height: 1.6;
}

.footer-ai-link {
  margin: 0;
  font-size: 0.84rem;
}

.footer-ai-link a {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 600;
}

.footer-ai-link a:hover { text-decoration: underline; }

.footer-admin {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.footer-admin a {
  color: var(--accent-soft, #1e4d7b) !important;
  text-decoration: none !important;
  font-weight: 600;
}

.footer-admin a:hover {
  color: var(--accent, #0f3d68) !important;
  text-decoration: underline !important;
}

[data-theme="dark"] .footer-admin a {
  color: var(--accent-soft, #d4b84a) !important;
}

[data-theme="dark"] .footer-admin a:hover {
  color: var(--accent, #c9a227) !important;
}

.rate-limit-indicator {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.rate-limit-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rate-limit-status.admin {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent);
  color: var(--accent-soft);
}

.rate-limit-status.ok {
  background: rgba(74, 222, 128, 0.15);
  border-color: var(--success);
  color: var(--success);
}

.rate-limit-status.limited {
  background: rgba(251, 191, 36, 0.15);
  border-color: var(--warn);
  color: var(--warn);
}

.countdown-timer {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  color: var(--warn);
}

.hidden { display: none !important; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .br-hero-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-visual { order: 2; }

  .desktop-only { display: none !important; }
}

@media (max-width: 720px) {
  [data-bank-recompiler="1"] .hero,
  html[data-bank-recompiler="1"] .hero {
    padding: 24px 16px 12px !important;
    min-height: auto !important;
    text-align: center;
  }

  /* —— Mobile topbar: 2 rows (brand / tools) —— */
  .topbar {
    padding: 10px 12px;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  .topbar-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
  }
  .brand {
    gap: 8px;
    min-width: 0;
  }
  .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
    border-radius: 8px;
  }
  .brand-text {
    min-width: 0;
  }
  .brand-text strong {
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(58vw, 200px);
    display: block;
  }
  .brand-text small { display: none; }

  .topbar-right {
    flex: 1 1 100%;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle, var(--border));
  }
  .topbar-right .br-live-indicator--topbar {
    order: 0;
    margin-right: 0;
    height: 32px;
    padding: 4px 8px 4px 7px;
  }
  .topbar-right .ainna-nav-controls {
    order: 1;
    margin-left: auto;
  }
  .topbar-right .ainna-boost-toggle {
    order: 2;
    width: 34px !important;
    height: 34px !important;
    margin-left: 0 !important;
    flex-shrink: 0;
  }
  .topbar-right .br-compact-toggle {
    order: 3;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    font-size: 15px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle, var(--border));
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .topbar-right .ainna-theme-switch {
    transform: scale(0.9);
    transform-origin: right center;
  }
  .topbar-right .ainna-wc-link {
    display: none !important;
  }
  .topbar-right .br-issue-btn {
    display: none; /* keep mobile tools tight; Issue stays in hero if needed */
  }

  .hero-content { text-align: center; }

  .lead { margin-left: auto; margin-right: auto; }

  .hero-parser-badges,
  .trust-pills { align-items: stretch; }

  .hero-trust-bar { justify-content: center; }

  .hero h1 {
    font-size: clamp(1.45rem, 6vw, 2rem);
    line-height: 1.2;
    margin-bottom: 10px;
  }

  .lead {
    font-size: 0.94rem;
    line-height: 1.55;
    margin-bottom: 10px;
  }

  .pipeline-mock { padding: 14px !important; }

  .sheet-mock { font-size: 0.55rem; }

  .form-grid { grid-template-columns: 1fr; }
  .topbar { padding: 10px 14px; gap: 8px; }
  .topbar-right { justify-content: flex-end; }
  .brand { gap: 8px; }
  .logo-mark { width: 34px; height: 34px; font-size: 0.85rem; border-radius: 8px; }
  .brand-text strong { font-size: 0.88rem; }
  .brand-text small { display: none; }
  .actions { flex-direction: column; }
  .br-panel { padding: 18px; }

  .result-head { flex-direction: column; }
  .confidence { width: 100%; }

  [data-bank-recompiler="1"] .preview-wrap {
    max-height: 320px;
  }

  [data-bank-recompiler="1"] .preview-table,
  [data-bank-recompiler="1"] .preview-wrap table {
    min-width: 560px !important;
  }

  [data-bank-recompiler="1"] .preview-table th,
  [data-bank-recompiler="1"] .preview-table td {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .preview-scroll-hint {
    display: block;
  }
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

@keyframes floatText {
  0%, 100% { transform: translateY(0) rotate(-2deg); opacity: 0.9; }
  50% { transform: translateY(-4px) rotate(2deg); opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* SLA link + popup */
.br-sla-link {
  color: inherit;
  text-decoration: none;
  font-size: 0.85em;
  margin-left: 4px;
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.br-sla-link:hover { color: var(--accent); }

.br-sla-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px;
  animation: slaFadeIn 0.25s ease;
}
.br-sla-overlay.hidden { display: none; }

.br-sla-dialog {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 520px;
  width: 100%;
  padding: 32px 28px 28px;
  max-height: 80vh;
  overflow-y: auto;
}

.br-sla-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.br-sla-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.br-sla-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text);
}

.br-sla-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.br-sla-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.br-sla-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.br-sla-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}

.br-sla-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

@keyframes slaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}