/* =========================================================================
   BAZNEK 2026 AUTONOMOUS AGENT WORKBENCH ARCHITECTURE
   ========================================================================= */

:root {
  --surface-rail: #0b1120;
  --surface-sidebar: #0f172a;
  --surface-canvas: #090e1a;
  --surface-card: #152037;
  --surface-card-hover: #1c2b4a;
  --surface-bubble-user: #4338ca;
  --surface-bubble-ai: #152037;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-focus: #22d3ee;
  --font-display: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* ── Tabular Numerals (Jitter-Free Financial Displays) ─────────────── */
.tabular-nums,
.hero-kpi-val,
.kpi-number,
.result-val,
.waterfall-row,
.corridor-rate,
.table-val,
.metric-val,
.slider-val-badge,
.telemetry-val,
.stat-val,
.slider-amount-pill,
.metric-amount {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── Workbench Body Shell ─────────────────────────────────────────── */
.workbench-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--surface-canvas);
  color: #f8fafc;
  font-family: var(--font-body);
}

.workspace-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

/* ── Activity Rail (56px Desktop Fixed) ────────────────────────────── */
.activity-rail {
  width: 56px;
  min-width: 56px;
  background: var(--surface-rail);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  z-index: 30;
  flex-shrink: 0;
}

.rail-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.rail-divider {
  width: 28px;
  height: 1px;
  background: var(--border-subtle);
  margin: 0.35rem 0;
}

.rail-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.rail-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.rail-btn.active {
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.3);
}

.rail-btn.active::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--cyan);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px var(--cyan);
}

/* Tooltip on hover */
.rail-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  z-index: 50;
}

.rail-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(4px);
}

/* ── Split Panes (Co-Pilot Chat + Living Canvas) ───────────────────── */
.split-panes-wrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  flex: 1;
  height: 100%;
  overflow: hidden;
  transition: grid-template-columns 0.2s ease;
  min-width: 0;
}

.split-panes-wrap.canvas-focus {
  grid-template-columns: 0px 1fr;
}

/* ── Left Pane: Co-Pilot Chat ──────────────────────────────────────── */
.chat-pane {
  background: var(--surface-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  min-width: 0;
}

.chat-pane-header {
  height: 50px;
  min-height: 50px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
}

.chat-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.copilot-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2),
    rgba(34, 211, 238, 0.2)
  );
  border: 1px solid rgba(34, 211, 238, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

.chat-title-group {
  display: flex;
  flex-direction: column;
}

.chat-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
}

.chat-subtitle {
  font-size: 0.6875rem;
  color: var(--text-dim);
}

.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

/* Chat Input Bar */
.chat-input-area {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(11, 17, 32, 0.95);
}

.chat-input-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.15s ease;
}

.chat-input-box:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.15);
}

.chat-textarea {
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.4;
  resize: none;
  min-height: 44px;
  outline: none;
}

.chat-input-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-input-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-input-tool {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-input-tool:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-send {
  background: var(--cyan);
  color: #000;
  border: none;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
}

.btn-send:hover {
  background: #38bdf8;
  transform: translateY(-1px);
}

/* ── Agentic Reasoning Scaffold Cards ──────────────────────────────── */
.agent-scaffold {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scaffold-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.scaffold-step {
  border-left: 2px solid var(--border-subtle);
  padding-left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.scaffold-step.warning {
  border-color: var(--coral);
  background: rgba(244, 63, 94, 0.06);
  padding: 0.5rem 0.75rem;
  border-radius: 0 6px 6px 0;
}

.scaffold-step.success {
  border-color: var(--teal-light);
  background: rgba(16, 185, 129, 0.06);
  padding: 0.5rem 0.75rem;
  border-radius: 0 6px 6px 0;
}

.scaffold-step-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.scaffold-step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.btn-scaffold-jump {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  align-self: flex-start;
  transition: all 0.15s ease;
}

.btn-scaffold-jump:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: var(--cyan);
}

/* ── Right Pane: Living Canvas ─────────────────────────────────────── */
.canvas-pane {
  background: var(--surface-canvas);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  min-width: 0;
}

.canvas-pane > * {
  flex-shrink: 0;
}

/* ── Living Canvas View Mount & Catalog Layouts ────────────────────── */
.detective-suite {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.workbench-canvas-mount {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.75rem 2rem 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-sizing: border-box;
}

/* ── Content Hero & Section Introductions ───────────────────────────── */
.content-hero {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15) 0%,
    rgba(34, 211, 238, 0.08) 100%
  );
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.content-hero-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.content-hero-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── AEO Direct Verdict & Citation Cards ────────────────────────────── */
.aeo-verdict-card {
  background: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.08) 0%,
    rgba(59, 130, 246, 0.04) 100%
  );
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  position: relative;
}
.aeo-verdict-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.aeo-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: aeoPulse 2s infinite;
  flex-shrink: 0;
}
@keyframes aeoPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.5;
  }
}
.aeo-citation-tag {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}
.aeo-verdict-text {
  font-size: 0.875rem;
  line-height: 1.45;
  color: #e2e8f0;
  margin: 0;
}

