:root {
  --bg: #050505;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-glass: rgba(15, 15, 15, 0.7);
  --border: rgba(255, 255, 255, 0.06);
  --border-bright: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #b8c2d1;
  --text-muted: #9aa6b8;
  --accent-primary: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.2);
  --accent-secondary: #8b5cf6;
  --accent-secondary-glow: rgba(139, 92, 246, 0.15);
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
  --font-main:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  --theme-transition:
    background-color 0.7s ease, color 0.7s ease, border-color 0.7s ease,
    backdrop-filter 0.7s ease, box-shadow 0.7s ease, opacity 0.7s ease,
    transform 0.7s ease;
}

:root.light-mode {
  --bg: #f8fafc;
  --surface: rgba(0, 0, 0, 0.03);
  --surface-glass: rgba(255, 255, 255, 0.7);
  --border: rgba(0, 0, 0, 0.1);
  --border-bright: rgba(0, 0, 0, 0.15);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --accent-primary: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.08);
  --accent-secondary: #7c3aed;
  --accent-secondary-glow: rgba(124, 58, 237, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

html {
  background-color: var(--bg);
}

body {
  color: var(--text-primary);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: var(--theme-transition);
}

/* Decorative Backgrounds */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120vw;
  height: 120vh;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, var(--accent-glow) 0%, transparent 35%),
    radial-gradient(
      circle at 85% 85%,
      var(--accent-secondary-glow) 0%,
      transparent 35%
    ),
    radial-gradient(
      circle at 50% 10%,
      rgba(59, 130, 246, 0.08) 0%,
      transparent 45%
    );
  animation: ambient-drift 20s ease-in-out infinite;
  filter: blur(60px);
}

.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02;
  z-index: -1;
  pointer-events: none;
}

.hero-bg-overlay {
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  /* Expanded height: (Offset 50px + Hero content ~460px + 75% of mockup height) * 0.85 reduction */
  height: calc((510px + (min(84vw, 1008px) * 0.625 * 0.75)) * 0.85);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("assets/background-v3.png");
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
  transition: var(--theme-transition);
  /* PERFORMANCE: GPU Layer Promotion to fix scroll-up lag */
  will-change: transform;
  transform: translateZ(0);
}

.light-mode .hero-bg-overlay {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
    url("assets/background-v3.png");
}

.celestial-decoration {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  transform: translate(50%, -50%);
  z-index: 10;
  pointer-events: auto; /* Enable clicks */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.celestial-decoration:hover {
  transform: translate(50%, -50%) scale(1.05);
}

/* The Moon Body (Default) */
.celestial-decoration::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/night-moon.png") center center / contain no-repeat;
  filter: drop-shadow(0 0 45px rgba(220, 240, 255, 0.6));
  z-index: 2;
  transition:
    opacity 0.7s ease,
    filter 0.7s ease;
  opacity: 1;
}

/* The Sun Body (Hidden by default in dark mode) */
.celestial-decoration::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/day-sun.png") center center / contain no-repeat;
  filter: drop-shadow(0 0 40px rgba(255, 220, 100, 0.4));
  z-index: 2;
  transition:
    opacity 0.7s ease,
    filter 0.7s ease;
  opacity: 0;
}

/* The Radiant Light (Glow) */
.celestial-glow {
  position: absolute;
  top: 10%;
  width: 380%; /* Increased relative size to maintain overall bloom presence */
  height: 380%;
  border-radius: 50%;
  z-index: 1;
  transition:
    background 0.7s ease,
    filter 0.7s ease,
    opacity 0.7s ease;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(180, 220, 255, 0.45) 20%,
    rgba(50, 130, 255, 0.15) 45%,
    transparent 70%
  );
  filter: blur(80px);
  opacity: 1;
  pointer-events: none; /* Halo no longer catches hover/clicks */
  animation: celestial-pulse 10s ease-in-out infinite alternate;
}

@keyframes celestial-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
    filter: blur(70px);
  }
  50% {
    transform: scale(2);
    opacity: 1;
    filter: blur(100px);
  }
  100% {
    transform: scale(1.5);
    opacity: 0.85;
    filter: blur(85px);
  }
}

/* Light Mode Overrides */
.light-mode .celestial-decoration::after {
  opacity: 0;
}
.light-mode .celestial-decoration::before {
  opacity: 1;
}

.light-mode .celestial-glow {
  background: radial-gradient(
    circle,
    rgba(255, 240, 150, 0.95) 0%,
    rgba(255, 220, 80, 0.4) 25%,
    rgba(255, 120, 0, 0.15) 50%,
    transparent 70%
  );
  filter: blur(60px);
}

.preview-mode .ambient-glow,
.preview-mode .noise {
  display: none !important;
}

