/* ==========================================================================
   SnapTable Pro — Spatial Daylight Liquid Glass Design System
   Crafted with Plus Jakarta Sans + JetBrains Mono + High-Contrast Frost Layers
   ========================================================================== */

:root {
  /* Ground & Multi-Tier Liquid Glass Surfaces */
  --bg-ground: #eef2f8;
  --glass-panel: rgba(255, 255, 255, 0.88);
  --glass-panel-strong: rgba(255, 255, 255, 0.95);
  --glass-card: rgba(255, 255, 255, 0.78);
  --glass-control: rgba(255, 255, 255, 0.90);
  --glass-inset: rgba(241, 245, 251, 0.82);

  /* Optical Blur */
  --blur-lg: blur(26px) saturate(190%);
  --blur-md: blur(18px) saturate(175%);

  /* Specular Rims & Architectural Hairlines */
  --rim-white: rgba(255, 255, 255, 0.95);
  --border-subtle: rgba(15, 23, 42, 0.075);
  --border-medium: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.19);

  /* Ink Hierarchy (WCAG AA/AAA on Light Glass) */
  --ink-primary: #0b1221;
  --ink-secondary: #3e4c63;
  --ink-muted: #64748b;

  /* Cohesive Brand & Functional Palette (Sapphire · Glacier · Emerald · Coral · Amber) */
  --sapphire: #1d4ed8;
  --sapphire-deep: #1e40af;
  --sapphire-soft: rgba(29, 78, 216, 0.10);
  --sapphire-border: rgba(29, 78, 216, 0.28);

  --glacier: #0284c7;
  --glacier-soft: rgba(2, 132, 199, 0.11);
  --glacier-border: rgba(2, 132, 199, 0.28);

  --emerald: #047857;
  --emerald-bright: #059669;
  --emerald-dot: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.13);
  --emerald-border: rgba(5, 150, 105, 0.28);

  --coral: #be123c;
  --coral-bright: #e11d48;
  --coral-soft: rgba(244, 63, 94, 0.11);
  --coral-border: rgba(225, 29, 72, 0.26);

  --amber: #b45309;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --amber-border: rgba(217, 119, 6, 0.28);

  /* Disciplined Radius Grammar */
  --r-xs: 7px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Layered Spatial Shadows */
  --shadow-card:
    0 2px 4px rgba(15, 23, 42, 0.03),
    0 14px 34px -12px rgba(15, 23, 42, 0.09),
    0 0 0 1px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  --shadow-bezel:
    0 30px 70px -24px rgba(15, 32, 68, 0.18),
    0 8px 24px -8px rgba(15, 23, 42, 0.07),
    0 0 0 1px rgba(29, 78, 216, 0.11),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.96);
  --shadow-panel:
    0 2px 6px rgba(15, 23, 42, 0.04),
    0 10px 24px -10px rgba(15, 23, 42, 0.07),
    0 0 0 1px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 #ffffff;
  --shadow-control:
    0 1px 2px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 #ffffff;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", "Segoe UI Variable Display", "Segoe UI Variable", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, Consolas, monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 170ms;

  --container: 1340px;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-ground);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: clip;
  position: relative;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   Fixed Luminous Refraction Stage (Behind Liquid Glass)
   ========================================================================== */
.ambient-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.026) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.026) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.65) 55%, rgba(0, 0, 0, 0.25) 100%);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(78px);
}

.orb-sapphire {
  width: 560px;
  height: 420px;
  top: -110px;
  left: -60px;
  background: rgba(29, 78, 216, 0.20);
}

.orb-cyan {
  width: 620px;
  height: 480px;
  top: 20px;
  right: -90px;
  background: rgba(2, 132, 199, 0.22);
}

.orb-coral {
  width: 440px;
  height: 360px;
  top: 260px;
  right: 22%;
  background: rgba(244, 63, 94, 0.13);
}