/* ── Comparison Subnav & Tables ─────────────────────────────────────── */
.compare-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
}
.compare-tab-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.compare-tab-btn:hover,
.compare-tab-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #fff;
}
.slider-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slider-label {
  font-size: 0.8125rem;
  color: #e2e8f0;
}
.range-input {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1e293b;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  cursor: pointer;
  border: 2px solid #fff;
  transition: transform 0.1s ease;
}
.range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.compare-matrix-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}
.compare-table th {
  background: var(--surface-rail);
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
}
.compare-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  vertical-align: middle;
}
.compare-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.pill-advantage {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.pill-disadvantage {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* ── Proactive Co-Pilot Advice Cards ────────────────────────────────── */
.advice-card {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.12),
    rgba(15, 23, 42, 0.8)
  );
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.advice-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.advice-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.advice-text strong {
  color: #fff;
}
.advice-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}
.btn-action-pill {
  background: #6366f1;
  color: #fff;
  border: none;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease;
}
.btn-action-pill:hover {
  background: #4f46e5;
}

/* ── Corridors Directory Grid ───────────────────────────────────────── */
.corridor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.corridor-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.corridor-card:hover {
  background: var(--surface-card-hover);
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.corridor-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.country-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.country-tag-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 800;
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
}
.corridor-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.2rem 0;
}
.corridor-stat-row strong {
  color: #fff;
}

/* ── Blog & Tactical Guides ─────────────────────────────────────────── */
.blog-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.filter-chip {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-chip:hover,
.filter-chip.active {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--cyan);
  color: #fff;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.blog-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.blog-card:hover {
  background: var(--surface-card-hover);
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.blog-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.blog-badge.purple {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}
.blog-badge.emerald {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.blog-badge.coral {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}
.blog-badge.cyan {
  background: rgba(34, 211, 238, 0.2);
  color: var(--cyan);
}
.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin: 0;
}
.blog-card-excerpt {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Article Full Reading View ──────────────────────────────────────── */
.article-full-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.btn-back-link {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  align-self: flex-start;
}
.btn-back-link:hover {
  text-decoration: underline;
}
.article-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0.75rem 0;
}
.article-stat-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}
.article-stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--cyan);
}
.article-stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.article-text-body {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.article-text-body h3 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-top: 0.5rem;
}
.article-callout-box {
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.1) 0%,
    rgba(99, 102, 241, 0.08) 100%
  );
  border-left: 4px solid var(--cyan);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 0.5rem 0;
}

