:root {
  --bg-canvas: #f4f8f6;
  --bg-sidebar: rgba(255, 255, 255, 0.92);
  --bg-navbar: rgba(255, 255, 255, 0.88);
  --bg-surface: rgba(255, 255, 255, 0.9);
  --bg-surface-hover: #ffffff;
  --bg-elevated: #ffffff;
  --bg-input: rgba(248, 251, 250, 0.96);

  --border-subtle: rgba(24, 55, 49, 0.09);
  --border-default: rgba(24, 55, 49, 0.15);
  --border-highlight: rgba(13, 148, 136, 0.48);

  --text-primary: #172b2a;
  --text-secondary: #526664;
  --text-muted: #667773;

  --accent-primary: #0f766e;
  --accent-primary-hover: #115e59;
  --accent-violet: #7c3aed;
  --accent-emerald: #16845b;
  --accent-amber: #b66a08;
  --accent-rose: #d44764;
  --accent-cyan: #087e9b;

  --sidebar-width: 232px;
  --shell-gap: 16px;

  --radius-2xl: 18px;
  --radius-xl: 14px;
  --radius-lg: 11px;
  --radius-md: 8px;
  --radius-sm: 6px;

  --shadow-floating:
    0 16px 40px -8px rgba(28, 58, 51, 0.16),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
  --shadow-card:
    0 8px 26px rgba(28, 58, 51, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-popover:
    0 24px 60px rgba(28, 58, 51, 0.2),
    0 0 0 1px rgba(24, 55, 49, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(ellipse at 6% 4%, rgba(20, 184, 166, 0.09), transparent 30rem),
    radial-gradient(ellipse at 94% 12%, rgba(251, 146, 60, 0.09), transparent 28rem),
    linear-gradient(180deg, #f8fbf9 0%, #f2f7f5 62%, #f7f8f4 100%);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/* DUAL SHELL VISIBILITY (LANDING MODE VS WORKSPACE MODE) */
body[data-shell-mode="landing"] #workspaceShell {
  display: none;
}

body[data-shell-mode="workspace"] #landingShell {
  display: none;
}

/* LUCIDE ICON SIZING */
.icon-xs {
  width: 13px;
  height: 13px;
  stroke-width: 2.1;
  flex-shrink: 0;
}

.icon-sm {
  width: 15px;
  height: 15px;
  stroke-width: 2;
  flex-shrink: 0;
}

.icon-md {
  width: 19px;
  height: 19px;
  stroke-width: 2;
  flex-shrink: 0;
}

.nav-svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  color: var(--text-muted);
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.indigo-text {
  color: #818cf8;
}

.violet-text {
  color: #a78bfa;
}

.amber-text {
  color: #fbbf24;
}

.cyan-text {
  color: #22d3ee;
}

.emerald-text {
  color: #34d399;
}

.rose-text {
  color: #fb7185;
}

/* ==================== AMBIENT LIGHTING ==================== */
.ambient-lighting {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.spotlight {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
}

.spotlight-top {
  width: 820px;
  height: 420px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 70%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
}

.spotlight-center {
  width: 640px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.11), transparent 70%);
  top: 38%;
  left: 15%;
}

.spotlight-bottom {
  width: 580px;
  height: 360px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.11), transparent 70%);
  bottom: -160px;
  right: 8%;
}

.subtle-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at top, black 50%, transparent 95%);
}

/* =====================================================================
   SHELL 1: PRODUCT LANDING & HERO STYLES
   ===================================================================== */
.landing-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  isolation: isolate;
}

.landing-shell::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(
      360px circle at var(--cursor-x, -1000px) var(--cursor-y, -1000px),
      rgba(20, 184, 166, 0.12),
      transparent 72%
    );
  content: "";
  opacity: 0.85;
  pointer-events: none;
}

.landing-navbar {
  position: sticky;
  top: 16px;
  z-index: 50;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

.landing-nav-inner {
  background: rgba(12, 15, 25, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-floating);
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.landing-anchor {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.landing-anchor:hover {
  color: var(--text-primary);
}

.landing-nav-Right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* HERO SECTION */
.hero-section {
  padding: 64px 20px 72px;
}

.hero-container {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-pill-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 0.78rem;
  color: #c7d2fe;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.pill-spark {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent-primary);
  padding: 2px 7px;
  border-radius: 999px;
}

.pill-link {
  background: #0f766e;
  border: 1px solid #0f766e;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.pill-link:hover {
  background: #115e59;
  border-color: #115e59;
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.2);
  transform: translateY(-1px);
}

.hero-display-title {
  font-size: clamp(2.5rem, 5.2vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  max-width: 920px;
  margin-bottom: 20px;
}

.serif-gradient {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  background: linear-gradient(135deg, #a5b4fc 0%, #38bdf8 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  color: var(--text-secondary);
  max-width: 690px;
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 0.92rem;
  border-radius: var(--radius-lg);
}

.btn-glow {
  box-shadow:
    0 0 25px rgba(99, 102, 241, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hero-telemetry-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 14px 32px;
  border-radius: 999px;
  background: rgba(15, 18, 30, 0.72);
  border: 1px solid var(--border-subtle);
  margin-bottom: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.ribbon-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ribbon-stat strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.15rem;
}

.ribbon-divider {
  width: 1px;
  height: 28px;
  background: var(--border-default);
}

/* 3D INTERACTIVE SHOWCASE WINDOW */
.hero-showcase-frame {
  position: relative;
  width: 100%;
  text-align: left;
  transform: perspective(1400px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 220ms cubic-bezier(0.2, 0.75, 0.25, 1);
  transform-style: preserve-3d;
}

.showcase-glow {
  position: absolute;
  inset: -15px;
  background: linear-gradient(135deg,
      rgba(99, 102, 241, 0.22),
      rgba(6, 182, 212, 0.14),
      rgba(16, 185, 129, 0.14));
  filter: blur(45px);
  z-index: -1;
  border-radius: 28px;
  background-size: 180% 180%;
  animation: showcaseGlowDrift 9s ease-in-out infinite alternate;
}

@keyframes showcaseGlowDrift {
  from { background-position: 0% 30%; transform: scale(0.98); }
  to { background-position: 100% 70%; transform: scale(1.035); }
}

.showcase-window {
  background: rgba(11, 14, 24, 0.92);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.78);
}

.window-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.window-dots span:nth-child(1) {
  background: #f43f5e;
}

.window-dots span:nth-child(2) {
  background: #f59e0b;
}

.window-dots span:nth-child(3) {
  background: #10b981;
}

.window-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.win-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.win-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.win-tab.active {
  background: rgba(99, 102, 241, 0.18);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.4);
}

.showcase-body {
  display: grid;
  grid-template-columns: 1fr auto 1.25fr;
  gap: 22px;
  padding: 26px;
  align-items: center;
}

.showcase-col-header {
  margin-bottom: 12px;
}

.showcase-files-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-source-card {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all 0.16s ease;
}

.demo-source-card:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  transform: translateX(3px);
}

.showcase-pipe {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pipe-line {
  width: 2px;
  height: 44px;
  background: linear-gradient(180deg, transparent, var(--accent-primary), transparent);
}

.pipe-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-xl);
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  text-align: center;
}

.pipe-node span {
  font-weight: 700;
  font-size: 0.82rem;
}

.pipe-node small {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.showcase-answer-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.showcase-query-pill {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #e0e7ff;
  font-size: 0.82rem;
  font-weight: 600;
}

.showcase-answer-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-line;
}

.showcase-citation-row {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* LANDING MODULES (COMPARISON, BENTO, PIPELINE, LAUNCHER) */
.landing-section {
  padding: 56px 20px;
}

.landing-start-section {
  padding-top: 38px;
  padding-bottom: 88px;
}

.landing-start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-start-card {
  position: relative;
  display: flex;
  min-height: 196px;
  padding: 24px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(31, 73, 64, 0.12);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.1), transparent 52%),
    rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 30px rgba(28, 58, 51, 0.055);
  transition:
    transform 240ms cubic-bezier(0.2, 0.75, 0.25, 1),
    box-shadow 240ms ease,
    border-color 200ms ease;
}

.landing-start-card:hover {
  transform: translateY(-5px);
  border-color: rgba(15, 118, 110, 0.26);
  box-shadow: 0 20px 38px rgba(28, 58, 51, 0.11);
}

.landing-start-card > .icon-md {
  color: var(--accent-primary);
}

.landing-start-card h3 {
  color: #183a35;
  font-size: 1rem;
}

.landing-start-card p {
  max-width: 290px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.6;
}

.landing-start-number {
  position: absolute;
  top: 18px;
  right: 20px;
  color: rgba(15, 118, 110, 0.3);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
}

.landing-start-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.answer-journey-section {
  padding: 68px 20px 72px;
  border-top: 1px solid rgba(31, 73, 64, 0.1);
  border-bottom: 1px solid rgba(31, 73, 64, 0.1);
  background: linear-gradient(118deg, #eaf6f1 0%, #f8fbf9 55%, #fff5e8 100%);
}

.journey-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.journey-header h2 {
  max-width: 650px;
  margin-top: 8px;
  color: #183a35;
  font-size: 2.15rem;
  line-height: 1.12;
}

.journey-header p {
  max-width: 330px;
  color: #526664;
  font-size: 0.9rem;
}

.journey-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid rgba(31, 73, 64, 0.16);
}

.journey-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px 14px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #526664;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.journey-tab:hover {
  color: #155e58;
  background: rgba(255, 255, 255, 0.48);
}