.preview-mode .celestial-decoration {
  transform: translate(50%, -50%) !important;
  transition: none !important;
}

.preview-mode .celestial-decoration:hover {
  transform: translate(50%, -50%) !important;
}

.preview-mode .celestial-glow {
  display: none !important;
}

.preview-mode .celestial-decoration::before,
.preview-mode .celestial-decoration::after {
  filter: none !important;
  transition: none !important;
}

.preview-mode .hero-bg-overlay,
.preview-mode .mockup-container,
.preview-mode .mockup-main,
.preview-mode .pillow-nav,
.preview-mode .flow-title,
.preview-mode .flow-subtitle,
.preview-mode .btn-main {
  animation: none !important;
  transition: none !important;
}

.preview-mode .hero-bg-overlay {
  filter: none !important;
  will-change: auto !important;
  transform: none !important;
}

.preview-mode .side-indicator,
.preview-mode .ui-view-m,
.preview-mode .side-item,
.preview-mode .ui-inner,
.preview-mode .mockup-sidebar {
  transition-duration: 0.001ms !important;
  animation-duration: 0.001ms !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Pillow Menu Navigation */
.nav-wrapper {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 100%;
  max-width: 1200px;
  padding: 0 40px;
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: fadeInDown 0.8s forwards 0.2s;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes fadeInDownMobile {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-status {
  0% {
    box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(39, 201, 63, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(39, 201, 63, 0);
  }
}

@keyframes ambient-drift {
  0%,
  100% {
    transform: translate(-50%, -5%) scale(1);
  }
  50% {
    transform: translate(-45%, 5%) scale(1.1);
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }
  20% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

header.pillow-nav {
  border-radius: 0;
  padding: 8px 12px 8px 24px;
  display: flex;
  align-items: center;
  gap: 40px;
  transition: var(--transition);
  background: rgba(15, 15, 15, 0);
  backdrop-filter: blur(0px) saturate(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  border: 1px solid rgba(255, 255, 255, 0);
  box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
}

header.pillow-nav.scrolled {
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  padding: 8px 12px 8px 24px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-box {
  width: 32px;
  height: 32px;
  background: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.logo-box svg {
  color: white;
  width: 18px;
  height: 18px;
}
.logo-box img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
  border-radius: 0;
}

.logo-text {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.05em;
  background: linear-gradient(to bottom, #fff, #999);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.05em;
  transition: var(--transition);
}

nav a:hover {
  color: var(--text-primary);
}

.btn-launch {
  background: var(--text-primary);
  color: black;
  padding: 8px 20px;
  border-radius: 0;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}

.btn-launch:hover {
  transform: scale(1.03);
  filter: brightness(0.9);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: relative;
  margin-left: auto;
}
.mobile-menu > summary {
  list-style: none;
  width: 44px;
  height: 44px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06);
}
.mobile-menu > summary::-webkit-details-marker {
  display: none;
}
.mobile-menu > summary svg {
  width: 18px;
  height: 18px;
}
.mobile-menu[open] > summary {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.28);
}
.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 230px;
  padding: 10px;
  border-radius: 0;
  background: rgba(10, 10, 10, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 8px;
  z-index: 20;
}
.mobile-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 0;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: var(--transition);
}
.mobile-menu-link span {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.mobile-menu-link:last-child {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.16),
    rgba(139, 92, 246, 0.16)
  );
  border-color: rgba(255, 255, 255, 0.08);
}
.mobile-menu-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Hero */
.hero {
  padding: 152px 0 52px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
  letter-spacing: -0.05em;
}

.flow-title {
  font-size: clamp(46px, 6vw, 82px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin-bottom: 28px;
  color: #fff;
  white-space: nowrap;
  transition: var(--theme-transition);
}

.light-mode .flow-title {
  color: #0f172a;
}

.flow-subtitle {
  font-size: 16px;
  color: #fff;
  opacity: 1;
  max-width: 600px;
  margin: 0 auto 42px auto;
  line-height: 1.5;
  transition: var(--theme-transition);
}

.light-mode .flow-subtitle {
  color: #475569;
  opacity: 1;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: none;
  margin: 0 auto 42px;
  font-weight: 450;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 96px;
}

/* CTA Buttons */
.btn-main {
  height: 64px;
  padding: 0 44px;
  border-radius: 0;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: -0.05em;
}

.btn-primary {
  background: #fff;
  color: #000;
  box-shadow: 0 25px 50px rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 30px 60px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

/* Mockup */
.mockup-container {
  margin-top: 20px;
  width: min(84%, 1008px);
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 10;
  animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mockup-main {
  width: 100%;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a0a0a;
  overflow: hidden;
  box-shadow: 0 100px 200px rgba(0, 0, 0, 0.8);
  position: relative;
}

.ui-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #050505;
  text-align: left;
}

.ui-header {
  height: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.01);
  flex-shrink: 0;
}

.ui-dots {
  display: flex;
  gap: 8px;
}
.ui-dot {
  width: 11px;
  height: 11px;
  border-radius: 0;
  opacity: 0.8;
}
.red {
  background: #ff5f56;
}
.yellow {
  background: #ffbd2e;
}
.green {
  background: #27c93f;
}

.ui-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

.mockup-sidebar {
  width: 200px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  background: rgba(255, 255, 255, 0.01);
}

.side-item {
  height: 38px;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
}

.side-item.active {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.side-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: var(--transition);
  margin-top: -2px; /* Nudge up as requested */
}
.side-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.side-indicator {
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  background: var(--accent-primary);
  border-radius: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  top: 31px;
}

.ui-view-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.ui-view-m {
  position: absolute;
  inset: 0;
  padding: 44px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.ui-view-m.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* New Dashboard Mockup Styles */
.ws-dashboard {
  display: flex;
  gap: 32px;
  width: 100%;
  height: 100%;
}

.ws-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ws-header-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ws-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition);
}

.ws-row-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
}

.ws-row-info {
  flex: 1;
}
.ws-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.ws-row-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

.ws-row-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 11px;
  color: var(--text-secondary);
}

.ws-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ws-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ws-badge.agent {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
}
.ws-badge.local {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.ws-tabs {
  display: flex;
  gap: 24px;
  margin: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ws-tab {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 0;
  cursor: pointer;
  color: var(--text-secondary);
  position: relative;
}

.ws-tab.active {
  color: var(--accent-primary);
}
.ws-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #3b82f6;
}

.ws-sidebar {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ws-panel {
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ws-panel-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}

.ws-progress-bg {
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
}
.ws-progress-fill {
  height: 100%;
  background: #3b82f6;
}

.ws-btn-orange {
  width: 100%;
  height: 36px;
  background: #b45309;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.ws-btn-orange:hover {
  background: #b45309;
}

/* New Knowledge Dashboard Mockup Styles */
.kn-dashboard {
  display: flex;
  gap: 40px;
  width: 100%;
  height: 100%;
}

.kn-nav {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kn-search {
  width: 100%;
  height: 38px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0; /* Prevent crunching in Toolkit tab */
}

.kn-folders {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kn-folder {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}
.kn-folder:hover {
  background: rgba(255, 255, 255, 0.03);
}
.kn-folder-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kn-folder-count {
  font-size: 10px;
  opacity: 0.4;
}

.kn-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

.kn-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.kn-row {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}
.kn-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.kn-row-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kn-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.kn-row-body {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

.kn-doc-meta {
  display: flex;
  gap: 40px;
  margin-top: 8px;
}
.kn-doc-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kn-meta-label {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.2);
}
.kn-meta-val {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.kn-tag {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Light Mode Knowledge Overrides */
.light-mode .kn-search {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.3);
}
.light-mode .kn-folder {
  color: rgba(15, 23, 42, 0.6);
}
.light-mode .kn-folder:hover {
  background: rgba(15, 23, 42, 0.03);
}
.light-mode .kn-row {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.05);
}
.light-mode .kn-row:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}
.light-mode .kn-row-title {
  color: #0f172a;
}
.light-mode .kn-row-body {
  color: rgba(15, 23, 42, 0.5);
}
.light-mode .kn-meta-val {
  color: rgba(15, 23, 42, 0.6);
}
.light-mode .kn-tag {
  border-color: rgba(15, 23, 42, 0.15);
  color: rgba(15, 23, 42, 0.5);
}

/* New Toolkit Dashboard Mockup Styles */
.tk-dashboard {
  display: flex;
  gap: 40px;
  width: 100%;
  height: 100%;
}

.tk-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
}

.tk-tabs {
  display: flex;
  gap: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
}

.tk-tab {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}
.tk-tab.active {
  color: #3b82f6;
}

.tk-sec-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 16px;
}

.tk-core-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.tk-core-card {
  background: #2563eb;
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  color: #fff;
  transition: var(--transition);
}
.tk-core-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}
.tk-core-card .icon-sq {
  background: rgba(255, 255, 255, 0.2);
  border: none;
}
.tk-core-info {
  flex: 1;
}
.tk-core-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tk-core-desc {
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.4;
}

.tk-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.tk-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.tk-row-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tk-row-info {
  flex: 1;
}
.tk-row-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.tk-row-title span {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3b82f6;
  margin-left: 6px;
}
.tk-row-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.tk-sidebar {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tk-sidebar-sec {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tk-sidebar-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tk-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.tk-stat-row span:last-child {
  font-weight: 800;
  color: #fff;
}

.tk-alert-orange {
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.15);
  padding: 12px 16px;
  color: #d97706;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tk-action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tk-action-item {
  height: 44px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}
.tk-action-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

/* Light Mode Toolkit Overrides */
.light-mode .tk-tab {
  color: rgba(15, 23, 42, 0.4);
}
.light-mode .tk-core-card {
  background: #3b82f6;
  color: #fff;
}
.light-mode .tk-row-title {
  color: #0f172a;
}
.light-mode .tk-row-subtitle {
  color: rgba(15, 23, 42, 0.5);
}
.light-mode .tk-row-icon {
  background: rgba(15, 23, 42, 0.03);
}
.light-mode .tk-sidebar-label {
  color: rgba(15, 23, 42, 0.5);
}
.light-mode .tk-stat-row {
  color: rgba(15, 23, 42, 0.6);
}
.light-mode .tk-stat-row span:last-child {
  color: #0f172a;
}
.light-mode .tk-action-item {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.6);
}
/* Scaffold Dashboard Styles */
.sc-dashboard {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding-right: 12px;
}
.sc-dashboard::-webkit-scrollbar {
  width: 4px;
}
.sc-dashboard::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
}

.sc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.3);
}
.sc-header-icon {
  color: inherit;
  display: flex;
  align-items: center;
}
.sc-header h2 {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  color: inherit;
}
.sc-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  margin-bottom: 24px;
  padding-left: 18px;
}
.sc-subtitle code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 0;
}