/* ── Developer API Documentation ────────────────────────────────────── */
.api-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.api-endpoint-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.method-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.6875rem;
}
.method-badge.get {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.method-badge.post {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}
.code-box {
  background: #080d1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #38bdf8;
  overflow-x: auto;
  line-height: 1.5;
}

/* ── Responsive Mobile Overrides for In-Canvas Views ───────────────── */
@media (max-width: 767px) {
  .workbench-canvas-mount {
    padding: 1rem 0.75rem calc(2rem + 20px) 0.75rem;
  }
  .corridor-grid {
    grid-template-columns: 1fr;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .article-stat-strip {
    grid-template-columns: 1fr;
  }
  .compare-matrix-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .compare-table {
    min-width: 500px;
  }
}

.canvas-header {
  height: 52px;
  min-height: 52px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 10, 18, 0.92);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 25;
}

.artifact-badge-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.artifact-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.grounding-chip {
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: var(--teal-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.canvas-view-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-view-toggle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-view-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.canvas-body {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ── Ambient Financial Intelligence Telemetry ───────────────────────── */
.top-telemetry-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

.telemetry-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulseBeacon 2s infinite ease-in-out;
}

@keyframes pulseBeacon {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.telemetry-val {
  color: #fff;
  font-weight: 700;
}

.telemetry-latency {
  color: var(--teal-light);
  font-size: 0.6875rem;
}

.telemetry-sep {
  color: var(--border-subtle);
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.telemetry-label {
  color: var(--text-muted);
}

.telemetry-shield {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--emerald-light);
  font-weight: 600;
}

/* ── Mobile Segmented View Switcher ─────────────────────────────────── */
.mobile-segmented-switch {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.mobile-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.mobile-tab-btn.active {
  background: var(--surface-sidebar);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ── Mobile Native Bottom App Bar (54px) ────────────────────────────── */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: rgba(11, 17, 32, 0.98);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  z-index: 45;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.bottom-bar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.625rem;
  font-weight: 600;
  min-width: 54px;
  height: 44px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

.bottom-bar-btn:hover {
  color: #fff;
}

.bottom-bar-btn.active {
  color: var(--cyan);
}

.bottom-bar-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

/* ── Mobile Co-Pilot Chat Badge Dot ─────────────────────────────────── */
.bottom-chat-icon-wrap {
  position: relative;
  display: inline-flex;
}

.bottom-chat-badge {
  position: absolute;
  top: -2px;
  right: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

/* ── Tablet Slide-Over Sheet Backdrop ──────────────────────────────── */
.tablet-chat-backdrop {
  display: none;
  position: fixed;
  top: 54px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 35;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.tablet-chat-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.btn-chat-close-mobile {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-chat-close-mobile:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── TIER 2: Laptop (1025px – 1439px) ──────────────────────────────── */
@media (min-width: 1025px) and (max-width: 1439px) {
  .split-panes-wrap {
    grid-template-columns: 350px 1fr;
  }
}

/* ── TIER 3: Tablet (768px – 1024px) ───────────────────────────────── */
@media (min-width: 768px) and (max-width: 1024px) {
  .split-panes-wrap {
    grid-template-columns: 1fr !important;
  }
  .chat-pane {
    position: fixed;
    top: 54px;
    bottom: 0;
    left: 56px;
    width: 380px;
    max-width: calc(100vw - 56px);
    z-index: 40;
    transform: translateX(-115%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-subtle);
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.6);
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(16px);
  }
  html[dir="rtl"] .chat-pane {
    left: auto;
    right: 56px;
    border-right: none;
    border-left: 1px solid var(--border-subtle);
    transform: translateX(115%);
  }
  .chat-pane.tablet-open {
    transform: translateX(0) !important;
  }
  .tablet-chat-backdrop {
    display: block;
  }
  .btn-chat-close-mobile {
    display: flex;
  }
  .top-telemetry-badge {
    display: none;
  }
}

/* ── TIER 4: Mobile Handheld (< 768px) ──────────────────────────────── */
@media (max-width: 767px) {
  .activity-rail {
    display: none !important;
  }
  .mobile-bottom-bar {
    display: flex;
  }
  .mobile-segmented-switch {
    display: flex;
  }
  .top-telemetry-badge,
  .system-status-badge {
    display: none !important;
  }
  .workspace-body {
    height: calc(100vh - 54px - 54px) !important;
    max-height: calc(100vh - 54px - 54px) !important;
    flex: none !important;
  }
  .split-panes-wrap {
    grid-template-columns: 1fr !important;
    height: 100% !important;
  }
  .mobile-view-canvas .chat-pane {
    display: none !important;
  }
  .mobile-view-canvas .canvas-pane {
    display: flex !important;
    height: 100% !important;
  }
  .mobile-view-chat .canvas-pane {
    display: none !important;
  }
  .mobile-view-chat .chat-pane {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    position: static !important;
    transform: none !important;
    border-right: none !important;
  }
  .chat-input-area {
    padding: 0.65rem 0.85rem !important;
    background: rgba(15, 23, 42, 0.98) !important;
    flex-shrink: 0 !important;
  }
  .chat-stream {
    flex: 1 !important;
    overflow-y: auto !important;
  }
  .btn-chat-close-mobile {
    display: flex;
  }
  .canvas-header {
    padding: 0 0.85rem;
  }
  .artifact-badge-group {
    overflow: hidden;
    min-width: 0;
    flex: 1 1 0;
  }
  .artifact-title {
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .grounding-chip {
    display: none;
  }
  .canvas-body {
    padding: 1rem 0.75rem calc(2rem + 20px) 0.75rem !important;
  }
}

/* ── Arabic RTL Typography & Bidi Symmetry ─────────────────────────── */
[lang="ar"],
[dir="rtl"] {
  font-family: "Cairo", var(--font-body), sans-serif;
}
[dir="rtl"] .activity-rail {
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}
[dir="rtl"] .rail-btn.active::before {
  left: auto;
  right: -6px;
  border-radius: 4px 0 0 4px;
}
[dir="rtl"] .rail-btn::after {
  left: auto;
  right: 56px;
}
[dir="rtl"] .numeric,
[dir="rtl"] .stat-val,
[dir="rtl"] .metric-amount,
[dir="rtl"] .waterfall-row,
[dir="rtl"] .table-val,
[dir="rtl"] .kpi-number,
[dir="rtl"] .slider-val-badge,
[dir="rtl"] .telemetry-val {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

/* ── Accessibility Utility: Screen Reader Only ─────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Executive Print & Verification PDF Stylesheet ─────────────────── */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt;
  }
  .workbench-shell,
  .workspace-body {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .activity-rail,
  .top-nav,
  .chat-pane,
  .mobile-bottom-bar,
  .mobile-segmented-switch,
  .tablet-chat-backdrop,
  .canvas-view-controls,
  .range-input,
  .btn-run-audit,
  .btn-copy-calc,
  .floating-pill,
  .mobile-bottom-nav,
  .cookie-banner {
    display: none !important;
  }
  .split-panes-wrap {
    display: block !important;
    height: auto !important;
    grid-template-columns: 1fr !important;
  }
  .canvas-pane {
    background: #ffffff !important;
    color: #0f172a !important;
    overflow: visible !important;
    height: auto !important;
  }
  .canvas-header {
    position: static !important;
    background: #ffffff !important;
    border-bottom: 2px solid #0f172a !important;
    color: #0f172a !important;
    padding: 0 0 1rem 0 !important;
  }
  .artifact-title {
    color: #0f172a !important;
    font-size: 1.4rem !important;
  }
  .hero-metric-card,
  .slider-card,
  .waterfall-card,
  .risk-item-card,
  .rail-card,
  .metric-stats-box {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 1rem;
  }
  .metric-label,
  .slider-label,
  .stat-label {
    color: #475569 !important;
  }
  .metric-amount,
  .stat-val,
  .slider-amount-pill {
    color: #0f172a !important;
  }
  .print-verification-header {
    display: block !important;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }
}
.print-verification-header {
  display: none;
}

/* ── Inline Collapsible Library Pane (Tools & Catalog) ────────────── */
.library-pane {
  width: 0;
  min-width: 0;
  background: #0d1527;
  border-right: 0px solid transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease;
  flex-shrink: 0;
  z-index: 25;
}
.library-pane.open {
  width: 280px;
  min-width: 280px;
  border-right: 1px solid var(--border-subtle);
}
.library-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-rail);
  min-width: 280px;
  flex-shrink: 0;
}
.library-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.library-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.library-subtitle {
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.library-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}
.library-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.library-search-box {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  min-width: 280px;
}
.library-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
  color: #fff;
  outline: none;
}
.library-search-input:focus {
  border-color: var(--cyan);
}
.library-content {
  padding: 1rem 0.85rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 280px;
  flex: 1;
}
.library-group-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.drawer-item {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 0.3rem;
}
.drawer-item:hover {
  border-color: var(--cyan);
  background: var(--surface-card-hover);
}
.drawer-item-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
}
.drawer-item-sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ── Command Center Initial State ──────────────────────────────────── */
.command-center {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease;
}
.cc-hero-card {
  background: linear-gradient(
    135deg,
    rgba(21, 32, 55, 0.95),
    rgba(15, 23, 42, 0.95)
  );
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 16px;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}
.cc-hero-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.cc-badge-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.cc-live-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-light, #34d399);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.cc-hero-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 0.65rem;
}
.cc-hero-sub {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: 1.15rem;
}
.cc-compare-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
  font-size: 0.75rem;
}
.cc-pill-label {
  color: var(--text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.cc-compare-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  color: #e2e8f0;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}
.cc-compare-pill:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan);
  color: #fff;
}
.cc-action-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-top: 0.5rem;
}
.cc-action-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.45rem 1.35rem;
  min-height: 165px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none;
}
.cc-action-card:hover {
  background: var(--surface-card-hover);
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}
.cc-card-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  margin-bottom: 0.65rem;
}
.cc-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}
.cc-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.cc-card-btn {
  margin-top: auto;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--cyan);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.cc-action-card:hover .cc-card-btn {
  background: var(--cyan);
  color: #080d1a;
}