.orb-emerald {
  width: 540px;
  height: 420px;
  bottom: -120px;
  left: 18%;
  background: rgba(16, 185, 129, 0.15);
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Keycaps & Code Chips
   ========================================================================== */
code,
kbd {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-bottom-width: 2px;
  border-bottom-color: rgba(15, 23, 42, 0.24);
  color: #1e293b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.05);
  white-space: nowrap;
}

.kbd-hero {
  height: 24px;
  padding: 0 8px;
  font-size: 11.5px;
}

.kbd-inline {
  height: 19px;
  min-width: 19px;
  padding: 0 5px;
  font-size: 10.5px;
  border-bottom-width: 1px;
}

.kbd-xs {
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  color: var(--ink-muted);
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--sapphire-soft);
  border: 1px solid rgba(29, 78, 216, 0.16);
  color: var(--sapphire);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   Sticky Liquid Glass Topbar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 76px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border-bottom: 1px solid rgba(15, 23, 42, 0.075);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.88), 0 8px 24px -14px rgba(15, 23, 42, 0.10);
}

.topbar-inner {
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-primary);
  justify-self: start;
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(29, 78, 216, 0.22));
  transition: transform var(--dur) var(--ease);
}

.brand-group:hover .brand-logo {
  transform: rotate(-3deg) scale(1.03);
}

.brand-wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.brand-pro {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(2, 132, 199, 0.14));
  border: 1px solid rgba(29, 78, 216, 0.22);
  color: var(--sapphire);
}

.topbar-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(241, 245, 251, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.075);
  box-shadow: inset 0 1px 0 #ffffff;
}

.nav-link {
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  transition: all var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--ink-primary);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.07);
}

.topbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn.btn-buy-nav {
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  text-decoration: none;
}

.demo-cap-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  color: var(--amber);
}

.demo-upgrade-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid rgba(29, 78, 216, 0.14);
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.96) 0%, rgba(236, 253, 245, 0.94) 100%);
  flex-wrap: wrap;
}

.upgrade-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.upgrade-copy strong {
  color: var(--ink-primary);
}

.demo-upgrade-strip a.btn {
  text-decoration: none;
}

.faq-section {
  padding: 0 28px 68px;
  scroll-margin-top: 84px;
}

.faq-section a.btn {
  text-decoration: none;
}

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

.faq-card {
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: var(--glass-card);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--rim-white);
  box-shadow: var(--shadow-card);
}

.faq-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-primary);
}

.faq-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

@media (max-width: 900px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 21px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--sapphire);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

/* ==========================================================================
   Buttons System
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform 110ms var(--ease);
  white-space: nowrap;
}

.btn:active:not(:disabled) {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.btn:focus-visible,
.nav-link:focus-visible,
.chip-btn:focus-visible,
.cleaner-btn:focus-visible,
.mode-btn:focus-visible,
.block-chip:focus-visible,
.text-input:focus-visible,
.select-input:focus-visible,
.search-input:focus-visible,
.paste-zone:focus-visible {
  outline: 2px solid var(--sapphire);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  border-color: rgba(29, 78, 216, 0.8);
  color: #ffffff;
  box-shadow:
    0 2px 6px rgba(29, 78, 216, 0.22),
    0 12px 26px -8px rgba(2, 132, 199, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1e40af 0%, #0369a1 100%);
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(29, 78, 216, 0.26),
    0 16px 32px -8px rgba(2, 132, 199, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.btn-export-csv {
  background: linear-gradient(135deg, #059669 0%, #0284c7 100%);
  border-color: rgba(5, 150, 105, 0.75);
  color: #ffffff;
  box-shadow:
    0 2px 6px rgba(5, 150, 105, 0.22),
    0 10px 22px -8px rgba(5, 150, 105, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.btn-export-csv:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857 0%, #0369a1 100%);
  transform: translateY(-1px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--ink-primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), inset 0 1px 0 #ffffff;
}

.btn-glass:hover:not(:disabled) {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.20);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.12), inset 0 1px 0 #ffffff;
}

.btn-secondary {
  background: var(--glass-control);
  border-color: var(--border-medium);
  color: var(--ink-primary);
  box-shadow: var(--shadow-control);
}

.btn-secondary:hover:not(:disabled) {
  background: #ffffff;
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-primary);
}

.btn-danger-ghost {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--coral-border);
  color: var(--coral);
}

.btn-danger-ghost:hover:not(:disabled) {
  background: var(--coral-soft);
}

.btn.btn-recipes {
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
}

.btn.btn-hero {
  height: 50px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r-pill);
}

.btn-sm {
  height: 35px;
  padding: 0 13px;
  font-size: 13px;
}

.btn-xs {
  height: 29px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   Asymmetric Split Hero + Spatial Before/After Stage
   ========================================================================== */