.sc-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: transparent;
  border: none;
}
.sc-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: transparent;
  gap: 20px;
  transition: var(--transition);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.sc-row:last-child {
  border-bottom: none;
}
.sc-row:hover {
  background: rgba(255, 255, 255, 0.02);
}
.sc-folder-icon {
  color: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.sc-info {
  flex: 1;
  min-width: 0;
}
.sc-title {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
}
.sc-path {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-pills {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.sc-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  text-transform: lowercase;
}
.sc-time {
  width: 100px;
  text-align: right;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.2);
}

/* Light Mode Scaffold Overrides */
.light-mode .sc-header h2 {
  color: #0f172a;
  opacity: 0.3;
}
.light-mode .sc-subtitle {
  color: rgba(15, 23, 42, 0.5);
}
.light-mode .sc-subtitle code {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}
.light-mode .sc-list {
  background: transparent;
  border: none;
}
.sc-dashboard::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.1);
}
.light-mode .sc-row {
  background: transparent;
  border-bottom-color: rgba(15, 23, 42, 0.05);
}
.light-mode .sc-row:hover {
  background: rgba(15, 23, 42, 0.02);
}
.light-mode .sc-title {
  color: #0f172a;
}
.light-mode .sc-path {
  color: rgba(15, 23, 42, 0.4);
}
.light-mode .sc-pill {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
  color: rgba(15, 23, 42, 0.5);
}
.light-mode .sc-time {
  color: rgba(15, 23, 42, 0.3);
}
.light-mode .sc-folder-icon {
  color: rgba(15, 23, 42, 0.1);
}