.journey-tab.active {
  border-bottom-color: #0f766e;
  background: rgba(255, 255, 255, 0.72);
  color: #155e58;
}

.journey-tab-index {
  color: #667773;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
}

.journey-tab .icon-sm {
  margin-left: auto;
  color: #0f766e;
}

.journey-stage {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr);
  gap: 42px;
  align-items: center;
  min-height: 330px;
  padding: 26px 0 22px;
}

.journey-copy h3 {
  max-width: 390px;
  margin: 11px 0 10px;
  color: #183a35;
  font-size: 1.75rem;
  line-height: 1.18;
}

.journey-copy > p {
  max-width: 420px;
  color: #526664;
  font-size: 0.9rem;
  line-height: 1.65;
}

.journey-next {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 9px 13px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #fff;
  color: #155e58;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.journey-next:hover {
  transform: translateY(-2px);
  background: #f3faf7;
  box-shadow: 0 7px 18px rgba(28, 58, 51, 0.1);
}

.journey-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 276px;
  padding: 20px;
  border: 1px solid rgba(31, 73, 64, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(28, 58, 51, 0.07);
}

.journey-source-list,
.journey-connected-files {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.journey-source-row {
  display: grid;
  grid-template-columns: 26px 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(31, 73, 64, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  animation: journeyReveal 380ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
  animation-delay: calc(var(--source-order, 0) * 70ms);
}

.journey-source-index {
  color: #667773;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.67rem;
}

.journey-source-row > .icon-sm,
.journey-connected-file > .icon-sm {
  color: #0f766e;
}

.journey-source-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.journey-source-copy strong {
  overflow: hidden;
  color: #203b37;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-source-copy span {
  overflow: hidden;
  color: #526664;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-visual-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(31, 73, 64, 0.1);
  color: #526664;
  font-size: 0.76rem;
}

.journey-visual-footnote .icon-sm {
  flex: 0 0 auto;
  color: #0f766e;
}

.journey-link-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(150px, 0.82fr);
  align-items: center;
  gap: 12px;
}

.journey-connected-file {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(31, 73, 64, 0.1);
  border-radius: 8px;
  background: #fff;
  color: #203b37;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
  animation: journeyReveal 380ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.journey-link-beam {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.16), #0f766e, rgba(8, 126, 155, 0.2));
}

.journey-link-beam span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  transform: translateY(-50%);
  animation: journeySignal 1.8s ease-in-out infinite alternate;
}

.journey-synthesis-node {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 17px 15px;
  border-radius: 10px;
  background: linear-gradient(145deg, #155e58, #0f766e);
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.journey-synthesis-node .mono-label {
  color: #d0eee5;
  font-size: 0.59rem;
}

.journey-synthesis-node strong {
  font-size: 0.9rem;
}

.journey-synthesis-node > span:last-child {
  color: #e2f4ee;
  font-size: 0.72rem;
}

.journey-synthesis-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.journey-answer-card {
  padding: 16px 17px;
  border: 1px solid rgba(31, 73, 64, 0.11);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  animation: journeyReveal 380ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.journey-answer-heading,
.journey-answer-heading > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.journey-answer-heading > span:first-child {
  justify-content: flex-start;
  color: #155e58;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
}

.journey-confidence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #e7f5ed;
  color: #176b4b;
  font-size: 0.62rem;
  font-weight: 700;
}

.journey-answer-card > p {
  margin: 14px 0;
  color: #263f3a;
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre-line;
}

.journey-citations {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 11px;
  border-top: 1px solid rgba(31, 73, 64, 0.1);
  flex-wrap: wrap;
}

.journey-citations .mono-label {
  margin-right: 2px;
  color: #667773;
}

.journey-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(31, 73, 64, 0.12);
  color: #526664;
  font-size: 0.73rem;
}

.journey-progress {
  width: min(180px, 38%);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfeae6;
}

.journey-progress span {
  display: block;
  width: 33.333%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #087e9b);
  transition: width 360ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

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

@keyframes journeySignal {
  from { left: 0; }
  to { left: calc(100% - 9px); }
}

@media (max-width: 760px) {
  .answer-journey-section { padding: 46px 16px 50px; }
  .journey-header { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 22px; }
  .journey-header h2 { font-size: 1.75rem; }
  .journey-tabs { gap: 4px; }
  .journey-tab { justify-content: center; gap: 6px; padding: 10px 5px; font-size: 0.72rem; }
  .journey-tab-index { display: none; }
  .journey-tab .icon-sm { display: none; }
  .journey-stage { grid-template-columns: minmax(0, 1fr); gap: 20px; min-height: 0; padding: 22px 0 18px; }
  .journey-copy h3 { font-size: 1.5rem; }
  .journey-visual { min-height: 0; padding: 14px; }
  .journey-link-map { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .journey-link-beam { width: 2px; height: 24px; margin-left: 20px; }
  .journey-link-beam span { top: 0; left: 50%; transform: translateX(-50%); animation-name: journeySignalVertical; }
  .journey-visual-footnote { align-items: flex-start; }
  .journey-answer-heading { align-items: flex-start; flex-wrap: wrap; }
  .journey-progress-row { font-size: 0.68rem; }
}

@keyframes journeySignalVertical {
  from { top: 0; }
  to { top: calc(100% - 9px); }
}

.section-container {
  max-width: 1220px;
  margin: 0 auto;
}

.section-title-block {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-title-block h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
}

.section-title-block p {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* PRODUCT BENTO GRID */
.product-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.bento-feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.span-8 {
  grid-column: span 8;
}

.span-4 {
  grid-column: span 4;
}

.feature-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.feature-icon-box.indigo {
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
}

.feature-icon-box.emerald {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.feature-icon-box.cyan {
  background: rgba(6, 182, 212, 0.16);
  color: #67e8f9;
}

.feature-icon-box.amber {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.feature-icon-box.rose {
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
}

.bento-feature h3 {
  font-size: 1.12rem;
  font-weight: 700;
}

.bento-feature p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

.feature-interactive-demo {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.code-mini-pill {
  margin-top: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: #6ee7b7;
}

.landing-footer {
  padding: 32px 20px 48px;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* =====================================================================
   SHELL 2: WORKSPACE APPLICATION STYLES
   ===================================================================== */
.app-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-left: calc(var(--sidebar-width) + (var(--shell-gap) * 2));
  padding-right: var(--shell-gap);
}

.sidebar {
  position: fixed;
  top: var(--shell-gap);
  left: var(--shell-gap);
  bottom: var(--shell-gap);
  width: var(--sidebar-width);
  z-index: 40;
  background: var(--bg-sidebar);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-floating);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 4px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-violet));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-title-row h1 {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.version-pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.eyebrow,
.mono-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

.cmd-search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmd-search-trigger:hover {
  border-color: var(--border-highlight);
  color: var(--text-primary);
}

.cmd-search-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cmd-search-trigger kbd,
.cmd-palette-header kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.sidebar-nav-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-group-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 10px 2px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.84rem;
  border: 1px solid transparent;
  transition: all 0.14s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg,
      rgba(99, 102, 241, 0.18),
      rgba(99, 102, 241, 0.06));
  color: #fff;
  border-color: rgba(99, 102, 241, 0.35);
  font-weight: 600;
}

.nav-item.active .nav-svg {
  color: #a5b4fc;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.nav-count.accent {
  background: rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
}

.nav-count.warning {
  background: #fff3dc;
  color: #87520a;
}

.vault-status-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vault-status-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.vault-path-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-status-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.69rem;
  color: var(--text-muted);
}

/* FLOATING NAVBAR & MAIN STAGE */
.main-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 1480px;
  margin: 0 auto;
  padding-top: var(--shell-gap);
}

.floating-navbar {
  position: sticky;
  top: var(--shell-gap);
  z-index: 35;
  background: var(--bg-navbar);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-floating);
  flex-wrap: wrap;
}

.navbar-left h2 {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.navbar-center {
  position: relative;
  flex: 1;
  max-width: 560px;
}

.scan-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 4px 4px 4px 10px;
}

.scan-bar-prefix {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  padding-right: 6px;
  border-right: 1px solid var(--border-subtle);
}

.scan-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  padding: 5px 6px;
  outline: none;
  min-width: 140px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.status-dot-pulse.is-scanning {
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  animation: scan-status-pulse 1.1s ease-in-out infinite;
}

.scan-progress {
  position: absolute;
  right: 10px;
  bottom: -6px;
  left: 10px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
}

.scan-progress[hidden] {
  display: none;
}

.scan-progress span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-primary);
  animation: scan-progress-sweep 1.35s ease-in-out infinite;
}