.hero-section {
  padding: 48px 28px 36px;
}

.hero-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: 44px;
}

.hero-copy-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  margin: 0;
  font-size: clamp(38px, 4.3vw, 54px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
  color: var(--ink-primary);
  text-wrap: balance;
}

.hero-highlight {
  position: relative;
  display: inline-block;
  color: var(--sapphire);
  background: linear-gradient(120deg, #1d4ed8 0%, #0284c7 65%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-highlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 8px;
  z-index: -1;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.14), rgba(16, 185, 129, 0.18));
}

.hero-lead {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 530px;
  text-wrap: pretty;
}

.hero-cta-row {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-specs {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.09);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.spec-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.spec-item strong {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-primary);
  letter-spacing: -0.03em;
}

.spec-item span {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.spec-sep {
  width: 1px;
  height: 18px;
  background: rgba(15, 23, 42, 0.14);
}

/* Spatial Before -> After Liquid Glass Stage */
.hero-visual-col {
  position: relative;
}

.showcase-stage {
  position: relative;
  padding: 22px;
  border-radius: var(--r-xl);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.62) 0%, rgba(224, 242, 254, 0.52) 55%, rgba(209, 250, 229, 0.45) 100%);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: 1.5px solid rgba(255, 255, 255, 0.94);
  box-shadow:
    0 28px 60px -22px rgba(15, 32, 68, 0.18),
    0 0 0 1px rgba(29, 78, 216, 0.10),
    inset 0 1px 0 #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.showcase-card {
  border-radius: 16px;
  padding: 14px 16px;
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
}

.showcase-raw {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(225, 29, 72, 0.20);
  box-shadow: 0 6px 18px -8px rgba(15, 23, 42, 0.08), inset 0 1px 0 #ffffff;
}

.showcase-clean {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(5, 150, 105, 0.28);
  box-shadow: 0 14px 32px -12px rgba(5, 150, 105, 0.18), inset 0 1px 0 #ffffff;
}

.showcase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.showcase-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-pill);
}

.tag-coral {
  background: var(--coral-soft);
  color: var(--coral);
}

.tag-emerald {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.showcase-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.showcase-formats {
  display: inline-flex;
  gap: 5px;
}

.showcase-formats i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-secondary);
}

.raw-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.raw-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px dashed rgba(15, 23, 42, 0.12);
}

.raw-row-dupe {
  background: rgba(244, 63, 94, 0.07);
  border-color: rgba(225, 29, 72, 0.24);
  text-decoration: line-through;
  opacity: 0.72;
}

.raw-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--coral);
  flex-shrink: 0;
}

.raw-messy {
  color: var(--ink-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showcase-bridge {
  display: flex;
  justify-content: center;
  margin: -4px 0;
  position: relative;
  z-index: 2;
}

.bridge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, #1d4ed8 0%, #059669 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 16px -4px rgba(29, 78, 216, 0.42), 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.mini-sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.mini-sheet th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 6px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(241, 245, 249, 0.7);
}

.mini-sheet td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--ink-primary);
  font-weight: 500;
}

.mini-sheet tr:last-child td {
  border-bottom: none;
}

.mini-sheet .num-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--emerald);
}

.mini-sheet .url-cell {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--sapphire);
}

/* ==========================================================================
   Illustrated 3-Step Usage Guide (Top of Page)
   ========================================================================== */
.section-container {
  max-width: var(--container);
  margin: 0 auto;
}

.guide-section {
  padding: 20px 28px 42px;
  scroll-margin-top: 84px;
}

.guide-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
}

.guide-caption {
  font-size: 14px;
  color: var(--ink-secondary);
}

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