.light-mode .tk-action-item:hover {
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
}
.light-mode .tk-sec-label {
  color: rgba(15, 23, 42, 0.4);
}

/* Icon Swaps for Light Mode */
.light-mode img[src*="windsurf-logo.png"] {
  content: url("./logos/windsurf-light.png");
}
.light-mode img[src*="cursor-logo.png"] {
  content: url("./logos/cursor-light.png");
}
.light-mode .m-tool img[src*="windsurf-logo.png"] {
  content: url("./logos/windsurf-light.png");
}
.light-mode .m-tool img[src*="cursor-logo.png"] {
  content: url("./logos/cursor-light.png");
}

/* Light Mode Dashboard Overrides */
.light-mode .ws-row-title {
  color: #0f172a;
}
.light-mode .ws-stat-row {
  color: #0f172a;
}
.light-mode .ws-row-subtitle,
.light-mode .ws-header-label,
.light-mode .ws-panel-title,
.light-mode .ws-row-meta {
  color: #334155;
}
.light-mode .ws-tab {
  color: #334155;
  transition: var(--theme-transition);
}
.light-mode .ws-tab.active {
  color: #1d4ed8;
}

.light-mode .ws-row {
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}
.light-mode .ws-tabs {
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}
.light-mode .ws-panel {
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}
.light-mode .ws-progress-bg {
  background: rgba(15, 23, 42, 0.05);
}

.light-mode .ws-badge.local {
  background: rgba(15, 23, 42, 0.05);
  color: #334155;
}
.light-mode .ws-stat-row span[style*="color"] {
  color: #1d4ed8 !important;
}
.light-mode .ws-panel [style*="#d97706"] {
  color: #9a3412 !important;
}
.light-mode .ws-btn-orange {
  background: #b45309;
}
.light-mode .rev .visual-box span[style*="#27c93f"] {
  color: #166534 !important;
}
.light-mode #tools .badge {
  color: #4338ca !important;
}
.light-mode .ws-row-icon {
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.4);
}