.scan-bar #scanBtn:disabled {
  cursor: progress;
  opacity: 0.9;
  transform: none;
}

.scan-bar #scanBtn[aria-busy="true"] .scan-button-icon {
  animation: scan-icon-spin 1.2s linear infinite;
}

.scan-bar input:disabled {
  opacity: 0.65;
}

@keyframes scan-progress-sweep {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(280%);
  }
}

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

@keyframes scan-status-pulse {
  50% {
    opacity: 0.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot-pulse.is-scanning,
  .scan-progress span,
  .scan-bar #scanBtn[aria-busy="true"] .scan-button-icon {
    animation-duration: 3s;
  }
}

/* BUTTONS & INPUTS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.81rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn-icon-only {
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.input-text,
.input-select {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
}

.input-text {
  min-width: 240px;
}

/* WORKSPACE CARDS & GRIDS */
.view-container {
  padding: 18px 0 48px;
  width: 100%;
}

.view-page {
  display: none;
  animation: fadeSlideUp 0.18s ease-out;
}

.view-page.active {
  display: block;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.surface-card {
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-header.border-bottom {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 2px;
}

/* BADGES & FILE CHIPS */
.badge,
.pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.67rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.14);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.28);
}

.badge-emerald,
.pill.analyzed,
.chip {
  background: rgba(16, 185, 129, 0.13);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.pill.processing,
.pill.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.pill.failed {
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.file-ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #c7d2fe;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}

.file-ref-chip:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* OVERVIEW & KPI STRIP */
.overview-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.hero-banner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.14), transparent 55%),
    var(--bg-surface);
}

.hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.hero-banner h3 {
  font-size: clamp(1.3rem, 2vw, 1.68rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-banner p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.hero-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-query-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quick-input-group {
  display: flex;
  gap: 8px;
}

.quick-input-group input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.suggestion-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}

.suggestion-chip:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.12);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-card {
  padding: 15px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.kpi-icon {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.kpi-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.75rem;
  font-weight: 700;
}

.kpi-meta {
  font-size: 0.71rem;
  color: var(--text-muted);
}

.kpi-amber .kpi-value,
.kpi-amber .kpi-icon {
  color: #fbbf24;
}

.kpi-indigo .kpi-value,
.kpi-indigo .kpi-icon {
  color: #818cf8;
}

.kpi-emerald .kpi-value,
.kpi-emerald .kpi-icon {
  color: #34d399;
}

.overview-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card-list-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 270px;
  overflow-y: auto;
}

.mini-canvas-box {
  position: relative;
  height: 270px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.mini-canvas-box canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border-subtle);
  font-size: 0.71rem;
  color: #425b56;
  box-shadow: 0 3px 12px rgba(28, 58, 51, 0.08);
}

.dot-ind {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

.dot-ind.file {
  background: var(--accent-primary);
}

.dot-ind.event {
  background: var(--accent-cyan);
}

.dot-ind.action {
  background: var(--accent-amber);
}

.clean-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item,
.source-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.14s ease;
}

.file-item:hover,
.source-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--border-highlight);
}

.file-item strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.87rem;
}

.file-item span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  color: var(--text-muted);
}

.file-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.file-ignore-btn {
  width: 30px;
  height: 30px;
  color: var(--text-muted);
}

.file-ignore-btn:hover {
  color: var(--accent-primary);
}

.file-action-menu {
  position: fixed;
  z-index: 4900;
  display: grid;
  min-width: 190px;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-popover);
}

.file-action-menu-label {
  max-width: 250px;
  overflow: hidden;
  padding-inline: 4px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-action-menu .btn {
  justify-content: flex-start;
}

/* ASK AI STUDIO */
.studio-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  align-items: start;
}

.chat-pane {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 125px);
  min-height: 540px;
}

.studio-suggestions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  padding: 13px 16px;
  border-radius: var(--radius-lg);
  max-width: 88%;
  line-height: 1.55;
  font-size: 0.89rem;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: #f2f7f5;
  border: 1px solid var(--border-default);
  border-bottom-left-radius: 4px;
}

.bubble-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.67rem;
  opacity: 0.75;
}

.bubble-citations {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.chat-input-bar input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
}

.evidence-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.grounding-meter {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.grounding-meter-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.meter-bar-bg {
  height: 6px;
  background: #e3ece9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.meter-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-emerald));
  transition: width 0.3s ease;
}

.grounding-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.evidence-block-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.evidence-block-header small {
  color: var(--text-muted);
  font-size: 0.71rem;
}

.latest-answer-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
}

.latest-answer-card p {
  margin-top: 6px;
  font-size: 0.81rem;
  color: var(--text-secondary);
}

/* GRAPH, FILES, EXPLORER, KANBAN & TELEMETRY */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.full-canvas-container {
  position: relative;
  height: 620px;
  background: #06070c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.full-canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.graph-floating-hud {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(12, 14, 22, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  font-size: 0.77rem;
  color: var(--text-secondary);
}

.graph-floating-hud ul {
  margin: 6px 0 10px;
  padding-left: 16px;
}

.hud-counter {
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  color: #a5b4fc;
}

.files-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.vault-file-card {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 15px;
}

.explorer-header-card {
  margin-bottom: 16px;
}

.segmented-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.seg-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
}

.seg-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.entity-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.context-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 14px;
}

.context-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.structured-group-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.structured-row {
  font-size: 0.79rem;
  color: var(--text-secondary);
}

.structured-row strong {
  color: var(--text-primary);
  margin-right: 6px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.kanban-column {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-default);
  font-weight: 600;
  font-size: 0.84rem;
}

.kanban-title-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.kanban-col-header.amber {
  border-color: var(--accent-amber);
}

.kanban-col-header.rose {
  border-color: var(--accent-rose);
}

.kanban-col-header.emerald {
  border-color: var(--accent-emerald);
}

.kanban-col-header.indigo {
  border-color: var(--accent-primary);
}

.kanban-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #edf3f1;
  color: #425b56;
}

.kanban-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.83rem;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.telemetry-split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  align-items: start;
}