.guide-card {
  border-radius: var(--r-lg);
  background: var(--glass-card);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--rim-white);
  box-shadow: var(--shadow-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.guide-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.90);
}

.guide-visual {
  height: 78px;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.guide-card-blue .guide-visual {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(2, 132, 199, 0.11) 100%);
}

.guide-card-teal .guide-visual {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.10) 0%, rgba(2, 132, 199, 0.09) 100%);
}

.guide-card-coral .guide-visual {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, rgba(245, 158, 11, 0.12) 100%);
}

.gvis-chip-row,
.gvis-transform {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-secondary);
}

.gvis-key {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: var(--ink-primary);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05);
}

.gvis-key-active {
  background: var(--sapphire);
  border-color: var(--sapphire);
  color: #ffffff;
}

.gvis-files {
  display: flex;
  gap: 6px;
}

.gvis-files span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--sapphire);
}

.gvis-dirty {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--coral);
  text-decoration: line-through;
}

.gvis-clean {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--emerald-border);
  color: var(--emerald);
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.12);
}

.gvis-subpill {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.82);
  padding: 2px 10px;
  border-radius: var(--r-pill);
}

.gvis-exports {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.exp-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.07);
}

.exp-csv { background: var(--emerald-bright); color: #ffffff; }
.exp-tsv { color: var(--sapphire); border: 1px solid var(--sapphire-border); }
.exp-json { color: var(--amber); border: 1px solid var(--amber-border); }
.exp-md { color: var(--coral); border: 1px solid var(--coral-border); }

.guide-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0 4px 4px;
}

.guide-num {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  margin-top: 1px;
}

.num-blue { background: var(--sapphire); }
.num-teal { background: var(--emerald-bright); }
.num-coral { background: var(--coral-bright); }

.guide-body h3 {
  margin: 0 0 4px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.guide-body p {
  margin: 0;
  font-size: 13.8px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Tinted Slate-Sapphire Liquid Glass Workspace Bezel (High Contrast!)
   ========================================================================== */
.workspace-section {
  padding: 6px 28px 56px;
  scroll-margin-top: 84px;
}

.workspace-container {
  max-width: var(--container);
  margin: 0 auto;
}

.workspace-bezel {
  padding: 20px;
  border-radius: var(--r-xl);
  background: linear-gradient(155deg, rgba(214, 228, 250, 0.78) 0%, rgba(225, 238, 248, 0.74) 50%, rgba(212, 243, 235, 0.70) 100%);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: 1.5px solid rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-bezel);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bezel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 6px 6px;
  flex-wrap: wrap;
}

.bezel-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.workspace-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
}

.bezel-divider {
  width: 1px;
  height: 16px;
  background: rgba(15, 23, 42, 0.16);
}

.bezel-hint {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.bezel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.mode-btn.active {
  background: var(--sapphire);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.28);
}

.glass-panel {
  background: var(--glass-panel);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid #ffffff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-panel);
}

/* Input Hub */
.input-hub-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.input-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.paste-zone,
.drop-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px dashed rgba(29, 78, 216, 0.24);
  background: linear-gradient(135deg, #ffffff 0%, rgba(239, 246, 255, 0.85) 100%);
  transition: all var(--dur) var(--ease);
  min-height: 76px;
  height: 100%;
}

.paste-zone {
  cursor: pointer;
}

.drop-zone {
  border-color: rgba(2, 132, 199, 0.26);
  background: linear-gradient(135deg, #ffffff 0%, rgba(236, 253, 245, 0.78) 100%);
}

.paste-zone:hover {
  border-style: solid;
  border-color: var(--sapphire);
  box-shadow: 0 8px 20px -8px rgba(29, 78, 216, 0.20);
}

.drop-zone:hover {
  border-style: solid;
  border-color: var(--emerald-bright);
  box-shadow: 0 8px 20px -8px rgba(5, 150, 105, 0.20);
}

.paste-zone.flash-active,
.drop-zone.drag-over {
  border-style: solid;
  border-color: var(--emerald-bright);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.zone-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #ffffff;
}

.zone-icon-blue {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
  box-shadow: 0 6px 14px -4px rgba(29, 78, 216, 0.40);
}

.zone-icon-teal {
  background: linear-gradient(135deg, #059669, #0284c7);
  box-shadow: 0 6px 14px -4px rgba(5, 150, 105, 0.38);
}

.zone-copy {
  flex: 1;
  min-width: 0;
}

.zone-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.zone-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--emerald-soft);
  color: var(--emerald);
}