.ws-panel-desc {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.4;
  transition: var(--theme-transition);
}

.light-mode .ws-panel-desc {
  color: #334155;
}

/* AI Assistant Redesign */
.ai-dashboard {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ai-sidebar {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.01);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  overflow-y: auto;
}

.ai-sidebar-header {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.btn-new-chat {
  width: 36px;
  height: 36px;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.btn-new-chat:hover {
  background: #2563eb;
  transform: scale(1.05);
}

.ai-search {
  flex: 1;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.1em;
}

.ai-hist-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.ai-group-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.ai-group-label i {
  opacity: 0.5;
  margin-right: 6px;
}

.ai-hist-item {
  padding: 12px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}
.ai-hist-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.ai-hist-item.muted {
  opacity: 0.2;
}

.ai-chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.ai-chat-header {
  padding: 16px 32px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
  font-family: var(--font-mono);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-messages {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 120px;
}

.msg-user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  max-width: 80%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.thought-process {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.thought-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 4px;
}
.thought-header .action {
  color: #3b82f6;
  cursor: pointer;
  text-transform: lowercase;
  font-weight: 600;
  font-size: 10px;
}

.thought-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}
.thought-step svg {
  color: #27c93f;
}
.thought-step span {
  opacity: 0.4;
  font-family: var(--font-mono);
  font-weight: 400;
}
.thought-step .action {
  color: #3b82f6;
  opacity: 1;
  cursor: pointer;
  text-transform: lowercase;
  font-size: 10px;
}

.ai-text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
}
.ai-text .hl {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  padding: 2px 6px;
  font-family: var(--font-mono);
  border-radius: 4px;
}
.ai-action-toggle {
  color: #3b82f6;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-tree-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  overflow-x: auto;
  margin-top: 12px;
}

.ai-floating-input {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(22, 22, 22, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.ai-input-top {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-input-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-input-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}
.ai-input-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ec4899;
  letter-spacing: 0.1em;
}

/* Light Mode AI Assistant Overrides */
.light-mode .ai-chat-window {
  background: #f1f5f9;
}
.light-mode .ai-sidebar {
  background: #f8fafc;
  border-right-color: rgba(0, 0, 0, 0.06);
}
.light-mode .ai-search {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(15, 23, 42, 0.3);
}
.light-mode .ai-hist-item.active {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.06);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.light-mode .ai-chat-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
  color: rgba(15, 23, 42, 0.4);
}
.light-mode .msg-user {
  background: #3b82f6;
  color: #fff;
  border: none;
}
.light-mode .thought-process {
  background: #fff;
  border-left-color: #cbd5e1;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.light-mode .thought-step {
  color: #475569;
}
.light-mode .ai-text {
  color: #334155;
}
.light-mode .ai-tree-block {
  background: #0f172a;
  color: #fff;
  border: none;
}
.light-mode .ai-floating-input {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
}
.light-mode .ai-input-top {
  border-bottom-color: rgba(0, 0, 0, 0.05);
  color: rgba(15, 23, 42, 0.4);
}
.light-mode .ai-input-left {
  color: #0f172a;
}
.light-mode .btn-status-pill {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

/* Project Detail View */
.project-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.project-files {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.01);
}

.file-item {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 0;
  transition: all 0.2s;
}
.file-item i {
  opacity: 0.5;
  font-size: 14px;
}
.file-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-content {
  padding: 32px;
  overflow-y: auto;
  position: relative;
}
.md-prev {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.md-prev h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fff;
  letter-spacing: -0.05em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.md-prev .quote {
  border-left: 3px solid rgba(255, 255, 255, 0.1);
  padding-left: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-style: italic;
}

.back-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 32px;
  height: 32px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
  margin-right: 12px;
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.line {
  height: 10px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
}
.line.blue {
  background: rgba(59, 130, 246, 0.2);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.v-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.v-card.active::after {
  content: "";
  position: absolute;
  top: 24px;
  right: 24px;
  width: 8px;
  height: 8px;
  background: #27c93f;
  border-radius: 0;
  animation: pulse-status 2s infinite;
}

.v-card {
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
  overflow: hidden; /* Fix for absolute shine overlay */
  align-items: flex-start; /* Aling items to the left */
  text-align: left;
}

.v-card.visible {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.v-card:nth-child(1).visible {
  animation-delay: 0.1s;
}
.v-card:nth-child(2).visible {
  animation-delay: 0.2s;
}
.v-card:nth-child(3).visible {
  animation-delay: 0.3s;
}

.v-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.v-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 1;
}

.v-card:hover::before {
  animation: shine 1.2s forwards;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.05);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.icon-sq {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.v-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Features */
.sec {
  padding: 140px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.sec h2 {
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
  line-height: 0.95;
}
.sec p {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 40px;
  font-weight: 450;
  letter-spacing: -0.05em;
}

.row {
  display: flex;
  align-items: center;
  gap: 100px;
}
.row.rev {
  flex-direction: row-reverse;
}
.col {
  flex: 1;
}

.visual-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 44px;
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 340px;
}

.code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  position: relative;
}

.c-p {
  color: #c678dd;
}
.c-b {
  color: #61afef;
}
.c-g {
  color: #98c379;
}
.c-o {
  color: #d19a66;
}

/* Keep the code sample readable in the light theme too. */
.light-mode .c-p {
  color: #86198f;
}
.light-mode .c-b {
  color: #075985;
}
.light-mode .c-g {
  color: #166534;
}
.light-mode .c-o {
  color: #9a3412;
}

.type-cursor {
  display: inline-block;
  width: 2px;
  height: 15px;
  background-color: var(--accent-primary);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  from,
  to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.tools-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.tool-i {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.5);
}

.tool-i.visible {
  animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.tool-i:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px) scale(1.05);
}
.tool-i img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  border-radius: 0;
  transition: var(--transition);
}
.tool-i img.logo-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-modal {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(30px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 0;
  padding: 32px;
  transform: scale(0.95);
}

.tool-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
}

.tool-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.tool-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  overflow-y: auto;
  padding-right: 8px;
}
.tool-modal-grid::-webkit-scrollbar {
  width: 4px;
}
.tool-modal-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0;
}