.relation-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.confidence {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.73rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.Block-subtitle {
  font-size: 0.84rem;
  margin: 16px 0 10px;
  color: var(--text-secondary);
}

/* HOVER QUICK-PEEK POPOVER & DRAWER */
.hover-peek-card {
  position: fixed;
  z-index: 9999;
  width: 360px;
  background: rgba(13, 16, 26, 0.96);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(99, 102, 241, 0.45);
  border-radius: var(--radius-2xl);
  padding: 14px;
  box-shadow: var(--shadow-popover);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.hover-peek-card.hidden {
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  visibility: hidden;
}

.peek-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.peek-ext {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.peek-title {
  flex: 1;
  min-width: 0;
}

.peek-title strong {
  display: block;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.peek-title span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.peek-summary {
  font-size: 0.79rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.peek-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.peek-code-preview {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  color: #334f49;
  background: #06080d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px;
  max-height: 105px;
  overflow: hidden;
  white-space: pre-wrap;
}

.peek-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: #a5b4fc;
}

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop.hidden,
.modal-backdrop.hidden {
  display: none;
}

.inspector-drawer {
  width: min(720px, 94vw);
  height: 100vh;
  background: #0b0e17;
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.75);
}

.drawer-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-actions {
  display: flex;
  gap: 8px;
}

.drawer-meta-bar {
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  color: var(--text-secondary);
}

.drawer-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
}

.drawer-tab.active {
  background: rgba(99, 102, 241, 0.16);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.35);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
}

.insp-pane {
  display: none;
}

.insp-pane.active {
  display: block;
}

.preview-box {
  background: #06080d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  min-height: 240px;
}

.json-code-block {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.77rem;
  line-height: 1.55;
  color: #263f3a;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.preview-image {
  max-width: 100%;
  border-radius: var(--radius-md);
  display: block;
  margin: 0 auto;
}

.preview-pdf {
  width: 100%;
  height: 520px;
  border: none;
  border-radius: var(--radius-md);
}

.modal-backdrop {
  justify-content: center;
  align-items: flex-start;
  padding-top: 13vh;
}

.cmd-palette-modal {
  width: min(580px, 92vw);
  background: #101320;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-popover);
}

.cmd-palette-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.cmd-palette-header input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.cmd-palette-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.cmd-item:hover {
  background: rgba(99, 102, 241, 0.14);
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #131726;
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-primary);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.81rem;
  box-shadow: var(--shadow-popover);
}

.upload-page-card {
  max-width: 980px;
  margin: 0 auto;
}

.upload-dropzone {
  position: relative;
  display: flex;
  min-height: 260px;
  margin: 28px 0 18px;
  padding: 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed var(--border-default);
  border-radius: var(--radius-xl);
  background: rgba(248, 251, 250, 0.72);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragging {
  border-color: var(--accent-primary);
  background: rgba(13, 148, 136, 0.07);
}

.upload-dropzone.is-dragging {
  transform: scale(1.01);
}

.upload-dropzone:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.32);
  outline-offset: 3px;
}

.upload-dropzone strong {
  color: var(--text-primary);
  font-size: 1.1rem;
}

.upload-dropzone small,
.upload-file-row small {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.upload-icon-wrap {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  place-items: center;
  border-radius: 14px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent-primary);
}

