@import url('fonts/fonts.css');
    :root {
      --heading: #0f172a;
      --body: #475569;
      --muted: #64748b;
      --brand-blue: #2563eb;
      --brand-violet: #7c3aed;
      --brand-gradient: linear-gradient(90deg, #2563eb, #7c3aed);
      --badge-bg: #eff6ff;
      --badge-border: #bfdbfe;
      --badge-text: #1d4ed8;
      --card-bg: rgba(255, 255, 255, 0.88);
      --card-border: #e2e8f0;
      --radius: 14px;
      --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
      --font-mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
      --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      --font-head: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: var(--font-sans);
      color: var(--body);
      background-color: #ffffff;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      position: relative;
      overflow-x: hidden;
    }
    .mesh-glow {
      position: fixed;
      top: 0; left: 0; right: 0; height: 100vh;
      pointer-events: none;
      z-index: 0;
      background:
        radial-gradient(circle at 10% 20%, rgba(169, 214, 245, 0.55) 0%, rgba(169, 214, 245, 0) 50%),
        radial-gradient(circle at 90% 25%, rgba(227, 201, 243, 0.45) 0%, rgba(227, 201, 243, 0) 45%),
        linear-gradient(to bottom, transparent 65%, #ffffff 100%);
      filter: blur(45px);
    }
    header, main, footer { position: relative; z-index: 1; }

    /* Header */
    header {
      height: 60px;
      border-bottom: 1px solid var(--card-border);
      background: rgba(255, 255, 255, 0.85);
      backdrop-filter: blur(12px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 24px;
    }
    .brand-logo {
      display: flex;
      align-items: center;
      gap: 8px;
      text-decoration: none;
      font-size: 20px;
      font-weight: 800;
      letter-spacing: -0.02em;
    }
    .brand-logo svg { width: 28px; height: 28px; }
    .brand-name-maf { color: #0f172a; }
    .brand-name-labs {
      background: var(--brand-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    nav.nav-links { display: flex; align-items: center; gap: 20px; }
    nav.nav-links a {
      color: var(--muted);
      text-decoration: none;
      font-size: 14px;
      font-weight: 500;
      transition: color 0.15s ease;
    }
    nav.nav-links a:hover { color: var(--brand-blue); }

    /* Compact Hero (< 140px) */
    .hero {
      padding: 12px 24px;
      text-align: center;
      max-width: 1000px;
      margin: 0 auto;
    }
    .pill-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      background: var(--badge-bg);
      border: 1px solid var(--badge-border);
      color: var(--badge-text);
      margin-bottom: 6px;
    }
    h1 {
      font-size: 26px;
      font-weight: 800;
      color: var(--heading);
      letter-spacing: -0.03em;
      line-height: 1.15;
    }
    .gradient-text {
      background: var(--brand-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .hero-sub {
      font-size: 13px;
      color: var(--muted);
      margin-top: 4px;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .privacy-tag {
      color: #16a34a;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-weight: 600;
    }

    /* Workspace container */
    .workspace-wrapper {
      max-width: 1560px;
      margin: 0 auto;
      padding: 0 20px 24px;
      width: 100%;
    }
    .workspace-card {
      background: var(--card-bg);
      backdrop-filter: blur(10px);
      border: 1px solid var(--card-border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .workspace-card.focus-mode {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      z-index: 1000;
      border-radius: 0;
      border: none;
      background: #ffffff;
      height: 100vh !important;
      max-width: 100vw !important;
    }

    /* Toolbar */
    .toolbar {
      padding: 10px 16px;
      border-bottom: 1px solid var(--card-border);
      background: rgba(255, 255, 255, 0.95);
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .toolbar-group {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      border-radius: 10px;
      padding: 8px 14px;
      cursor: pointer;
      transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
      min-height: 38px;
      border: 1px solid transparent;
      outline: none;
    }
    .btn:focus-visible {
      box-shadow: 0 0 0 4px rgba(37,99,235,0.18) !important;
    }
    .btn-primary {
      background: var(--brand-gradient);
      color: #ffffff;
      box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
    }
    .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
    }
    .btn-secondary {
      background: #ffffff;
      border-color: var(--card-border);
      color: var(--heading);
    }
    .btn-secondary:hover {
      border-color: var(--brand-blue);
      color: var(--brand-blue);
    }
    .btn-icon {
      padding: 7px 10px;
      color: var(--muted);
    }
    .btn-icon:hover { color: var(--heading); }

    .select-input, .text-input {
      font-family: inherit;
      font-size: 13px;
      padding: 7px 10px;
      border-radius: 8px;
      border: 1px solid var(--card-border);
      background: #ffffff;
      color: var(--heading);
      outline: none;
      min-height: 38px;
    }
    .select-input:focus, .text-input:focus {
      border-color: var(--brand-blue);
      box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    }

    /* Options Drawer / Popover */
    .options-bar {
      padding: 10px 16px;
      background: #f8fafc;
      border-bottom: 1px solid var(--card-border);
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 16px;
      font-size: 12px;
    }
    .opt-label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--heading);
      cursor: pointer;
      user-select: none;
    }
    .opt-label input[type="checkbox"] {
      accent-color: var(--brand-blue);
      width: 15px;
      height: 15px;
    }

    /* Column Schema Editor collapsible */
    .columns-panel {
      background: #f1f5f9;
      border-bottom: 1px solid var(--card-border);
      padding: 12px 16px;
      font-size: 12px;
      max-height: 230px;
      overflow-y: auto;
    }
    .columns-table {
      width: 100%;
      border-collapse: collapse;
      background: #ffffff;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    .columns-table th, .columns-table td {
      padding: 6px 10px;
      border-bottom: 1px solid #e2e8f0;
      text-align: left;
    }
    .columns-table th {
      background: #f8fafc;
      font-weight: 700;
      color: var(--heading);
    }
    .columns-table input, .columns-table select {
      font-size: 12px;
      padding: 4px 6px;
      border: 1px solid #cbd5e1;
      border-radius: 6px;
      width: 100%;
    }

    /* Split Workspace Panes */
    .panes-container {
      display: flex;
      height: calc(100vh - 280px);
      min-height: 560px;
      position: relative;
    }
    .pane {
      display: flex;
      flex-direction: column;
      min-width: 25%;
      height: 100%;
      background: #ffffff;
      position: relative;
    }
    .pane-left { width: 50%; }
    .pane-right { flex: 1; }

    .pane-divider {
      width: 8px;
      background: #f1f5f9;
      border-left: 1px solid var(--card-border);
      border-right: 1px solid var(--card-border);
      cursor: col-resize;
      transition: background 0.15s ease;
      position: relative;
      user-select: none;
    }
    .pane-divider:hover, .pane-divider.dragging {
      background: #cbd5e1;
    }
    .pane-divider::after {
      content: "";
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      width: 2px; height: 28px;
      background: #94a3b8;
      border-radius: 2px;
    }

    .pane-header {
      padding: 8px 14px;
      border-bottom: 1px solid var(--card-border);
      background: #f8fafc;
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 44px;
    }
    .pane-title {
      font-weight: 700;
      color: var(--heading);
      font-size: 13px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .pane-stats {
      font-size: 11px;
      color: var(--muted);
      font-weight: 500;
    }
    .pane-actions {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .editor-body {
      flex: 1;
      display: flex;
      position: relative;
      overflow: hidden;
    }
    .csv-textarea {
      width: 100%;
      height: 100%;
      border: none;
      outline: none;
      resize: none;
      padding: 14px;
      font-family: var(--font-mono);
      font-size: 14px;
      line-height: 1.6;
      color: #1e293b;
      background: #ffffff;
      white-space: pre;
      overflow: auto;
    }
    .sql-output-area {
      width: 100%;
      height: 100%;
      border: none;
      outline: none;
      resize: none;
      padding: 14px;
      font-family: var(--font-mono);
      font-size: 14px;
      line-height: 1.6;
      color: #0f172a;
      background: #fcfdfe;
      white-space: pre;
      overflow: auto;
    }

    /* Warning banner & alerts */
    .status-alert {
      padding: 8px 14px;
      font-size: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      border-bottom: 1px solid transparent;
    }
    .status-warning {
      background: #fffbeb;
      color: #b45309;
      border-color: #fde68a;
    }
    .status-error {
      background: #fef2f2;
      color: #dc2626;
      border-color: #fecaca;
    }
    .status-success {
      background: #f0fdf4;
      color: #16a34a;
      border-color: #bbf7d0;
    }

    /* Drag overlay */
    .drag-drop-overlay {
      position: absolute;
      inset: 0;
      background: rgba(37, 99, 235, 0.08);
      border: 2px dashed var(--brand-blue);
      display: none;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      font-weight: 700;
      color: var(--brand-blue);
      pointer-events: none;
      z-index: 50;
    }
    .pane.drag-over .drag-drop-overlay { display: flex; }

    /* Dialog/Modal */
    dialog.modal-sheet {
      border: 1px solid var(--card-border);
      border-radius: var(--radius);
      box-shadow: 0 10px 30px rgba(0,0,0,0.15);
      padding: 24px;
      max-width: 520px;
      width: 90%;
      margin: auto;
      background: #ffffff;
    }
    dialog::backdrop { background: rgba(15,23,42,0.4); backdrop-filter: blur(4px); }

    /* SEO Section */
    .seo-section {
      max-width: 1080px;
      margin: 40px auto;
      padding: 0 20px;
      line-height: 1.7;
      color: #334155;
    }
    .seo-section h2 {
      font-size: 22px;
      color: var(--heading);
      margin: 28px 0 12px;
      font-weight: 800;
    }
    .seo-section h3 {
      font-size: 17px;
      color: var(--heading);
      margin: 18px 0 8px;
      font-weight: 700;
    }
    .seo-section p { margin-bottom: 14px; font-size: 15px; }
    .seo-section ol, .seo-section ul {
      margin-left: 20px;
      margin-bottom: 16px;
      font-size: 15px;
    }
    .seo-section li { margin-bottom: 8px; }
    .code-comparison {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin: 20px 0;
    }
    .code-box {
      background: #0f172a;
      color: #e2e8f0;
      padding: 14px;
      border-radius: 10px;
      font-family: var(--font-mono);
      font-size: 12px;
      overflow-x: auto;
      line-height: 1.5;
    }
    .code-box-header {
      color: #94a3b8;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      margin-bottom: 8px;
    }
    details.faq-item {
      background: #ffffff;
      border: 1px solid var(--card-border);
      border-radius: 10px;
      margin-bottom: 12px;
      overflow: hidden;
    }
    details.faq-item summary {
      padding: 14px 18px;
      font-weight: 700;
      cursor: pointer;
      color: var(--heading);
      user-select: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    details.faq-item summary::after { content: "+"; font-size: 18px; color: var(--muted); }
    details.faq-item[open] summary::after { content: "−"; }
    details.faq-item .faq-answer {
      padding: 0 18px 16px;
      font-size: 14px;
      color: var(--body);
    }

    /* Footer */
    footer {
      border-top: 1px solid var(--card-border);
      background: rgba(255, 255, 255, 0.95);
      padding: 32px 24px;
      text-align: center;
      margin-top: auto;
      font-size: 13px;
      color: var(--muted);
    }
    .footer-tools {
      display: flex;
      justify-content: center;
      gap: 16px;
      flex-wrap: wrap;
      margin: 14px 0 20px;
    }
    .footer-tools a {
      color: var(--body);
      text-decoration: none;
      font-weight: 500;
    }
    .footer-tools a:hover { color: var(--brand-blue); }

    /* Responsive */
    @media (max-width: 900px) {
      .panes-container {
        flex-direction: column;
        height: auto;
      }
      .pane-left, .pane-right {
        width: 100% !important;
        min-height: 55vh;
      }
      .pane-divider { display: none; }
      .code-comparison { grid-template-columns: 1fr; }
    }


/* Ambient Background Blobs (Fixed across entire viewport) */
.blob-bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  -webkit-filter: blur(80px);
  opacity: 0.85;
  will-change: transform;
}

.blob-1 {
  top: -12vh;
  left: -8vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.32) 0%, rgba(59, 130, 246, 0.16) 45%, rgba(255, 255, 255, 0) 70%);
  animation: blob-float-1 20s infinite ease-in-out alternate;
}

.blob-2 {
  top: -10vh;
  right: -10vw;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.28) 0%, rgba(168, 85, 247, 0.15) 45%, rgba(255, 255, 255, 0) 70%);
  animation: blob-float-2 24s infinite ease-in-out alternate;
}

.blob-3 {
  bottom: -15vh;
  left: -10vw;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, rgba(14, 165, 233, 0.14) 45%, rgba(255, 255, 255, 0) 70%);
  animation: blob-float-3 22s infinite ease-in-out alternate;
}

.blob-4 {
  bottom: -10vh;
  right: -8vw;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(236, 72, 153, 0.15) 45%, rgba(255, 255, 255, 0) 70%);
  animation: blob-float-4 26s infinite ease-in-out alternate;
}

@keyframes blob-float-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vw, 6vh) scale(1.06); }
  100% { transform: translate(-3vw, 10vh) scale(0.96); }
}

@keyframes blob-float-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6vw, 8vh) scale(1.08); }
  100% { transform: translate(4vw, 5vh) scale(0.94); }
}

@keyframes blob-float-3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, -8vh) scale(1.06); }
  100% { transform: translate(-4vw, -4vh) scale(0.95); }
}

@keyframes blob-float-4 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, -6vh) scale(1.08); }
  100% { transform: translate(6vw, -10vh) scale(0.95); }
}

/* Ensure foreground content stacks above blobs */
header, main, footer, .container, .site-header, .site-footer, .workspace, article {
  position: relative;
  z-index: 1;
}