.m-tool {
  aspect-ratio: 1;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
}
.m-tool:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}
.m-tool img {
  width: 55%;
  height: 55%;
  object-fit: contain;
  border-radius: 0;
}

.process-item {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.process-item.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes launch-status {
  0%,
  50% {
    background: #ff5f56;
    box-shadow: 0 0 10px rgba(255, 95, 86, 0.4);
  }
  100% {
    background: #27c93f;
    box-shadow: 0 0 10px rgba(39, 201, 63, 0.5);
  }
}

@keyframes icon-sequence-play {
  0%,
  40% {
    opacity: 1;
    transform: scale(1);
  }
  41%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
}

@keyframes icon-sequence-spin {
  0%,
  40% {
    opacity: 0;
    transform: rotate(0deg) scale(0.5);
  }
  41%,
  80% {
    opacity: 1;
    transform: rotate(360deg) scale(1);
  }
  81%,
  100% {
    opacity: 0;
    transform: rotate(720deg) scale(0.5);
  }
}

@keyframes icon-sequence-stop {
  0%,
  80% {
    opacity: 0;
    transform: scale(0.5);
  }
  81%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.status-pill-anim {
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: #ff5f56;
}

.visible .status-pill-anim {
  animation: launch-status 2.5s forwards;
}
.visible .icon-play-anim {
  animation: icon-sequence-play 2.5s forwards;
  position: absolute;
}
.visible .icon-spin-anim {
  animation: icon-sequence-spin 2.5s forwards;
  position: absolute;
}
.visible .icon-stop-anim {
  animation: icon-sequence-stop 2.5s forwards;
  position: absolute;
}

.icon-play-anim {
  animation: icon-sequence-play 2.5s forwards;
  position: absolute;
}
.icon-spin-anim {
  animation: icon-sequence-spin 2.5s forwards;
  position: absolute;
}
.icon-stop-anim {
  animation: icon-sequence-stop 2.5s forwards;
  position: absolute;
}

.process-item:nth-child(2).visible .status-pill-anim,
.process-item:nth-child(2).visible .icon-play-anim,
.process-item:nth-child(2).visible .icon-spin-anim,
.process-item:nth-child(2).visible .icon-stop-anim {
  animation-delay: 0.2s;
}

.process-item:nth-child(3).visible .status-pill-anim,
.process-item:nth-child(3).visible .icon-play-anim,
.process-item:nth-child(3).visible .icon-spin-anim,
.process-item:nth-child(3).visible .icon-stop-anim {
  animation-delay: 1.7s;
}

.process-item:nth-child(4).visible .status-pill-anim,
.process-item:nth-child(4).visible .icon-play-anim,
.process-item:nth-child(4).visible .icon-spin-anim,
.process-item:nth-child(4).visible .icon-stop-anim {
  animation-delay: 3.2s;
}

footer {
  padding: 100px 0;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.f-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
}
.f-links a {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
}
.f-links a:hover {
  color: #fff;
}

@media (max-width: 1120px) {
  .mockup-sidebar {
    width: 72px;
    padding: 24px 8px;
    align-items: center;
  }
  .side-item {
    width: 100%;
    justify-content: center;
    gap: 0;
    padding: 0;
  }
  .side-label,
  .side-indicator {
    display: none;
  }
  .ui-view-m {
    padding: 32px;
    gap: 28px;
  }
  .ui-view-m.active {
    overflow-y: auto;
  }
}

/* --- Light Mode Overrides --- */
.light-mode .noise {
  opacity: 0.04;
  mix-blend-mode: overlay;
}
.light-mode .logo-text {
  background: linear-gradient(to bottom, #0f172a, #475569);
  -webkit-background-clip: text;
  background-clip: text;
}
.light-mode .hero h1 {
  background: linear-gradient(to bottom, #0f172a 40%, #64748b 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.light-mode header.pillow-nav {
  background: rgba(255, 255, 255, 0);
  border-color: rgba(0, 0, 0, 0);
}
.light-mode header.pillow-nav.scrolled {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.light-mode .btn-launch {
  background: #0f172a;
  color: #fff;
}
.light-mode .hero-actions .btn-primary {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.1);
}
.light-mode .hero-actions .btn-secondary {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.light-mode .mockup-main {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 60px 120px rgba(0, 0, 0, 0.08);
}
.light-mode .ui-inner {
  background: #f1f5f9;
}
.light-mode .ui-header {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}
.light-mode .mockup-sidebar {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.05);
}
.light-mode .side-item {
  color: #64748b;
}
.light-mode .side-item.active {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.light-mode .v-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}
.light-mode .v-card:hover {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}
.light-mode .v-title {
  color: #0f172a;
}
.light-mode .icon-sq {
  background: rgba(0, 0, 0, 0.03);
}
.light-mode .tag {
  background: rgba(0, 0, 0, 0.04);
  color: #64748b;
  border-color: rgba(0, 0, 0, 0.04);
}

.light-mode .md-prev h1 {
  color: #0f172a;
}
.light-mode .md-prev .quote {
  border-color: rgba(0, 0, 0, 0.1);
}
.light-mode .visual-box {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}
.light-mode .code {
  color: #0f172a;
}

.light-mode .process-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.04);
}
.light-mode .process-item span {
  color: #0f172a;
}
.light-mode .tool-i {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.06);
}
.light-mode .tool-i:hover {
  border-color: #2563eb;
  background: #fff;
}
.light-mode .tool-modal {
  background: rgba(255, 255, 255, 0.98);
}
.light-mode .m-tool {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.05);
}