.upload-browse {
  color: var(--accent-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.upload-queue {
  display: grid;
  gap: 8px;
}

.upload-queue-empty {
  padding: 16px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: center;
}

.upload-file-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.upload-file-name {
  overflow: hidden;
  flex: 1;
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-remove-file {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.upload-actions {
  display: flex;
  margin-top: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.upload-status {
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .upload-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-actions .toolbar-actions {
    justify-content: flex-end;
  }
}

.empty-state {
  color: var(--text-muted);
  padding: 20px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: 0.81rem;
}

/* ==================== PRODUCT-WIDE VISUAL FINISH ==================== */
.ambient-lighting {
  opacity: 0.72;
}

.spotlight-top {
  background: radial-gradient(circle, rgba(20, 184, 166, 0.2), transparent 70%);
}

.spotlight-center {
  background: radial-gradient(circle, rgba(251, 146, 60, 0.13), transparent 70%);
}

.spotlight-bottom {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.13), transparent 70%);
}

.landing-navbar,
.floating-navbar {
  filter: drop-shadow(0 12px 26px rgba(30, 62, 55, 0.07));
}

.landing-nav-inner,
.floating-navbar {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(31, 73, 64, 0.12);
}

.hero-section {
  padding-top: 78px;
  background-image: radial-gradient(ellipse at 50% 8%, rgba(20, 184, 166, 0.1), transparent 54%);
}

.hero-display-title {
  color: #163b38;
  text-shadow: 0 2px 24px rgba(255, 255, 255, 0.75);
}

.serif-gradient {
  background-image: linear-gradient(110deg, #0f766e 5%, #16845b 48%, #d15b43 100%);
}

.hero-pill-banner {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 118, 110, 0.2);
  color: #315c57;
  box-shadow: 0 8px 24px rgba(38, 86, 76, 0.06);
}

.pill-spark {
  background: #0f766e;
}

.hero-telemetry-ribbon {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(31, 73, 64, 0.12);
  box-shadow: 0 12px 30px rgba(38, 86, 76, 0.07);
}

.showcase-glow {
  background: linear-gradient(125deg, rgba(20, 184, 166, 0.22), rgba(251, 146, 60, 0.18), rgba(59, 130, 246, 0.16));
}

.showcase-window,
.code-mini-pill,
.vault-path-display,
.cmd-search-trigger,
.scan-bar,
.quick-input-group input,
.chat-input-bar input,
.grounding-meter,
.mini-canvas-box,
.full-canvas-container,
.peek-code-preview,
.preview-box,
.cmd-palette-modal,
.toast {
  background-color: rgba(255, 255, 255, 0.94);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.showcase-window {
  background-image: radial-gradient(
    500px circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
    rgba(20, 184, 166, 0.11),
    transparent 72%
  );
  box-shadow: 0 28px 80px rgba(30, 62, 55, 0.16);
}

.bento-feature,
.landing-start-card,
.journey-visual {
  background-image: radial-gradient(
    280px circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
    rgba(20, 184, 166, 0.1),
    transparent 74%
  );
}

.window-chrome,
.drawer-meta-bar {
  background: rgba(237, 245, 242, 0.8);
}

.win-tab.active,
.seg-tab.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.showcase-answer-box,
.demo-source-card,
.latest-answer-card,
.file-item,
.source-card,
.kanban-card,
.relation-item {
  background: rgba(248, 251, 250, 0.92);
}

.pipe-node {
  background: #e5f5f1;
  border-color: rgba(15, 118, 110, 0.24);
  color: #155e58;
}

.showcase-query-pill {
  background: #e5f5f1;
  border-color: rgba(15, 118, 110, 0.2);
  color: #155e58;
}

.code-mini-pill {
  background: #f5f8f7;
}

.code-mini-pill {
  color: #16845b;
}

.sidebar {
  background: var(--bg-sidebar);
  border-color: rgba(31, 73, 64, 0.12);
  padding: 14px 12px;
  gap: 8px;
}

.sidebar-top {
  gap: 10px;
}

.sidebar-nav-container {
  gap: 8px;
  justify-content: flex-start;
}

.sidebar .nav-group {
  gap: 2px;
}

.sidebar .nav-group-label {
  padding-inline: 8px;
}

.sidebar .nav-item {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.81rem;
}

.sidebar .nav-item-left {
  gap: 8px;
}

.sidebar .nav-count {
  padding-inline: 6px;
}

.vault-status-card {
  background: #f3f7f5;
  padding: 8px 9px;
  gap: 4px;
}

.vault-status-hint {
  font-size: 0.66rem;
  line-height: 1.35;
}

.nav-item.active {
  background: linear-gradient(100deg, rgba(20, 184, 166, 0.15), rgba(59, 130, 246, 0.07));
  border-color: rgba(15, 118, 110, 0.19);
  color: #155e58;
}

.nav-item.active .nav-svg {
  color: #0f766e;
}

.brand-mark {
  background: linear-gradient(135deg, #0f766e, #1d9a78 58%, #f09a54);
  box-shadow: 0 5px 16px rgba(15, 118, 110, 0.24);
}

.version-pill,
.nav-count.accent {
  background: rgba(20, 184, 166, 0.1);
  border-color: rgba(15, 118, 110, 0.19);
  color: #0f766e;
}

.btn-primary {
  background: linear-gradient(115deg, #0f766e, #16845b);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.17);
}

.btn-primary:hover {
  background: linear-gradient(115deg, #115e59, #146c4c);
  box-shadow: 0 7px 18px rgba(15, 118, 110, 0.24);
}

.btn-secondary,
.btn-ghost,
.btn-icon-only {
  background-color: rgba(255, 255, 255, 0.78);
  border-color: var(--border-default);
  color: #3b5551;
}

.btn-secondary:hover,
.btn-ghost:hover,
.btn-icon-only:hover {
  background: #eaf4f1;
  border-color: rgba(15, 118, 110, 0.28);
  color: #155e58;
}

.hero-banner {
  background:
    radial-gradient(circle at 90% 5%, rgba(20, 184, 166, 0.15), transparent 44%),
    radial-gradient(circle at 5% 100%, rgba(251, 146, 60, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.93);
}

.kpi-card:nth-child(1) { border-top: 3px solid #0f766e; }
.kpi-card:nth-child(2) { border-top: 3px solid #7c3aed; }
.kpi-card:nth-child(3) { border-top: 3px solid #087e9b; }
.kpi-card:nth-child(4) { border-top: 3px solid #c27b14; }
.kpi-card:nth-child(5) { border-top: 3px solid #d44764; }
.kpi-card:nth-child(6) { border-top: 3px solid #16845b; }

.kpi-card:hover,
.surface-card,
.demo-source-card,
.file-item,
.source-card,
.suggestion-chip,
.seg-tab,
.win-tab,
.nav-item,
.btn,
.file-ref-chip {
  transition:
    transform 260ms cubic-bezier(0.2, 0.75, 0.25, 1),
    box-shadow 260ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    color 180ms ease;
}

.surface-card:hover {
  border-color: rgba(15, 118, 110, 0.19);
}

.context-card:hover,
.kanban-card:hover,
.relation-item:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 10px 24px rgba(28, 58, 51, 0.1);
}

.product-bento-grid .bento-feature:nth-child(3n + 1) { border-top: 3px solid rgba(15, 118, 110, 0.7); }
.product-bento-grid .bento-feature:nth-child(3n + 2) { border-top: 3px solid rgba(212, 71, 100, 0.65); }
.product-bento-grid .bento-feature:nth-child(3n) { border-top: 3px solid rgba(8, 126, 155, 0.65); }

.view-page.active {
  animation: pageArrival 440ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.view-page.active .surface-card,
.view-page.active .kpi-card {
  animation: cardArrival 520ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.view-page.active .surface-card:nth-child(2),
.view-page.active .kpi-card:nth-child(2) { animation-delay: 45ms; }
.view-page.active .surface-card:nth-child(3),
.view-page.active .kpi-card:nth-child(3) { animation-delay: 90ms; }
.view-page.active .surface-card:nth-child(4),
.view-page.active .kpi-card:nth-child(4) { animation-delay: 135ms; }

.scroll-reveal {
  opacity: 0;
  filter: blur(2px);
  transform: translateY(20px) scale(0.99);
  transition:
    opacity 620ms cubic-bezier(0.2, 0.75, 0.25, 1),
    filter 620ms ease,
    transform 620ms cubic-bezier(0.2, 0.75, 0.25, 1);
  transition-delay: var(--motion-delay, 0ms);
}

.scroll-reveal.is-visible {
  opacity: 1;
  filter: none;
  transform: none;
}

.showcase-content-enter {
  animation: showcaseContentEnter 420ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

@keyframes showcaseContentEnter {
  from { opacity: 0.45; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes cardArrival {
  from { opacity: 0.35; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-shell .hero-container > * {
  animation: cardArrival 650ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.landing-shell .hero-container > *:nth-child(2) { animation-delay: 60ms; }
.landing-shell .hero-container > *:nth-child(3) { animation-delay: 120ms; }
.landing-shell .hero-container > *:nth-child(4) { animation-delay: 180ms; }
.landing-shell .hero-container > *:nth-child(5) { animation-delay: 240ms; }

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(8, 126, 155, 0.42);
  outline-offset: 3px;
}

.suggestion-chip:hover,
.seg-tab:hover,
.win-tab:hover {
  border-color: rgba(15, 118, 110, 0.3);
  color: #155e58;
  background-color: rgba(20, 184, 166, 0.09);
}

.chat-bubble.user {
  background: linear-gradient(120deg, #0f766e, #16845b);
}

.full-canvas-container {
  background-color: #f7faf9;
  background-image:
    radial-gradient(ellipse at 48% 45%, rgba(20, 184, 166, 0.07), transparent 58%),
    radial-gradient(rgba(15, 118, 110, 0.13) 1px, transparent 1px);
  background-size: auto, 22px 22px;
}

.graph-floating-hud {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-secondary);
  box-shadow: 0 8px 24px rgba(28, 58, 51, 0.1);
  border-color: rgba(31, 73, 64, 0.15);
  padding: 13px 14px;
  max-width: 270px;
}

.graph-floating-hud > .mono-label {
  color: #0f766e;
}

.graph-node-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.graph-node-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #425b56;
  font-size: 0.71rem;
  font-weight: 600;
}

.graph-key-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
}

.graph-key-dot.file { background: #0f766e; }
.graph-key-dot.event { background: #087e9b; }
.graph-key-dot.action { background: #a86104; }

.hud-counter {
  color: #46578f;
}

#view-dashboard .hero-banner {
  gap: 15px;
  padding: 24px;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(20, 184, 166, 0.14), transparent 42%),
    radial-gradient(ellipse at 0% 100%, rgba(251, 146, 60, 0.09), transparent 44%),
    rgba(255, 255, 255, 0.94);
}

#view-dashboard .hero-banner h3 {
  max-width: 620px;
  margin-bottom: 0;
  color: #183a35;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  line-height: 1.16;
}

#view-dashboard .hero-banner p {
  max-width: 650px;
  margin-bottom: 0;
  color: #4c625d;
}

.dashboard-focus-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(31, 73, 64, 0.12);
  border-left: 3px solid #b66a08;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.dashboard-focus-card[data-priority="deadline"] {
  border-left-color: #bc3954;
}

.dashboard-focus-card[data-priority="clear"] {
  border-left-color: #16845b;
}

.dashboard-focus-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: #fff3dc;
  color: #87520a;
}

.dashboard-focus-card[data-priority="deadline"] .dashboard-focus-icon {
  background: #ffedf0;
  color: #a9324c;
}

.dashboard-focus-card[data-priority="clear"] .dashboard-focus-icon {
  background: #e7f5ed;
  color: #176b4b;
}

.dashboard-focus-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.dashboard-focus-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dashboard-focus-heading .mono-label {
  color: #526664;
}

.dashboard-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #176b4b;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  font-weight: 700;
}

.dashboard-focus-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  color: #203b37;
  font-size: 0.84rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-focus-source {
  display: flex;
  min-height: 19px;
  align-items: center;
}

.dashboard-focus-source .file-ref-chip {
  padding: 2px 7px;
  font-size: 0.65rem;
}

.dashboard-focus-card > .btn {
  min-height: 34px;
}

#view-dashboard .quick-query-card {
  position: relative;
  justify-content: flex-start;
  gap: 16px;
  padding: 22px;
  overflow: hidden;
  border-top: 3px solid #087e9b;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(8, 126, 155, 0.12), transparent 48%),
    radial-gradient(ellipse at 0% 100%, rgba(20, 184, 166, 0.06), transparent 48%),
    rgba(255, 255, 255, 0.94);
}

#view-dashboard .quick-query-card .card-top-row {
  min-height: 25px;
}

#view-dashboard .quick-query-card .badge-subtle {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(31, 73, 64, 0.12);
  color: #425b56;
}

#view-dashboard .quick-query-card h4 {
  margin: 0;
  color: #183a35;
  font-size: 1.28rem;
  line-height: 1.25;
}

#view-dashboard .quick-input-group {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  padding: 4px;
  border: 1px solid rgba(31, 73, 64, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(28, 58, 51, 0.06);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

#view-dashboard .quick-input-group:focus-within {
  border-color: rgba(15, 118, 110, 0.58);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1), 0 8px 20px rgba(28, 58, 51, 0.08);
}

.quick-query-search-icon {
  display: grid;
  place-items: center;
  color: #667773;
}

#view-dashboard .quick-input-group input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #203b37;
  font-size: 0.82rem;
}

#view-dashboard .quick-input-group input:focus-visible {
  outline: none;
}

#view-dashboard .quick-input-group input::placeholder {
  color: #667773;
  opacity: 1;
}

#view-dashboard .quick-input-group .btn {
  min-height: 42px;
  padding-inline: 13px;
  border-radius: 8px;
}

#view-dashboard .quick-query-card .chip-group {
  gap: 7px;
}

.quick-query-suggestions-label {
  flex-basis: 100%;
  margin-bottom: 1px;
  color: #526664;
  font-size: 0.72rem;
  font-weight: 600;
}

#view-dashboard .quick-query-card .suggestion-chip {
  padding: 6px 9px;
  border: 1px solid rgba(31, 73, 64, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #425b56;
  font-size: 0.7rem;
  font-weight: 600;
}

#view-dashboard .quick-query-card .suggestion-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.32);
  background: #fff;
  color: #155e58;
  box-shadow: 0 4px 12px rgba(28, 58, 51, 0.08);
}

#view-dashboard .kpi-card {
  position: relative;
  min-height: 140px;
  overflow: hidden;
  gap: 8px;
  padding: 15px 16px 16px;
  box-shadow: 0 7px 20px rgba(28, 58, 51, 0.06);
}

#view-dashboard .kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(28, 58, 51, 0.12);
}

#view-dashboard .kpi-label {
  color: #425b56;
  font-weight: 600;
}