.zone-desc {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.raw-paste-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--glass-inset);
  border: 1px solid var(--border-subtle);
}

.raw-textarea {
  width: 100%;
  resize: vertical;
  min-height: 90px;
  background: #ffffff;
  color: var(--ink-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

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

/* Sample Datasets Rail */
.samples-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.samples-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.samples-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 33px;
  padding: 0 13px 0 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-medium);
  background: #ffffff;
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all var(--dur) var(--ease);
}

.chip-blue:hover { border-color: var(--sapphire); color: var(--sapphire); background: #eff6ff; }
.chip-emerald { background: var(--emerald-soft); border-color: var(--emerald-border); color: var(--emerald); }
.chip-emerald:hover { background: rgba(16, 185, 129, 0.20); }
.chip-amber:hover { border-color: var(--amber); color: var(--amber); background: #fffbeb; }
.chip-coral:hover { border-color: var(--coral); color: var(--coral); background: #fff1f2; }

/* Detected Blocks Bar */
.detected-blocks-bar {
  padding: 10px 18px;
}

.blocks-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.blocks-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--sapphire-soft);
  color: var(--sapphire);
}

.blocks-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.blocks-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.block-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-medium);
  background: #ffffff;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.block-chip.active {
  background: var(--sapphire);
  border-color: var(--sapphire);
  color: #ffffff;
}

/* ==========================================================================
   Main Split Studio: Sidebar Inspector + Crisp Data Sheet
   ========================================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.sidebar-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.sidebar-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-title-wrap h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.mini-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--sapphire-soft);
  color: var(--sapphire);
}

.sidebar-mini-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.link-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--sapphire);
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.sep {
  color: var(--ink-muted);
  font-size: 12px;
}

.columns-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 172px;
  overflow-y: auto;
  padding-right: 2px;
}

.column-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 9px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(248, 250, 252, 0.85);
  cursor: pointer;
  transition: all 120ms var(--ease);
}

.column-item:hover {
  background: #ffffff;
  border-color: rgba(29, 78, 216, 0.24);
}

.column-item.selected {
  background: #eff6ff;
  border-color: var(--sapphire);
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.10);
}

.column-item.col-hidden {
  opacity: 0.52;
}

.col-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--sapphire);
  cursor: pointer;
  flex-shrink: 0;
}

.col-rename-input {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  padding: 3px 5px;
  border-radius: 5px;
}

.col-rename-input:focus {
  background: #ffffff;
  border-color: var(--sapphire);
  outline: none;
}

.col-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
}

.column-item.selected .col-active-dot {
  background: var(--sapphire);
}

.sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.cleaner-target-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.select-input,
.text-input,
.search-input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border-medium);
  background: #ffffff;
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
}

.cleaners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.cleaner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 35px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(15, 23, 42, 0.11);
  background: #ffffff;
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 130ms var(--ease);
  text-align: left;
}

.cleaner-btn svg {
  color: var(--sapphire);
  flex-shrink: 0;
}

.cleaner-btn:hover:not(:disabled) {
  border-color: var(--sapphire);
  background: #eff6ff;
  color: var(--sapphire-deep);
  transform: translateY(-1px);
}

.cleaner-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.cleaner-btn-wide {
  grid-column: 1 / -1;
  justify-content: center;
}

.affix-box {
  padding: 10px;
  border-radius: 11px;
  background: rgba(241, 245, 251, 0.85);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.affix-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.text-input-sm {
  height: 32px;
  font-size: 12.5px;
}

.undo-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sapphire);
}

/* Right Preview Panel — Crisp Fitted Table (No Dead Empty Void!) */
.preview-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(248, 250, 252, 0.88);
  flex-wrap: wrap;
}