.light-mode .mobile-menu > summary {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}
.light-mode .mobile-menu-panel {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.light-mode .mobile-menu-link {
  background: rgba(0, 0, 0, 0.02);
  color: #0f172a;
}
.light-mode .mobile-menu-link span {
  color: #64748b;
}

.light-mode footer .f-links a:hover {
  color: #0f172a;
}

.light-mode .mobile-menu-link:last-child {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.08),
    rgba(124, 58, 237, 0.08)
  );
  border-color: rgba(0, 0, 0, 0.05);
}

/* Theme Toggle Button Styling */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  display: none; /* Base state: hidden on desktop */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
  margin-right: -10px;
}
.theme-toggle:hover {
  background: var(--border);
  transform: translateY(-1px);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2px;
}
.theme-toggle .icon-sun {
  display: none;
}
.theme-toggle .icon-moon {
  display: block;
}

.light-mode .theme-toggle .icon-sun {
  display: block;
}
.light-mode .theme-toggle .icon-moon {
  display: none;
}

/* ==========================================================================
           MODERN MOBILE CONSOLIDATION (Final Cleanup Overrides)
           Ensures stickiness, visibility, and layout containment < 900px
           ========================================================================== */
#v-ide,
#projects,
#tools {
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}

@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden !important;
    position: relative;
  }

  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* Sticky Navigation Restoration */
  .nav-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    transform: none !important;
    z-index: 9999 !important; /* Absolute priority */
  }

  header.pillow-nav {
    width: 100% !important;
    box-sizing: border-box;
    display: flex !important;
    justify-content: flex-start !important; /* Left aligned, push logic below */
    gap: 8px !important;
    padding: 8px 12px 8px 14px;
    border-radius: 0 !important;
    /* REFINEMENT: Explicitly kill ALL borders and shadows */
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    transition: var(--transition);
  }

  header.pillow-nav.scrolled {
    /* REFINEMENT: Appear past headline */
    background: var(--surface-glass) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: none !important;
    border-bottom: 1px solid var(--border-bright) !important; /* Only on scroll */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  }

  /* Force Burger Menu Visibility */
  header.pillow-nav .mobile-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10000 !important;
    margin-left: 0 !important;
  }
  header.pillow-nav .mobile-menu > summary {
    display: flex !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 0;
  }

  /* REFINEMENT: Theme toggle grouped with burger on right */
  .theme-toggle {
    display: none !important;
    margin-left: auto !important; /* Pushes toggle and burger to the far right */
    width: 48px !important;
    height: 48px !important;
    border-radius: 0;
  }

  header.pillow-nav.scrolled .theme-toggle {
    display: flex !important;
  }

  /* Hide Desktop Elements */
  header.pillow-nav nav,
  header.pillow-nav .btn-launch {
    display: none !important;
  }

  .celestial-decoration {
    width: 200px !important;
    height: 200px !important;
  }

  .hero-bg-overlay {
    top: -50px;
    height: calc(100dvh + 50px) !important;
    background-attachment: scroll; /* Performance on mobile */
  }

  .hero {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px !important;
    padding-bottom: 40px !important;
    box-sizing: border-box;
  }

  /* Layout containment */
  .row {
    flex-direction: column !important;
    text-align: center;
    gap: 40px;
    align-items: stretch;
  }
  .col {
    width: 100% !important;
  }
  .hero h1 {
    font-size: clamp(40px, 8.5vw, 64px) !important;
    letter-spacing: -0.05em;
  }
  .hero h1,
  .hero p {
    white-space: normal !important;
  }
  .mockup-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 14px;
    position: relative;
    z-index: 1;
  }
  .mockup-main {
  }

  .mobile-menu-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 64px !important;
    width: 100vw !important;
    min-width: 100vw !important;
    border-radius: 0 !important;
    z-index: 9998 !important;
  }

  /* Sub-container fixes for specific dashboards on mobile */
  .ws-dashboard,
  .kn-dashboard,
  .tk-dashboard {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 40px;
  }
  .ai-dashboard {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
  }

  .ai-sidebar {
    display: none !important;
  }
  .ai-chat-window {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 120px;
  }
  .ai-floating-input {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 12px 14px;
    gap: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    z-index: 20;
    width: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex !important;
  }

  .ws-sidebar,
  .kn-nav,
  .tk-sidebar {
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 32px;
    order: 2;
    flex: none;
    border-right: none;
  }
  .ws-main,
  .kn-content,
  .tk-main,
  .sc-dashboard {
    order: 1;
    flex: none;
    overflow-y: visible;
    height: auto;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 128px !important;
  }
  .hero h1 {
    font-size: clamp(30px, 9.5vw, 44px) !important;
  }
  .btn-main {
    width: 100% !important;
    min-width: 0 !important;
  }
}