#view-dashboard .kpi-value {
  font-size: 2rem;
  line-height: 1.1;
}

#view-dashboard .kpi-icon {
  width: 32px;
  height: 32px;
  padding: 8px;
  border-radius: 9px;
  background: #edf3f1;
}

#view-dashboard .kpi-card:nth-child(1) .kpi-icon { background: #e5f5f1; color: #0f766e; }
#view-dashboard .kpi-card:nth-child(2) .kpi-icon { background: #edf0ff; color: #5366ad; }
#view-dashboard .kpi-card:nth-child(3) .kpi-icon { background: #e5f5f8; color: #087e9b; }
#view-dashboard .kpi-card:nth-child(4) .kpi-icon { background: #fff3dc; color: #98600a; }
#view-dashboard .kpi-card:nth-child(5) .kpi-icon { background: #ffedf0; color: #bc3954; }
#view-dashboard .kpi-card:nth-child(6) .kpi-icon { background: #e7f5ed; color: #13734f; }

#view-dashboard .kpi-meta {
  color: #667773;
  line-height: 1.35;
}

#view-dashboard .bento-item {
  min-width: 0;
  border-color: rgba(31, 73, 64, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

#view-dashboard .bento-item > .section-header {
  min-height: 40px;
}

#view-dashboard .bento-item > .section-header h3 {
  color: #203b37;
  font-size: 1.04rem;
}

#view-dashboard .mini-canvas-box {
  height: 292px;
  border-color: rgba(31, 73, 64, 0.14);
  background:
    radial-gradient(ellipse at 50% 45%, rgba(20, 184, 166, 0.07), transparent 65%),
    #f7faf9;
}

#view-dashboard #dashboardActionFeed .kanban-card {
  padding: 11px 12px;
  border-color: rgba(31, 73, 64, 0.1);
  background: #f8fbf9;
}

#view-dashboard #dashboardActionFeed .kanban-card p {
  color: #304943;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .dashboard-focus-card {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .dashboard-focus-card > .btn {
    grid-column: 2;
    justify-self: start;
  }

  #view-dashboard .mini-canvas-box {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .dashboard-focus-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-focus-card > .btn {
    grid-column: 1;
    justify-self: stretch;
  }
}

.hover-peek-card,
.inspector-drawer,
.cmd-palette-modal {
  background-color: rgba(255, 255, 255, 0.98);
  color: var(--text-primary);
}

.hover-peek-card {
  border-color: rgba(15, 118, 110, 0.3);
}

.drawer-backdrop,
.modal-backdrop {
  background: rgba(24, 43, 40, 0.28);
}

.toast {
  border-left-color: #0f766e;
  box-shadow: 0 14px 36px rgba(28, 58, 51, 0.18);
}

@media (max-width: 760px) {
  .landing-navbar {
    top: 8px;
    padding: 0 10px;
  }

  .landing-nav-inner {
    gap: 10px;
    padding: 9px 12px;
    border-radius: 16px;
  }

  .landing-nav-links,
  #landingCmdBtn,
  .version-pill {
    display: none;
  }

  .landing-nav-Right .btn-primary {
    padding: 8px 10px;
    font-size: 0.75rem;
  }

  .hero-section {
    padding: 48px 16px 52px;
  }

  .hero-display-title {
    font-size: clamp(2.25rem, 10vw, 3.8rem);
  }

  .hero-telemetry-ribbon {
    width: 100%;
    gap: 14px;
    padding: 13px 10px;
    border-radius: 16px;
  }

  .ribbon-divider { height: 22px; }

  .showcase-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
  }

  .showcase-pipe {
    flex-direction: row;
  }

  .pipe-line {
    width: auto;
    height: 2px;
    flex: 1;
  }

  .window-status { display: none; }

  .landing-section { padding: 42px 16px; }
  .landing-start-section { padding-bottom: 56px; }
  .landing-start-grid { grid-template-columns: minmax(0, 1fr); }
  .landing-start-card { min-height: 0; }
  .landing-start-actions { align-items: stretch; flex-direction: column; }

  .overview-hero-grid,
  .overview-bento,
  .studio-grid,
  .kanban-board,
  .telemetry-split,
  .product-bento-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .span-8,
  .span-4 { grid-column: auto; }

  .app-layout {
    padding: 0 12px;
  }

  .sidebar {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
  }

  .sidebar-nav-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .sidebar-footer { display: none; }

  .floating-navbar {
    top: 8px;
    padding: 12px;
    gap: 10px;
  }

  .navbar-center {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

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

  .view-container { padding-top: 12px; }

  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  .chat-pane {
    height: min(68vh, 680px);
    min-height: 430px;
  }

  .full-canvas-container { height: 70vh; min-height: 420px; }

  .graph-floating-hud {
    top: 8px;
    right: 8px;
    max-width: min(250px, calc(100% - 16px));
  }

  .files-grid,
  .context-cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .input-text { min-width: 0; width: 100%; }

  .toolbar-actions { width: 100%; }

  .toolbar-actions > * { min-width: 0; }
}

@media (max-width: 480px) {
  .landing-brand { gap: 7px; }
  .brand-name { font-size: 0.92rem; }
  .brand-mark { width: 31px; height: 31px; }

  .hero-pill-banner {
    justify-content: center;
    font-size: 0.7rem;
  }

  .hero-cta-group {
    width: 100%;
    align-items: stretch;
  }

  .hero-cta-group .btn { width: 100%; }

  .ribbon-stat { min-width: 38%; }
  .ribbon-divider { display: none; }

  .window-tabs { width: 100%; }
  .win-tab { flex: 1 1 100%; justify-content: flex-start; }

  .sidebar-nav-container { grid-template-columns: minmax(0, 1fr); }

  .nav-item { min-height: 40px; }

  .scan-bar { flex-wrap: wrap; }
  .scan-bar input { min-width: 0; }
  .scan-bar #scanBtn { flex: 1; }

  .kpi-grid { grid-template-columns: minmax(0, 1fr); }

  .surface-card { padding: 15px; }

  .quick-input-group,
  .chat-input-bar { align-items: stretch; }

  .quick-input-group .btn,
  .chat-input-bar .btn { padding-inline: 10px; }

  .toast-container { left: 12px; right: 12px; bottom: 12px; }
}

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