.stats-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  background: #ffffff;
  border: 1px solid var(--border-medium);
  font-size: 12.5px;
}

.stat-label {
  color: var(--ink-secondary);
  font-weight: 500;
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-primary);
}

.stat-pill-emerald {
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
}

.stat-pill-emerald .stat-label,
.stat-pill-emerald .stat-value {
  color: var(--emerald);
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  width: 210px;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  height: 35px;
  padding: 0 30px 0 33px;
  border-radius: var(--r-pill);
  font-size: 13px;
}

.search-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 19px;
  padding: 0 5px;
  font-size: 10.5px;
  pointer-events: none;
}

.search-input:focus ~ .search-kbd,
.search-input:not(:placeholder-shown) ~ .search-kbd {
  opacity: 0;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 17px;
  cursor: pointer;
}

.preview-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 41px,
    rgba(15, 23, 42, 0.035) 42px
  );
}

.empty-state {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--sapphire-soft);
  color: var(--sapphire);
  margin-bottom: 14px;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.empty-state p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 14px;
}

.empty-mini {
  padding: 12px;
  border-radius: 9px;
  background: rgba(241, 245, 249, 0.8);
  font-size: 12.5px;
  color: var(--ink-muted);
  text-align: center;
}

.table-wrap {
  overflow: auto;
  max-height: 520px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  white-space: nowrap;
  user-select: none;
}

.data-table thead th.col-header-clickable {
  cursor: pointer;
}

.data-table thead th.col-header-clickable:hover {
  background: #e2e8f0;
  color: var(--ink-primary);
}

.data-table thead th.col-header-selected {
  background: #dbeafe;
  color: var(--sapphire-deep);
  box-shadow: inset 0 -2.5px 0 var(--sapphire);
}

.data-table thead th.row-num-col,
.data-table tbody td.row-num-col {
  width: 44px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  background: rgba(248, 250, 252, 0.85);
}

.data-table thead th.row-act-col,
.data-table tbody td.row-act-col {
  width: 38px;
  text-align: center;
  border-right: none;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.72);
}

.data-table tbody tr:hover {
  background: rgba(29, 78, 216, 0.05);
}

.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.065);
  border-right: 1px solid rgba(15, 23, 42, 0.045);
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-primary);
}

.data-table tbody td.cell-selected-col {
  background: rgba(29, 78, 216, 0.045);
  font-weight: 500;
}

.data-table tbody td.cell-empty {
  color: var(--ink-muted);
  font-style: italic;
}

.row-delete-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 16px;
  cursor: pointer;
  opacity: 0.45;
}

.data-table tbody tr:hover .row-delete-btn {
  opacity: 1;
}

.row-delete-btn:hover {
  background: var(--coral-soft);
  color: var(--coral);
}

.truncation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: var(--sapphire-soft);
  font-size: 13px;
  color: var(--sapphire-deep);
}

/* Export Footer Bar */
.export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.90) 0%, #ffffff 100%);
  flex-wrap: wrap;
}

.export-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.export-heading {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.export-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Asymmetric Capabilities Bento with Micro-Diagrams
   ========================================================================== */
.bento-section {
  padding: 20px 28px 76px;
  scroll-margin-top: 84px;
}

.bento-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.bento-sub {
  margin: 0;
  font-size: 15px;
  color: var(--ink-secondary);
}

.bento-asymmetric {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.bento-span-7 { grid-column: span 7; }
.bento-span-5 { grid-column: span 5; }

.bento-card {
  border-radius: var(--r-lg);
  padding: 26px 28px;
  background: var(--glass-card);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--rim-white);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: transform var(--dur) var(--ease);
}

.bento-card:hover {
  transform: translateY(-2px);
}

.bento-tint-blue { background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(224, 242, 254, 0.62) 100%); }
.bento-tint-emerald { background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(209, 250, 229, 0.58) 100%); }
.bento-tint-coral { background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 228, 230, 0.58) 100%); }
.bento-tint-amber { background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(254, 243, 199, 0.58) 100%); }

.bento-copy h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
}