/* ---- Keshward additions ---- */
.ui-body {
  display: block;
}
.hero-shot {
  display: block;
  width: 100%;
  height: auto;
}
.kv-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kv-group + .kv-group {
  margin-top: 30px;
}
.kv-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.fact b {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.fact span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
  text-align: right;
}
.readme {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 2.05;
  color: var(--text-secondary);
}
.link-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  transition: var(--transition);
}
.link-row:hover {
  border-color: var(--border-bright);
  color: var(--text-primary);
}
.link-row span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
  font-weight: 500;
}
.sec-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--border-bright);
  padding-bottom: 6px;
  transition: var(--transition);
}
.sec-cta:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}
.f-links {
  flex-wrap: wrap;
  gap: 18px 32px;
}

.light-mode .logo-box svg {
  color: #0f172a;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* ---- Keshward polish ---- */
.readme {
  text-align: left;
}
.readme .lv {
  padding-left: 2ch;
}
.sec {
  padding: 110px 0;
}
.btn-secondary {
  border-color: rgba(255, 255, 255, 0.18);
}
.light-mode .flow-subtitle {
  color: #334155;
}
.light-mode .hero-actions .btn-secondary {
  border-color: rgba(0, 0, 0, 0.16);
}
@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
  }
  .visual-box {
    padding: 24px;
  }
  .fact {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .fact span {
    text-align: left;
  }
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.22);
}
.light-mode .hero-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.3);
}
.light-mode .hero-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.4);
}

/* FAQ (home) */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 26px 0 2px;
}
.faq-sub:first-child {
  margin-top: 0;
}
details.faq-item {
  border: 1px solid var(--border);
  background: var(--surface);
  transition: var(--transition);
}
details.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
details.faq-item summary::-webkit-details-marker {
  display: none;
}
details.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: var(--transition);
}
details.faq-item[open] summary::after {
  content: "−";
  color: var(--accent-primary);
}
details.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.75;
  max-width: 880px;
}
.footer-social {
  display: flex;
  justify-content: center;
  margin: 22px 0 2px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}
.social-link:hover {
  border-color: var(--border-bright);
  color: var(--text-primary);
}
.social-link svg {
  width: 17px;
  height: 17px;
}