.indigo-text { color: #5366ad; }
.violet-text { color: #7342ba; }
.amber-text { color: #98600a; }
.cyan-text { color: #087e9b; }
.emerald-text { color: #13734f; }
.rose-text { color: #bc3954; }

.badge-indigo,
.nav-count.accent,
.peek-ext,
.confidence {
  background: #edf0ff;
  border-color: rgba(83, 102, 173, 0.2);
  color: #46578f;
}

.badge-emerald,
.pill.analyzed,
.chip {
  background: #e7f5ed;
  border-color: rgba(22, 132, 91, 0.2);
  color: #176b4b;
}

.pill.processing,
.pill.warning {
  background: #fff3dc;
  border-color: rgba(182, 106, 8, 0.22);
  color: #87520a;
}

.pill.failed {
  background: #ffedf0;
  border-color: rgba(212, 71, 100, 0.2);
  color: #a9324c;
}

.badge-subtle {
  background: #f1f5f4;
  color: #526664;
}

.feature-icon-box.indigo { background: #edf0ff; color: #5366ad; }
.feature-icon-box.emerald { background: #e7f5ed; color: #176b4b; }
.feature-icon-box.cyan { background: #e5f5f8; color: #087e9b; }
.feature-icon-box.amber { background: #fff3dc; color: #98600a; }
.feature-icon-box.rose { background: #ffedf0; color: #bc3954; }

.file-ref-chip {
  background: #eef0ff;
  border-color: rgba(83, 102, 173, 0.18);
  color: #46578f;
}

.peek-footer,
.hud-counter { color: #46578f; }

.kpi-amber .kpi-value,
.kpi-amber .kpi-icon { color: #98600a; }
.kpi-indigo .kpi-value,
.kpi-indigo .kpi-icon { color: #5366ad; }
.kpi-emerald .kpi-value,
.kpi-emerald .kpi-icon { color: #13734f; }

@media (max-width: 1100px) {
  .app-layout {
    padding-left: var(--shell-gap);
  }

  .sidebar {
    position: relative;
    top: 0;
    left: 0;
    bottom: auto;
    width: 100%;
    margin-top: var(--shell-gap);
  }

  .showcase-body,
  .overview-hero-grid,
  .overview-bento,
  .studio-grid,
  .kanban-board,
  .telemetry-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .span-8,
  .span-4 {
    grid-column: span 12;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 360px) {
  .app-layout {
    padding-inline: 8px;
  }

  .view-page,
  .view-page > *,
  .view-page > * > * {
    min-width: 0;
  }

  .telemetry-split > .surface-card,
  .studio-grid > .surface-card,
  .studio-grid > aside {
    width: 100%;
    min-width: 0;
  }

  .relation-item {
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 8px;
  }

  .relation-item > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .relation-item > .confidence {
    grid-column: 2;
    justify-self: start;
  }

  .relation-item .file-ref-chip {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #view-ask .chat-input-bar input {
    min-width: 0;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  .landing-navbar {
    padding-inline: 14px;
  }

  .landing-nav-inner {
    gap: 12px;
    padding: 9px 14px;
    border-radius: 18px;
  }

  .landing-nav-links,
  #landingCmdBtn {
    display: none;
  }
}

/* RESPONSIVE LAYOUTS */
@media (min-width: 1440px) {
  .hero-section { padding-top: 92px; }
  .hero-container,
  .section-container { max-width: 1320px; }
  .hero-display-title { max-width: 1040px; }
  .app-layout { --sidebar-width: 248px; --shell-gap: 20px; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .app-layout { padding-inline: 18px; }
  .sidebar {
    padding: 14px;
    overflow: visible;
  }
  .sidebar-nav-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-block: 8px;
  }
  .sidebar .nav-group-label { padding-inline: 6px; }
  .sidebar .nav-item { min-height: 40px; }
  .main-wrapper { padding-top: 14px; }
  .floating-navbar { top: 10px; }
  .kanban-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .context-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  html,
  body { min-height: 100%; }

  .landing-navbar {
    top: max(6px, env(safe-area-inset-top));
    padding-inline: 10px;
  }
  .landing-nav-inner {
    min-height: 52px;
    padding: 7px 10px;
    gap: 8px;
  }
  .landing-nav-Right .btn-primary { min-height: 38px; }
  .hero-section { padding: 42px 16px 48px; }
  .hero-display-title {
    max-width: 680px;
    font-size: clamp(2.15rem, 8.5vw, 3.7rem);
    line-height: 1.08;
  }
  .hero-lead { max-width: 560px; font-size: 0.98rem; }
  .hero-pill-banner { max-width: 100%; justify-content: center; text-align: center; }
  .hero-telemetry-ribbon { max-width: 600px; }
  .hero-showcase-frame { transform: none; }
  .showcase-glow { inset: -8px; filter: blur(28px); }
  .showcase-window { border-radius: 16px; }
  .window-chrome { align-items: flex-start; }
  .landing-start-grid { gap: 12px; }
  .landing-start-card { padding: 20px; }
  .landing-footer { padding: 24px 16px calc(32px + env(safe-area-inset-bottom)); }
  .footer-inner { align-items: flex-start; }

  #workspaceShell.app-layout {
    min-height: 100svh;
    padding: 0 12px calc(86px + env(safe-area-inset-bottom));
  }
  #workspaceShell .sidebar {
    position: fixed;
    z-index: 100;
    top: auto;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    max-height: 78px;
    margin: 0;
    padding: 6px 8px;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(28, 58, 51, 0.2);
  }
  #workspaceShell .sidebar-top,
  #workspaceShell .sidebar-footer,
  #workspaceShell .nav-group-label { display: none; }
  #workspaceShell .sidebar-nav-container {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  #workspaceShell .sidebar-nav-container::-webkit-scrollbar,
  #workspaceShell .side-nav::-webkit-scrollbar { display: none; }
  #workspaceShell .nav-group { display: contents; }
  #workspaceShell .side-nav {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 4px;
  }
  #workspaceShell .nav-item {
    display: flex;
    width: 76px;
    min-width: 76px;
    min-height: 58px;
    padding: 5px 4px;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    border-radius: 12px;
    font-size: 0.63rem;
    line-height: 1.2;
    text-align: center;
  }
  #workspaceShell .nav-item-left {
    min-width: 0;
    flex-direction: column;
    gap: 3px;
  }
  #workspaceShell .nav-item-left > span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #workspaceShell .nav-item .nav-count { display: none; }
  #workspaceShell .main-wrapper {
    min-width: 0;
    padding-top: max(8px, env(safe-area-inset-top));
  }
  #workspaceShell .floating-navbar {
    position: sticky;
    top: max(6px, env(safe-area-inset-top));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 10px;
    border-radius: 15px;
  }
  #workspaceShell .navbar-left { min-width: 0; }
  #workspaceShell .navbar-left h2 {
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #workspaceShell .navbar-left .mono-label {
    overflow: hidden;
    font-size: 0.56rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #workspaceShell .navbar-center {
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
  }
  #workspaceShell .scan-bar { min-width: 0; }
  #workspaceShell .scan-bar input {
    width: 100%;
    min-width: 0;
    font-size: 0.72rem;
  }
  #workspaceShell .scan-bar #scanBtn {
    min-height: 36px;
    padding-inline: 9px;
    white-space: nowrap;
  }
  #workspaceShell .scan-bar #refreshBtn { min-width: 36px; }
  #workspaceShell .status-pill { padding: 5px 8px; font-size: 0.68rem; }
  #workspaceShell .view-container { min-width: 0; padding: 12px 0 24px; }
  #workspaceShell .view-page,
  #workspaceShell .view-page > *,
  #workspaceShell .view-page > * > * { min-width: 0; }
  #workspaceShell .surface-card { padding: 16px; border-radius: 15px; }
  #workspaceShell .section-header { align-items: flex-start; }
  #workspaceShell .section-header > * { min-width: 0; }
  #workspaceShell .toolbar-actions { max-width: 100%; }
  #workspaceShell .toolbar-actions > * { max-width: 100%; }
  #workspaceShell .input-text,
  #workspaceShell .input-select { min-width: 0; max-width: 100%; }
  #workspaceShell .kanban-board,
  #workspaceShell .studio-grid,
  #workspaceShell .telemetry-split,
  #workspaceShell .overview-hero-grid,
  #workspaceShell .overview-bento,
  #workspaceShell .product-bento-grid,
  #workspaceShell .context-cards-grid,
  #workspaceShell .files-grid { grid-template-columns: minmax(0, 1fr); }
  #workspaceShell .span-8,
  #workspaceShell .span-4 { grid-column: auto; }
  #workspaceShell .chat-pane {
    height: min(62svh, 620px);
    min-height: 360px;
  }
  #workspaceShell .chat-messages { min-height: 180px; }
  #workspaceShell .full-canvas-container {
    height: min(65svh, 560px);
    min-height: 320px;
  }
  #workspaceShell .graph-floating-hud {
    top: 8px;
    right: 8px;
    max-width: min(220px, calc(100% - 16px));
    padding: 9px 10px;
    font-size: 0.68rem;
  }
  #workspaceShell .upload-dropzone {
    min-height: 200px;
    margin-block: 18px 14px;
    padding: 22px 14px;
  }
  #workspaceShell .upload-actions { align-items: stretch; }
  #workspaceShell .upload-actions .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #workspaceShell .upload-actions .toolbar-actions > * { justify-content: center; }

  .inspector-drawer {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }
  .drawer-header { gap: 10px; padding: 14px; }
  .drawer-header h3 { max-width: 42vw; overflow-wrap: anywhere; }
  .drawer-actions { flex: 0 0 auto; }
  .drawer-meta-bar { padding: 9px 14px; gap: 8px 12px; }
  .drawer-tabs {
    padding: 8px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .drawer-tab { min-width: max-content; padding: 7px 9px; }
  .drawer-body { padding: 14px; }
  .preview-pdf { height: 60dvh; }
  .modal-backdrop { align-items: flex-start; padding: max(8px, env(safe-area-inset-top)) 8px; }
  .cmd-palette-modal { width: 100%; max-height: calc(100dvh - 16px); }
  .cmd-palette-header { padding: 12px; }
  .cmd-palette-results { max-height: min(55dvh, 420px); }
  .hover-peek-card { display: none; }
}

@media (max-width: 600px) {
  .hero-section { padding-inline: 13px; }
  .hero-display-title { font-size: clamp(2rem, 9.5vw, 3.1rem); }
  .hero-pill-banner { gap: 7px; padding: 8px; }
  .hero-pill-banner > span:nth-child(2) { flex-basis: 100%; }
  .hero-pill-banner .pill-link { min-height: 34px; }
  .hero-telemetry-ribbon { gap: 12px 6px; padding: 12px 8px; }
  .ribbon-stat { min-width: 42%; }
  .ribbon-stat .mono-label { font-size: 0.56rem; }
  .ribbon-stat strong { font-size: 1rem; }
  .ribbon-divider { display: none; }
  .window-chrome { padding: 10px 12px; }
  .window-tabs { width: 100%; gap: 5px; }
  .win-tab { min-height: 38px; flex: 1 1 100%; justify-content: flex-start; }
  .showcase-body { padding: 14px; }
  .landing-section { padding: 38px 13px; }
  .section-title-block { margin-bottom: 26px; }
  .section-title-block h2 { font-size: clamp(1.55rem, 7vw, 2rem); }
  .landing-start-card { gap: 10px; }
  .landing-start-actions .btn { width: 100%; }
  .journey-tabs { width: 100%; }
  .journey-tab { min-width: 0; flex: 1 1 0; }
  .journey-progress-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .journey-progress { width: 100%; }

  #workspaceShell.app-layout { padding-inline: 9px; }
  #workspaceShell .floating-navbar { padding: 9px; }
  #workspaceShell .navbar-left .mono-label { display: none; }
  #workspaceShell .navbar-left h2 { margin: 0; }
  #workspaceShell .scan-bar { gap: 4px; padding-left: 6px; }
  #workspaceShell .scan-bar-prefix { padding-right: 4px; }
  #workspaceShell .scan-bar #scanBtn { gap: 5px; padding-inline: 7px; font-size: 0.72rem; }
  #workspaceShell .scan-bar #scanBtn .icon-sm { width: 13px; height: 13px; }
  #workspaceShell .status-pill { gap: 5px; }
  #workspaceShell .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #workspaceShell .kpi-card { min-width: 0; padding: 12px; }
  #workspaceShell .kpi-value { font-size: 1.3rem; }
  #workspaceShell .dashboard-focus-card { padding: 12px; }
  #workspaceShell .chat-pane { height: 58svh; min-height: 340px; }
  #workspaceShell .chat-bubble { max-width: 95%; padding: 11px 12px; }
  #workspaceShell .chat-input-bar { align-items: stretch; gap: 6px; }
  #workspaceShell .chat-input-bar input { min-width: 0; padding-inline: 10px; }
  #workspaceShell .chat-input-bar .btn { min-width: 42px; padding-inline: 9px; }
  #workspaceShell .relation-item { grid-template-columns: 8px minmax(0, 1fr); gap: 8px; }
  #workspaceShell .relation-item > .confidence { grid-column: 2; justify-self: start; }
  #workspaceShell .file-item,
  #workspaceShell .source-card { align-items: flex-start; }
  #workspaceShell .file-item > *,
  #workspaceShell .source-card > * { min-width: 0; overflow-wrap: anywhere; }
  .toast-container { right: 10px; bottom: calc(88px + env(safe-area-inset-bottom)); left: 10px; }
  .toast { max-width: 100%; }

  .drawer-actions .btn span,
  .drawer-actions .btn { gap: 5px; }
  .drawer-header { align-items: flex-start; }
}

@media (max-width: 420px) {
  .landing-navbar { padding-inline: 7px; }
  .landing-nav-inner { padding-inline: 8px; }
  .landing-brand { gap: 6px; }
  .brand-name { font-size: 0.86rem; }
  .landing-nav-Right .btn-primary { padding-inline: 8px; font-size: 0.7rem; }
  .landing-nav-Right .btn-primary .icon-sm { display: none; }
  .hero-display-title { font-size: clamp(1.85rem, 9.5vw, 2.5rem); }
  .hero-lead { font-size: 0.9rem; }
  .hero-cta-group .btn { min-height: 46px; padding: 10px 12px; }
  .landing-start-actions { gap: 8px; }
  .landing-start-card { padding: 17px; }
  .journey-header h2 { font-size: 1.55rem; }
  .journey-copy h3 { font-size: 1.35rem; }

  #workspaceShell.app-layout { padding-inline: 7px; }
  #workspaceShell .sidebar { right: 5px; left: 5px; padding-inline: 5px; }
  #workspaceShell .nav-item { width: 68px; min-width: 68px; font-size: 0.6rem; }
  #workspaceShell .navbar-right .status-pill #statusText { max-width: 52px; overflow: hidden; text-overflow: ellipsis; }
  #workspaceShell .scan-bar input { font-size: 0.66rem; }
  #workspaceShell .scan-bar #scanBtn { min-width: 36px; }
  #workspaceShell .scan-bar #scanBtn > span { max-width: 50px; overflow: hidden; text-overflow: ellipsis; }
  #workspaceShell .surface-card { padding: 13px; }
  #workspaceShell .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  #workspaceShell .section-header { gap: 8px; }
  #workspaceShell .toolbar-actions { gap: 6px; }
  #workspaceShell .toolbar-actions .btn { padding-inline: 8px; font-size: 0.72rem; }
  #workspaceShell .upload-actions .toolbar-actions { grid-template-columns: minmax(0, 1fr); }
  #workspaceShell .upload-file-row { align-items: flex-start; padding: 8px; }
  #workspaceShell .graph-floating-hud { max-width: 165px; }

  .drawer-header { flex-wrap: wrap; }
  .drawer-header > div:first-child { min-width: 0; }
  .drawer-header h3 { max-width: 90vw; }
  .drawer-actions { width: 100%; justify-content: flex-end; }
  .drawer-meta-bar { font-size: 0.62rem; }
}

@media (max-width: 360px) {
  .landing-nav-Right .btn-primary span { display: none; }
  .landing-nav-Right .btn-primary .icon-sm { display: block; }
  .hero-telemetry-ribbon { gap: 10px 4px; }
  .ribbon-stat .mono-label { letter-spacing: 0.04em; }
  .hero-pill-banner > span:nth-child(2) { font-size: 0.65rem; }
  .showcase-body { padding: 11px; }
  .journey-tabs { gap: 3px; }
  .journey-tab { padding-inline: 3px; font-size: 0.66rem; }

  #workspaceShell .nav-item { width: 62px; min-width: 62px; font-size: 0.57rem; }
  #workspaceShell .scan-bar-prefix { display: none; }
  #workspaceShell .scan-bar #scanBtn { padding-inline: 6px; }
  #workspaceShell .scan-bar #refreshBtn { min-width: 31px; padding-inline: 6px; }
  #workspaceShell .chat-input-bar { flex-wrap: wrap; }
  #workspaceShell .chat-input-bar input { flex-basis: 100%; }
  #workspaceShell .chat-input-bar .btn { flex: 1; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero-section { padding-block: 32px; }
  .hero-telemetry-ribbon { margin-bottom: 28px; }
  #workspaceShell .chat-pane { height: 70svh; min-height: 260px; }
  #workspaceShell .full-canvas-container { height: 68svh; min-height: 240px; }
  #workspaceShell .sidebar { max-height: 66px; }
  #workspaceShell .nav-item { min-height: 48px; }
}

@media (hover: none), (pointer: coarse) {
  .hero-showcase-frame { transform: none !important; }
  .landing-start-card:hover,
  .surface-card:hover,
  .context-card:hover,
  .kanban-card:hover,
  .relation-item:hover { transform: none; }
  .landing-shell::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-glow { animation: none; }
  .landing-shell::before { display: none; }
}