.bento-copy p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 56ch;
}

.bento-diagram {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 #ffffff;
}

.diag-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.diag-merged {
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(29, 78, 216, 0.09);
  color: var(--sapphire);
  font-weight: 700;
  text-align: center;
}

.diag-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 7px;
}

.diag-split-row span {
  padding: 6px 10px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

.diag-split-row .diag-accent {
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
  color: var(--emerald);
}

.diag-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.stack-pill {
  padding: 7px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

.stack-pill-active {
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
  color: var(--emerald);
  font-weight: 700;
}

.diag-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  flex-wrap: wrap;
}

.diag-pipeline span {
  padding: 6px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(225, 29, 72, 0.22);
  color: var(--coral);
}

.diag-pipeline .pipe-amber {
  border-color: var(--amber-border);
  color: var(--amber);
}

.diag-pipeline i {
  font-style: normal;
  color: var(--ink-muted);
}

.diag-formats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.fmt-tile {
  padding: 9px 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fmt-tile strong {
  font-family: var(--font-mono);
  font-size: 13px;
}

.fmt-tile span {
  font-size: 11px;
  color: var(--ink-muted);
}

.fmt-csv strong { color: var(--emerald); }
.fmt-tsv strong { color: var(--sapphire); }
.fmt-json strong { color: var(--amber); }
.fmt-md strong { color: var(--coral); }

/* ==========================================================================
   Footer, Drawer & Toasts
   ========================================================================== */
.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--sapphire);
}

.footer-note {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-muted);
}

/* Slide-Over Recipes Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(5px);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(440px, 94vw);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: var(--blur-lg);
  border-left: 1px solid #ffffff;
  box-shadow: -20px 0 50px -12px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
}

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

.drawer-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.drawer-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.drawer-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border-medium);
  background: #ffffff;
  font-size: 19px;
  cursor: pointer;
}

.drawer-body {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.recipe-save-card {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recipe-save-row {
  display: flex;
  gap: 8px;
}

.pipeline-preview-box {
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
}

.pipeline-preview-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.pipeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.step-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--sapphire-soft);
  color: var(--sapphire);
}

.muted-hint {
  font-size: 12.5px;
  color: var(--ink-muted);
}

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

.recipes-list-header h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
}

.recipes-io-actions {
  display: flex;
  gap: 6px;
}

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

.recipe-card {
  padding: 14px;
  border-radius: 13px;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recipe-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.recipe-name {
  font-size: 14px;
  font-weight: 700;
}

.recipe-meta {
  font-size: 12px;
  color: var(--ink-muted);
}

.recipe-actions {
  display: flex;
  gap: 6px;
}

/* Toasts */
.toast-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-medium);
  box-shadow: 0 14px 34px -8px rgba(15, 23, 42, 0.18);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

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

.toast-success .toast-dot { background: var(--emerald-dot); }
.toast-warning .toast-dot { background: #f59e0b; }
.toast-error .toast-dot { background: var(--coral-bright); }

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .bento-span-7,
  .bento-span-5 {
    grid-column: span 12;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }
  .topbar-nav {
    display: none;
  }
  .hero-section,
  .guide-section,
  .workspace-section,
  .bento-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .input-grid,
  .diag-formats {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Motion Choreography & Interactive Liquid Glass Effects
   ========================================================================== */

/* 1. Slow Ambient Aurora Refraction Drift */
@keyframes orbDriftA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(42px, 28px, 0) scale(1.07); }
  100% { transform: translate3d(-24px, 44px, 0) scale(0.96); }
}

@keyframes orbDriftB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-46px, 32px, 0) scale(1.06); }
  100% { transform: translate3d(28px, -26px, 0) scale(0.95); }
}

.orb-sapphire { animation: orbDriftA 22s ease-in-out infinite alternate; }
.orb-cyan { animation: orbDriftB 26s ease-in-out infinite alternate; }
.orb-coral { animation: orbDriftA 24s ease-in-out infinite alternate-reverse; }
.orb-emerald { animation: orbDriftB 28s ease-in-out infinite alternate-reverse; }