/* ── Real-Time Parallel & P2P FX Spread Watchdog ───────────────────── */
.market-pulse-strip {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.pulse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.pulse-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.pulse-item {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pulse-item:hover {
  border-color: var(--cyan);
  background: var(--surface-card-hover);
}
.pulse-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pulse-code {
  font-weight: 700;
  font-size: 0.8125rem;
  color: #fff;
}
.pulse-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.pulse-badge.red {
  background: rgba(244, 63, 94, 0.2);
  color: var(--coral, #f43f5e);
}
.pulse-badge.amber {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber, #f59e0b);
}
.pulse-rate {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cyan);
}
.pulse-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Co-Pilot Followup Chips & Controls ────────────────────────────── */
.followup-chips-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.followup-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  border-radius: 7px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}
.followup-chip:hover {
  background: rgba(34, 211, 238, 0.1);
  border-color: var(--cyan);
  color: #fff;
}
.followup-chip span:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Living Canvas Tool Suite Component Styles ─────────────────────── */
.hero-metric-card {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.12) 0%,
    rgba(21, 32, 55, 0.7) 100%
  );
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.metric-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.metric-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald-light, #34d399);
}
.metric-amount {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.metric-amount span.cur {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 600;
}
.metric-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.metric-stats-box {
  display: flex;
  gap: 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
}
.stat-unit {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stat-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--text-dim, #64748b);
  font-weight: 600;
}
.stat-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
}
.stat-val.loss {
  color: var(--coral, #f43f5e);
}
.stat-val.saved {
  color: var(--emerald-light, #34d399);
}

/* Interactive Sliders */
.slider-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slider-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
}
.slider-amount-pill {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cyan, #22d3ee);
}
.range-input {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan, #22d3ee);
  box-shadow: 0 0 10px var(--cyan, #22d3ee);
  cursor: pointer;
  border: 2px solid #fff;
  transition: transform 0.1s ease;
}
.range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Cash Flow Ribbon (Visual Waterfall) */
.cashflow-ribbon-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.cashflow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cashflow-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stacked-bar-wrap {
  width: 100%;
  height: 30px;
  background: #0b1120;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
.stacked-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.5rem;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.seg-takehome {
  background: linear-gradient(90deg, #059669, #10b981);
}
.seg-platform {
  background: linear-gradient(90deg, #4f46e5, #6366f1);
}
.seg-friction {
  background: linear-gradient(90deg, #e11d48, #f43f5e);
}
.cashflow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.8125rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.legend-takehome .legend-dot {
  background: var(--emerald, #10b981);
}
.legend-platform .legend-dot {
  background: var(--purple, #6366f1);
}
.legend-friction .legend-dot {
  background: var(--coral, #f43f5e);
}
.legend-name {
  color: var(--text-muted);
}
.legend-val {
  font-weight: 700;
  color: #fff;
}

/* Comparison Rails Grid */
.rails-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.rail-box {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}
.rail-box.best {
  border-color: var(--emerald, #10b981);
  background: linear-gradient(
    180deg,
    rgba(16, 185, 129, 0.1) 0%,
    var(--surface-card) 80%
  );
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.12);
}
.rail-box.worst {
  border-color: rgba(244, 63, 94, 0.35);
  background: linear-gradient(
    180deg,
    rgba(244, 63, 94, 0.06) 0%,
    var(--surface-card) 80%
  );
}
.rail-pill {
  position: absolute;
  top: -9px;
  right: 12px;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.rail-pill.green {
  background: var(--emerald, #10b981);
  color: #000;
}
.rail-pill.red {
  background: var(--coral, #f43f5e);
  color: #fff;
}
.rail-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
}
.rail-net-val {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
}
.rail-box.best .rail-net-val {
  color: var(--emerald-light, #34d399);
}
.rail-items-list {
  list-style: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.rail-items-list li {
  display: flex;
  justify-content: space-between;
}
.rail-items-list li.leak-red {
  color: var(--coral, #f43f5e);
}

/* Proactive Advice Banner */
.advice-banner {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.12),
    rgba(15, 23, 42, 0.8)
  );
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.advice-header {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--cyan, #22d3ee);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.advice-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.advice-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* Contract Risk Cards */
.risk-badge {
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}
.risk-badge.high {
  color: var(--coral, #f43f5e);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.risk-badge.warning {
  color: var(--amber, #f59e0b);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.clause-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.5;
}
.remedy-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  color: #a7f3d0;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .cc-action-cards {
    grid-template-columns: 1fr;
  }
  .pulse-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rails-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Multimodal File Upload Modal ────────────────────────────────────── */
.upload-modal,
.note-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.upload-modal-card,
.note-modal-card {
  background: var(--surface-card, #111827);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.upload-modal-header,
.note-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.upload-modal-title-wrap,
.note-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.upload-modal-icon,
.note-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan, #06b6d4);
  flex-shrink: 0;
}
.note-modal-icon {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
  color: #818cf8;
}
.upload-modal-title,
.note-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}
.upload-modal-subtitle,
.note-modal-subtitle {
  font-size: 0.785rem;
  color: var(--text-muted, #94a3b8);
  margin: 0.2rem 0 0 0;
}
.upload-modal-close,
.note-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.upload-modal-close:hover,
.note-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(6, 182, 212, 0.02);
  transition: all 0.2s ease;
}
.upload-dropzone:hover {
  border-color: var(--cyan, #06b6d4);
  background: rgba(6, 182, 212, 0.05);
}
.dropzone-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  margin: 0 auto 0.75rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan, #06b6d4);
}
.dropzone-prompt {
  font-size: 0.875rem;
  color: #e2e8f0;
  margin: 0;
}
.dropzone-sub {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  margin: 0.35rem 0 0 0;
}
.upload-samples-section {
  margin-top: 1.25rem;
}
.upload-samples-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  display: block;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.upload-samples-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sample-fixture-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  color: var(--text-muted, #94a3b8);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sample-fixture-btn:hover {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.06);
  color: #fff;
}
.fixture-btn-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.fixture-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e2e8f0;
  font-family: var(--font-mono, monospace);
}
.fixture-desc {
  font-size: 0.725rem;
  color: var(--text-muted, #94a3b8);
}

/* ── Negotiation Note Modal ─────────────────────────────────────────── */
.note-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.note-tone-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.note-tone-label {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}
.note-tone-pills {
  display: flex;
  gap: 0.4rem;
}
.tone-pill {
  background: var(--surface-card, #111827);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-muted, #94a3b8);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tone-pill:hover,
.tone-pill.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
  color: #fff;
}
.note-textarea-wrap {
  width: 100%;
}
.note-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #f8fafc;
  font-family: var(--font-mono, monospace);
  font-size: 0.8125rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}
.note-textarea:focus {
  border-color: #818cf8;
}
.note-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.note-copy-feedback {
  font-size: 0.775rem;
  font-weight: 600;
  color: #34d399;
}
.note-modal-actions {
  display: flex;
  gap: 0.5rem;
}

/* ── Dynamic Bento & Transparency Views ─────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.bento-card {
  background: var(--surface-card, #111827);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bento-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan, #06b6d4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}
.bento-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bento-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan, #06b6d4);
}
.bento-card-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted, #94a3b8);
}
.bento-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.bento-card-desc {
  font-size: 0.775rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
  margin: 0;
}
.transparency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* ── Institutional Canvas Footer ────────────────────────────────────── */
.app-footer {
  background: var(--surface-rail, #0b1120);
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  padding: 1.5rem 1.5rem 2rem 1.5rem;
  margin-top: 2rem;
  width: 100%;
}
.footer-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.78125rem;
  color: var(--text-muted, #94a3b8);
}
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.footer-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.78125rem;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  transition: color 0.15s ease;
}
.footer-btn:hover {
  color: var(--cyan, #22d3ee);
  text-decoration: underline;
}
.footer-sep {
  color: var(--text-dim, #64748b);
  font-size: 0.65rem;
}

@media (max-width: 768px) {
  .app-footer {
    padding-bottom: calc(2rem + 54px);
  }
  .footer-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }
}

/* ── Print / PDF Watermark Verification ────────────────────────────── */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-header,
  .activity-rail,
  .co-pilot-pane,
  .library-drawer,
  #btnOpenLibrary,
  .drawer-toggle-btn,
  .upload-modal,
  .note-modal,
  .cookie-banner,
  .app-footer {
    display: none !important;
  }
  .workbench-shell {
    display: block !important;
  }
  .views-container {
    padding: 0 !important;
  }
  #printVerificationHeader {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 12px;
    margin-bottom: 24px;
  }
  .print-brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    display: block;
  }
  .print-brand-subtitle {
    font-size: 0.85rem;
    color: #475569;
    display: block;
  }
  .print-header-meta {
    text-align: right;
    font-size: 0.75rem;
    color: #64748b;
  }
}

/* ── VIES VAT Validator ──────────────────────────────────────────────────── */
.vies-validator-card {
  background: var(--surface-card, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.vies-input-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.vies-field-label {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.vies-select,
.vies-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface-input, #0d1b2e);
  color: #f8fafc;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
  outline: none;
}

.vies-select:focus,
.vies-input:focus {
  border-color: var(--cyan, #06b6d4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.vies-status-valid {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 8px;
  padding: 0.85rem;
  font-size: 0.8125rem;
}

.vies-status-invalid {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.8125rem;
  color: #fca5a5;
}

.vies-status-badge {
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.vies-info-strip {
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
  line-height: 1.55;
}

@media (max-width: 540px) {
  .vies-input-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Crypto Gas Grid ─────────────────────────────────────────────────────── */
.crypto-gas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.crypto-gas-card {
  background: var(--surface-card, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 1.1rem;
  text-align: center;
  transition:
    border-color 0.2s ease,
    transform 0.15s ease;
}

.crypto-gas-card:hover {
  transform: translateY(-1px);
  border-color: rgba(6, 182, 212, 0.3);
}

.crypto-gas-card--featured {
  border-color: rgba(6, 182, 212, 0.4);
}

.crypto-gas-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.35rem;
}

.crypto-gas-label--featured {
  color: var(--cyan, #06b6d4);
}

.crypto-gas-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.crypto-gas-value--featured {
  color: var(--cyan, #06b6d4);
}

.crypto-gas-value--priority {
  color: #a78bfa;
}

.crypto-gas-unit {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.crypto-network-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.crypto-network-table th {
  text-align: left;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  color: var(--text-muted, #64748b);
  font-weight: 600;
  font-size: 0.75rem;
}

.crypto-network-table th:not(:first-child) {
  text-align: right;
}

.crypto-network-table td {
  padding: 0.45rem 0.5rem;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.crypto-network-table td:not(:first-child) {
  text-align: right;
}

.crypto-network-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.crypto-fee-cheap {
  color: var(--green, #4ade80);
}

.crypto-fee-expensive {
  color: #fca5a5;
}

.crypto-fee-muted {
  color: var(--text-muted, #64748b);
}

/* ── Contact Form Grid ───────────────────────────────────────────────────── */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-info-card {
  background: var(--surface-card, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 1.1rem;
  transition: border-color 0.2s ease;
}

.contact-info-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
}

.contact-info-category {
  font-size: 0.75rem;
  color: var(--cyan, #06b6d4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.contact-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-form-label {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.contact-form-input,
.contact-form-select,
.contact-form-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface-input, #0d1b2e);
  color: #f8fafc;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
  outline: none;
}

.contact-form-input:focus,
.contact-form-select:focus,
.contact-form-textarea:focus {
  border-color: var(--cyan, #06b6d4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.contact-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-feedback-success {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.8125rem;
  color: var(--green, #4ade80);
  margin-top: 0.65rem;
}

.contact-feedback-error {
  color: #fca5a5;
  font-size: 0.8125rem;
  margin-top: 0.5rem;
}

@media (max-width: 540px) {
  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Legal Reader (Terms / Privacy) ─────────────────────────────────────── */
.legal-reader-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.legal-section-card {
  background: var(--surface-card, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s ease;
}

.legal-section-card:hover {
  border-color: rgba(6, 182, 212, 0.15);
}

.legal-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 0.4rem;
}

.legal-section-body {
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
  margin: 0;
  line-height: 1.6;
}

.legal-section-body strong {
  color: #f8fafc;
}

.legal-section-body a {
  color: #a78bfa;
  text-decoration: none;
}

.legal-section-body a:hover {
  text-decoration: underline;
}

.legal-section-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.legal-section-list li {
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.legal-toc-link {
  font-size: 0.75rem;
  color: var(--cyan, #06b6d4);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 20px;
  padding: 0.25rem 0.65rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.legal-toc-link:hover {
  background: rgba(6, 182, 212, 0.15);
}

/* ── Fee Alerts / Notification Prefs ────────────────────────────────────── */
.alerts-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.alerts-toggle-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.alerts-toggle-label {
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
}

.alerts-email-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.alerts-email-input {
  flex: 1;
  min-width: 200px;
  background: var(--surface-input, #0d1b2e);
  color: #f8fafc;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.alerts-email-input:focus {
  border-color: var(--cyan, #06b6d4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.alerts-feedback-success {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--green, #4ade80);
  margin-top: 0.55rem;
}

/* ── WCAG 2.2 Accessible Focus Rings ─────────────────────────── */
.rail-btn:focus-visible,
.btn-action-pill:focus-visible,
.compare-tab-btn:focus-visible,
.btn-input-tool:focus-visible,
.btn-view-toggle:focus-visible,
.btn-scaffold-jump:focus-visible,
.chat-textarea:focus-visible,
.library-search-input:focus-visible,
.drawer-item:focus-visible,
.followup-chip:focus-visible {
  outline: 2px solid var(--cyan, #22d3ee) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.4) !important;
}

/* ── Co-Pilot Reasoning / Thinking Animation ─────────────────── */
.thinking-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.75rem;
  background: var(--surface-bubble-ai, #152037);
  border-radius: 12px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.thinking-dot {
  width: 7px;
  height: 7px;
  background: var(--cyan, #22d3ee);
  border-radius: 50%;
  animation: pulseThinking 1.4s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.thinking-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes pulseThinking {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.3;
  }
  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ── Canvas Prominent Audit Dropzone (Founder / GTM Loop) ────── */
.canvas-dropzone {
  margin: 1.25rem 0;
  padding: 1.5rem 1.25rem;
  border: 2px dashed rgba(34, 211, 238, 0.35);
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.canvas-dropzone:hover,
.canvas-dropzone.drag-over {
  border-color: var(--cyan, #22d3ee);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
}

.dropzone-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.5rem;
}

.dropzone-desc {
  font-size: 0.8125rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 0.25rem;
}

/* ── Mobile Touch Boundary Guarantee (WCAG 2.2 AA Target Size) ─ */
@media (max-width: 768px) {
  .drawer-item,
  .followup-chip,
  .btn-action-pill,
  .compare-tab-btn,
  .bottom-bar-btn {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
}