/* 2. Staggered Scroll & Load Entrance Choreography */
.motion-ready .reveal-item {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity 620ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--stagger, 0ms);
  will-change: opacity, transform;
}

.motion-ready .reveal-item.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* 3. Interactive Cursor-Tracking Liquid Glass Specular Glare & 3D Tilt */
.showcase-stage,
.guide-card,
.bento-card {
  position: relative;
  overflow: hidden;
}

.showcase-stage::before,
.guide-card::before,
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.68),
    rgba(255, 255, 255, 0.16) 40%,
    transparent 72%
  );
  transition: opacity 260ms var(--ease);
  z-index: 0;
}

.showcase-stage:hover::before,
.guide-card:hover::before,
.bento-card:hover::before {
  opacity: 1;
}

.showcase-stage > *,
.guide-card > *,
.bento-card > * {
  position: relative;
  z-index: 1;
}

.showcase-stage {
  transform: perspective(1150px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms var(--ease);
  transform-style: preserve-3d;
}

/* 4. Hero Showcase Live Micro-Choreography */
@keyframes floatCleanSheet {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -4px, 0); }
}

@keyframes bridgeBeam {
  0%, 24% { transform: translateX(-140%) skewX(-20deg); }
  48%, 100% { transform: translateX(260%) skewX(-20deg); }
}

.showcase-clean {
  animation: floatCleanSheet 5.8s ease-in-out infinite;
}

.bridge-pill {
  position: relative;
  overflow: hidden;
}

.bridge-pill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 46%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: translateX(-140%) skewX(-20deg);
  animation: bridgeBeam 4.6s ease-in-out infinite;
  pointer-events: none;
}

/* 5. Specular Light Sweep on Primary CTA Buttons */
.btn-primary,
.btn-export-csv {
  position: relative;
  overflow: hidden;
}

.btn-primary::after,
.btn-export-csv::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 52%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: skewX(-22deg);
  transition: left 520ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.btn-primary:hover:not(:disabled)::after,
.btn-export-csv:hover:not(:disabled)::after {
  left: 130%;
}

/* 6. Live Data Action Feedback (Column Clean Pulse, Row Snap, Stat Pop, Drawer Slide) */
@keyframes colCleanPulse {
  0% { background-color: rgba(16, 185, 129, 0.28); }
  55% { background-color: rgba(29, 78, 216, 0.14); }
  100% { background-color: rgba(29, 78, 216, 0.045); }
}

@keyframes headerCleanPulse {
  0% { background-color: #a7f3d0; color: #065f46; }
  100% { background-color: #dbeafe; color: var(--sapphire-deep); }
}

.table-wrap.col-flash-active tbody td.cell-selected-col {
  animation: colCleanPulse 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

.table-wrap.col-flash-active thead th.col-header-selected {
  animation: headerCleanPulse 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rowSnapIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

tbody.rows-cascade-active tr {
  animation: rowSnapIn 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

tbody.rows-cascade-active tr:nth-child(2) { animation-delay: 22ms; }
tbody.rows-cascade-active tr:nth-child(3) { animation-delay: 44ms; }
tbody.rows-cascade-active tr:nth-child(4) { animation-delay: 66ms; }
tbody.rows-cascade-active tr:nth-child(5) { animation-delay: 88ms; }
tbody.rows-cascade-active tr:nth-child(6) { animation-delay: 110ms; }
tbody.rows-cascade-active tr:nth-child(n+7) { animation-delay: 130ms; }

@keyframes statPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.stat-pill.stat-pop {
  animation: statPop 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerSlideIn {
  0% { opacity: 0; transform: translate3d(28px, 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes backdropFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.drawer:not(.hidden) {
  animation: drawerSlideIn 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop:not(.hidden) {
  animation: backdropFadeIn 220ms ease-out;
}

@keyframes toastEnter {
  0% { opacity: 0; transform: translate3d(0, 12px, 0) scale(0.97); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.toast {
  animation: toastEnter 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .motion-ready .reveal-item {
    opacity: 1 !important;
    transform: none !important;
  }
  .showcase-stage {
    transform: none !important;
  }
}
