@import url('fonts/fonts.css');

    /* -------------------------------------------------------------
       THEME VARIABLES - Matching maflabs.online Light Theme
       ------------------------------------------------------------- */
    :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;
      --radius-sm: 8px;
      --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
      --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
      --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
      
      --status-success: #16a34a;
      --status-success-bg: #f0fdf4;
      --status-warning: #b45309;
      --status-warning-bg: #fffbeb;
      --status-error: #dc2626;
      --status-error-bg: #fef2f2;
      
      --font-heading: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      --font-mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, "SFMono-Regular", monospace;
    }

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

    html {
      font-size: 16px;
      scroll-behavior: smooth;
    }

    body {
      font-family: var(--font-body);
      color: var(--body);
      background-color: #ffffff;
      min-height: 100vh;
      line-height: 1.5;
      position: relative;
      overflow-x: hidden;
    }

    /* Soft Mesh Glow Background matching maflabs.online */
    body::before {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: -1;
      background:
        radial-gradient(circle at 12% 18%, rgba(169, 214, 245, 0.55) 0%, rgba(169, 214, 245, 0) 50%),
        radial-gradient(circle at 88% 22%, rgba(227, 201, 243, 0.45) 0%, rgba(227, 201, 243, 0) 52%),
        radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 70%);
      filter: blur(55px);
    }

    /* Skip Link */
    .skip-link {
      position: absolute;
      top: -40px;
      left: 10px;
      background: var(--brand-blue);
      color: #fff;
      padding: 8px 16px;
      z-index: 9999;
      border-radius: var(--radius-sm);
      text-decoration: none;
      font-weight: 600;
      transition: top 0.2s;
    }
    .skip-link:focus {
      top: 10px;
    }

    /* Utility */
    .gradient-text {
      background: var(--brand-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: inline-block;
    }
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* Header */
    header.site-header {
      height: 64px;
      background: rgba(255, 255, 255, 0.85);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--card-border);
      position: sticky;
      top: 0;
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 1.5rem;
    }
    .brand-logo {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      text-decoration: none;
      font-family: var(--font-heading);
      font-weight: 800;
      font-size: 1.35rem;
      color: var(--heading);
      letter-spacing: -0.02em;
    }
    .brand-logo-icon {
      width: 32px;
      height: 32px;
      border-radius: 9px;
      background: var(--brand-gradient);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ffffff;
      font-size: 1.05rem;
      box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
    }
    nav.site-nav {
      display: flex;
      align-items: center;
      gap: 1.5rem;
    }
    nav.site-nav a {
      color: var(--body);
      text-decoration: none;
      font-weight: 500;
      font-size: 0.93rem;
      transition: color 0.15s;
    }
    nav.site-nav a:hover {
      color: var(--brand-blue);
    }
    .nav-toggle-btn {
      display: none;
      background: none;
      border: none;
      cursor: pointer;
      padding: 8px;
      border-radius: var(--radius-sm);
      color: var(--heading);
    }

    /* Compact Hero Section */
    .hero-section {
      padding: 0.85rem 1.5rem 0.6rem;
      text-align: center;
      max-width: 1000px;
      margin: 0 auto;
    }
    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      background: var(--badge-bg);
      border: 1px solid var(--badge-border);
      color: var(--badge-text);
      font-size: 0.75rem;
      font-weight: 700;
      padding: 0.2rem 0.65rem;
      border-radius: 999px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 0.35rem;
    }
    .hero-section h1 {
      font-family: var(--font-heading);
      font-size: clamp(1.4rem, 2.5vw, 1.85rem);
      font-weight: 800;
      color: var(--heading);
      letter-spacing: -0.03em;
      line-height: 1.2;
    }
    .hero-subtitle {
      font-size: 0.88rem;
      color: var(--muted);
      margin-top: 0.2rem;
    }
    .hero-privacy {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.76rem;
      color: #059669;
      font-weight: 600;
      margin-top: 0.25rem;
      background: rgba(16, 185, 129, 0.08);
      padding: 0.15rem 0.55rem;
      border-radius: 6px;
    }

    /* Summary KPI Strip */
    .kpi-strip {
      max-width: 1560px;
      margin: 0 auto 0.65rem;
      padding: 0 1rem;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 0.65rem;
    }
    .kpi-card {
      background: var(--card-bg);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid var(--card-border);
      border-radius: var(--radius);
      padding: 0.65rem 0.85rem;
      box-shadow: var(--shadow-sm);
      display: flex;
      flex-direction: column;
      justify-content: center;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .kpi-card:hover {
      box-shadow: var(--shadow);
    }
    .kpi-label {
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .kpi-value {
      font-family: var(--font-heading);
      font-size: 1.25rem;
      font-weight: 800;
      color: var(--heading);
      margin-top: 0.15rem;
      letter-spacing: -0.02em;
    }
    .kpi-sub {
      font-size: 0.7rem;
      color: var(--muted);
    }

    /* Workspace Toolbar */
    .workspace-toolbar {
      max-width: 1560px;
      margin: 0 auto 0.5rem;
      padding: 0 1rem;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
    }
    .toolbar-left, .toolbar-right {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      height: 38px;
      padding: 0 0.9rem;
      font-size: 0.85rem;
      font-weight: 600;
      font-family: var(--font-body);
      border-radius: 10px;
      cursor: pointer;
      text-decoration: none;
      border: 1px solid transparent;
      transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease;
      white-space: nowrap;
    }
    .btn:focus-visible {
      outline: none;
      box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    }
    .btn-primary {
      background: var(--brand-gradient);
      color: #ffffff;
      box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    }
    .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);
      box-shadow: var(--shadow-sm);
    }
    .btn-secondary:hover {
      border-color: var(--brand-blue);
      color: var(--brand-blue);
    }
    .btn-sm {
      height: 32px;
      padding: 0 0.65rem;
      font-size: 0.78rem;
      border-radius: 8px;
    }
    .btn-icon {
      width: 36px;
      padding: 0;
    }
    .btn-icon-sm {
      width: 30px;
      height: 30px;
      padding: 0;
      border-radius: 6px;
    }

    /* MAIN SPLIT-SCREEN WORKSPACE */
    .workspace-container {
      max-width: 1560px;
      margin: 0 auto;
      padding: 0 1rem;
      height: calc(100dvh - 250px);
      min-height: 560px;
      position: relative;
    }
    
    /* Fullscreen Focus Mode */
    .workspace-container.focus-mode {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      max-width: 100vw;
      z-index: 2000;
      background: #f8fafc;
      padding: 0.85rem;
      margin: 0;
    }

    .workspace-layout {
      display: flex;
      width: 100%;
      height: 100%;
      gap: 0;
      background: transparent;
      position: relative;
    }

    /* Panes */
    .pane {
      background: var(--card-bg);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--card-border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-width: 25%;
      height: 100%;
      position: relative;
    }

    #left-pane {
      width: 40%;
    }
    #right-pane {
      flex: 1;
      width: 60%;
    }

    /* Draggable Splitter */
    .pane-divider {
      width: 10px;
      cursor: col-resize;
      background: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      z-index: 10;
      user-select: none;
      transition: background 0.15s;
    }
    .pane-divider::after {
      content: "";
      width: 3px;
      height: 36px;
      border-radius: 3px;
      background: #cbd5e1;
      transition: background 0.15s, height 0.15s;
    }
    .pane-divider:hover::after, .pane-divider.active::after {
      background: var(--brand-blue);
      height: 60px;
    }

    /* Pane Header Bar */
    .pane-header {
      padding: 0.65rem 0.95rem;
      border-bottom: 1px solid var(--card-border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(255, 255, 255, 0.7);
      flex-shrink: 0;
      gap: 0.5rem;
    }
    .pane-title-group {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .pane-title {
      font-family: var(--font-heading);
      font-weight: 700;
      font-size: 0.96rem;
      color: var(--heading);
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }
    .pane-badge {
      font-size: 0.72rem;
      padding: 0.1rem 0.45rem;
      border-radius: 999px;
      background: #f1f5f9;
      color: var(--muted);
      font-weight: 600;
    }
    .pane-actions {
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }

    /* Pane Body */
    .pane-body {
      flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      padding: 0.95rem;
      position: relative;
    }

    /* Left Pane Components: Dropzone & Settings */
    .dropzone {
      border: 2px dashed #93c5fd;
      background: #f8fbff;
      border-radius: var(--radius);
      padding: 1.4rem 1rem;
      text-align: center;
      cursor: pointer;
      transition: all 0.15s ease;
      position: relative;
    }
    .dropzone:hover, .dropzone.dragover {
      border-color: var(--brand-blue);
      background: #eff6ff;
      transform: scale(0.995);
    }
    .dropzone-icon {
      width: 44px;
      height: 44px;
      margin: 0 auto 0.5rem;
      border-radius: 50%;
      background: #dbeafe;
      color: var(--brand-blue);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .dropzone-title {
      font-weight: 700;
      color: var(--heading);
      font-size: 0.95rem;
    }
    .dropzone-subtitle {
      font-size: 0.78rem;
      color: var(--muted);
      margin-top: 0.25rem;
    }

    .detected-files-list {
      margin-top: 0.75rem;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }
    .file-tag {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #ffffff;
      border: 1px solid var(--card-border);
      border-radius: 8px;
      padding: 0.35rem 0.6rem;
      font-size: 0.76rem;
      font-family: var(--font-mono);
      color: var(--heading);
    }
    .file-tag-status {
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      font-weight: 700;
      color: var(--status-success);
    }

    /* Raw Paste Area Accordion */
    .paste-box-section {
      margin-top: 0.75rem;
      border: 1px solid var(--card-border);
      border-radius: var(--radius-sm);
      background: #ffffff;
      overflow: hidden;
    }
    .paste-box-header {
      padding: 0.5rem 0.75rem;
      background: #f8fafc;
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--heading);
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      user-select: none;
    }
    .paste-box-content {
      padding: 0.65rem;
      display: none;
    }
    .paste-box-content.open {
      display: block;
    }
    .custom-textarea {
      width: 100%;
      height: 110px;
      font-family: var(--font-mono);
      font-size: 0.8rem;
      line-height: 1.5;
      padding: 0.5rem;
      border: 1px solid var(--card-border);
      border-radius: 6px;
      resize: vertical;
      color: var(--heading);
      background: #fafafa;
    }
    .custom-textarea:focus {
      outline: none;
      border-color: var(--brand-blue);
      background: #ffffff;
    }

    /* Settings Box */
    .settings-card {
      margin-top: 0.75rem;
      background: #ffffff;
      border: 1px solid var(--card-border);
      border-radius: var(--radius-sm);
      padding: 0.75rem;
    }
    .form-group {
      margin-bottom: 0.65rem;
    }
    .form-group:last-child {
      margin-bottom: 0;
    }
    .form-label {
      display: block;
      font-size: 0.76rem;
      font-weight: 600;
      color: var(--heading);
      margin-bottom: 0.2rem;
    }
    .form-hint {
      font-size: 0.7rem;
      color: var(--muted);
      margin-bottom: 0.35rem;
    }
    .form-input {
      width: 100%;
      height: 34px;
      padding: 0 0.6rem;
      font-size: 0.82rem;
      font-family: var(--font-body);
      border: 1px solid var(--card-border);
      border-radius: 6px;
      background: #f8fafc;
      color: var(--heading);
      transition: border-color 0.15s;
    }
    .form-input:focus {
      outline: none;
      border-color: var(--brand-blue);
      background: #ffffff;
    }

    /* Benchmark CTR Curve Table */
    .benchmark-table-wrapper {
      margin-top: 0.5rem;
      border: 1px solid var(--card-border);
      border-radius: 6px;
      overflow-x: auto;
      max-height: 160px;
    }
    .benchmark-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.74rem;
      text-align: left;
    }
    .benchmark-table th {
      background: #f8fafc;
      padding: 0.3rem 0.5rem;
      color: var(--muted);
      font-weight: 600;
      position: sticky;
      top: 0;
      border-bottom: 1px solid var(--card-border);
    }
    .benchmark-table td {
      padding: 0.25rem 0.5rem;
      border-bottom: 1px solid #f1f5f9;
    }
    .benchmark-input {
      width: 55px;
      padding: 2px 4px;
      font-size: 0.74rem;
      border: 1px solid var(--card-border);
      border-radius: 4px;
      text-align: right;
    }

    /* Right Pane Tabs */
    .tab-nav {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      overflow-x: auto;
      padding: 0.5rem 0.85rem;
      background: #f8fafc;
      border-bottom: 1px solid var(--card-border);
      scrollbar-width: thin;
      flex-shrink: 0;
    }
    .tab-btn {
      background: transparent;
      border: none;
      font-family: var(--font-body);
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--muted);
      padding: 0.35rem 0.65rem;
      border-radius: 6px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.15s ease;
      white-space: nowrap;
    }
    .tab-btn:hover {
      color: var(--heading);
      background: rgba(0, 0, 0, 0.04);
    }
    .tab-btn.active {
      color: var(--brand-blue);
      background: #eff6ff;
      font-weight: 700;
    }
    .tab-count {
      font-size: 0.68rem;
      background: rgba(0, 0, 0, 0.06);
      padding: 1px 5px;
      border-radius: 999px;
    }
    .tab-btn.active .tab-count {
      background: #bfdbfe;
      color: #1d4ed8;
    }

    /* Filter & Search Bar inside Right Pane */
    .table-control-strip {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.5rem 0.85rem;
      border-bottom: 1px solid #f1f5f9;
      background: #ffffff;
      flex-wrap: wrap;
    }
    .search-input-wrap {
      position: relative;
      flex: 1;
      min-width: 140px;
    }
    .search-input {
      width: 100%;
      height: 30px;
      padding-left: 1.8rem;
      padding-right: 0.5rem;
      font-size: 0.78rem;
      border: 1px solid var(--card-border);
      border-radius: 6px;
    }
    .search-icon {
      position: absolute;
      left: 7px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--muted);
      font-size: 0.75rem;
      pointer-events: none;
    }

    /* Data Tables */
    .table-container {
      flex: 1;
      overflow: auto;
      background: #ffffff;
      position: relative;
    }
    .data-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.82rem;
      text-align: left;
    }
    .data-table th {
      background: #f8fafc;
      color: var(--heading);
      font-weight: 700;
      padding: 0.6rem 0.75rem;
      position: sticky;
      top: 0;
      z-index: 5;
      border-bottom: 1px solid var(--card-border);
      cursor: pointer;
      user-select: none;
      white-space: nowrap;
    }
    .data-table th:hover {
      background: #edf2f7;
    }
    .data-table th .sort-indicator {
      display: inline-block;
      margin-left: 4px;
      color: var(--muted);
      font-size: 0.7rem;
    }
    .data-table td {
      padding: 0.6rem 0.75rem;
      border-bottom: 1px solid #f1f5f9;
      color: var(--heading);
      vertical-align: middle;
    }
    .data-table tbody tr {
      transition: background 0.1s ease;
      cursor: pointer;
    }
    .data-table tbody tr:hover {
      background: #f8fafc;
    }
    .data-table td.mono {
      font-family: var(--font-mono);
      font-size: 0.8rem;
    }
    .data-table td.num {
      text-align: right;
    }
    .data-table th.num {
      text-align: right;
    }

    /* Tags & Badges in Tables */
    .tag-intent {
      display: inline-block;
      font-size: 0.68rem;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 4px;
      background: #f1f5f9;
      color: var(--muted);
      text-transform: uppercase;
      margin-right: 4px;
    }
    .tag-question { background: #fef3c7; color: #92400e; }
    .tag-commercial { background: #e0e7ff; color: #3730a3; }
    .tag-free { background: #dcfce7; color: #166534; }
    .tag-brand { background: #f3e8ff; color: #6b21a8; }

    .diff-badge {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      font-weight: 700;
      font-size: 0.74rem;
      padding: 1px 6px;
      border-radius: 4px;
    }
    .diff-badge.gain {
      background: var(--status-success-bg);
      color: var(--status-success);
    }
    .diff-badge.loss {
      background: var(--status-error-bg);
      color: var(--status-error);
    }

    /* Action Checklist / To-Do Drawer or Tab */
    .todo-panel {
      padding: 0.85rem;
      background: #ffffff;
      height: 100%;
      overflow-y: auto;
    }
    .todo-item {
      display: flex;
      align-items: flex-start;
      gap: 0.65rem;
      background: #f8fafc;
      border: 1px solid var(--card-border);
      border-radius: 8px;
      padding: 0.6rem 0.75rem;
      margin-bottom: 0.5rem;
    }
    .todo-item input[type="checkbox"] {
      margin-top: 3px;
      cursor: pointer;
    }
    .todo-content {
      flex: 1;
    }
    .todo-query {
      font-weight: 700;
      color: var(--heading);
      font-size: 0.85rem;
    }
    .todo-action {
      font-size: 0.76rem;
      color: var(--body);
      margin-top: 2px;
    }
    .todo-meta {
      font-size: 0.7rem;
      color: var(--muted);
      margin-top: 2px;
    }

    /* Trend SVG Chart */
    .chart-container {
      width: 100%;
      height: 260px;
      padding: 0.5rem;
      background: #ffffff;
      border-radius: var(--radius-sm);
      border: 1px solid var(--card-border);
      position: relative;
    }

    /* Empty and Error States */
    .empty-state {
      padding: 3rem 1.5rem;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100%;
      color: var(--muted);
    }
    .empty-state svg {
      width: 48px;
      height: 48px;
      margin-bottom: 0.85rem;
      color: #cbd5e1;
    }
    .empty-state h3 {
      font-size: 1rem;
      font-weight: 700;
      color: var(--heading);
      margin-bottom: 0.35rem;
    }
    .empty-state p {
      font-size: 0.82rem;
      max-width: 380px;
      margin-bottom: 1rem;
    }

    .alert-banner {
      display: flex;
      align-items: flex-start;
      gap: 0.6rem;
      padding: 0.75rem 1rem;
      border-radius: var(--radius-sm);
      font-size: 0.82rem;
      margin-bottom: 0.75rem;
    }
    .alert-error {
      background: var(--status-error-bg);
      border: 1px solid #fecaca;
      color: #991b1b;
    }
    .alert-info {
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: #1e40af;
    }

    /* Modal / Popovers */
    .modal-backdrop {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(15, 23, 42, 0.45);
      backdrop-filter: blur(4px);
      z-index: 3000;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }
    .modal-backdrop.open {
      display: flex;
    }
    .modal-box {
      background: #ffffff;
      border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      width: 100%;
      max-width: 580px;
      max-height: 85vh;
      overflow-y: auto;
      border: 1px solid var(--card-border);
    }
    .modal-header {
      padding: 1rem 1.25rem;
      border-bottom: 1px solid var(--card-border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .modal-header h3 {
      font-family: var(--font-heading);
      font-weight: 800;
      color: var(--heading);
      font-size: 1.1rem;
    }
    .modal-body {
      padding: 1.25rem;
    }

    /* Sticky Bottom Mobile Bar */
    .mobile-sticky-bar {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 60px;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      border-top: 1px solid var(--card-border);
      padding: 0 1rem;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      z-index: 1000;
      box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
    }

    /* SEO Copy Section (700-1000 words, rich layout) */
    .seo-section {
      max-width: 900px;
      margin: 4rem auto 2rem;
      padding: 0 1.5rem;
      color: var(--body);
    }
    .seo-section h2 {
      font-family: var(--font-heading);
      font-size: 1.6rem;
      font-weight: 800;
      color: var(--heading);
      margin: 2rem 0 0.75rem;
      letter-spacing: -0.02em;
    }
    .seo-section h3 {
      font-family: var(--font-heading);
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--heading);
      margin: 1.5rem 0 0.5rem;
    }
    .seo-section p {
      margin-bottom: 1rem;
      font-size: 0.96rem;
      line-height: 1.7;
    }
    .seo-section ol, .seo-section ul {
      margin: 0.75rem 0 1.25rem 1.5rem;
      font-size: 0.96rem;
      line-height: 1.7;
    }
    .seo-section li {
      margin-bottom: 0.4rem;
    }
    .code-preview {
      background: #0f172a;
      color: #f8fafc;
      padding: 1rem;
      border-radius: 8px;
      font-family: var(--font-mono);
      font-size: 0.82rem;
      overflow-x: auto;
      margin: 1rem 0 1.5rem;
      line-height: 1.5;
    }
    .faq-accordion details {
      background: #ffffff;
      border: 1px solid var(--card-border);
      border-radius: var(--radius-sm);
      margin-bottom: 0.75rem;
      padding: 0.85rem 1rem;
      transition: all 0.15s ease;
    }
    .faq-accordion details[open] {
      box-shadow: var(--shadow-sm);
    }
    .faq-accordion summary {
      font-weight: 700;
      color: var(--heading);
      cursor: pointer;
      user-select: none;
      outline: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .faq-accordion summary::-webkit-details-marker {
      display: none;
    }
    .faq-accordion summary::after {
      content: "+";
      font-size: 1.2rem;
      font-weight: 400;
      color: var(--muted);
    }
    .faq-accordion details[open] summary::after {
      content: "−";
    }
    .faq-accordion p {
      margin-top: 0.75rem;
      margin-bottom: 0;
      font-size: 0.92rem;
      color: var(--body);
    }

    /* Footer */
    footer.site-footer {
      border-top: 1px solid var(--card-border);
      background: #f8fafc;
      padding: 3rem 1.5rem 2rem;
      margin-top: 4rem;
    }
    .footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 2rem;
    }
    .footer-links-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 1.5rem;
    }
    .footer-links-grid h4 {
      font-family: var(--font-heading);
      font-size: 0.9rem;
      color: var(--heading);
      margin-bottom: 0.75rem;
    }
    .footer-links-grid ul {
      list-style: none;
    }
    .footer-links-grid li {
      margin-bottom: 0.5rem;
    }
    .footer-links-grid a {
      color: var(--muted);
      text-decoration: none;
      font-size: 0.85rem;
      transition: color 0.15s;
    }
    .footer-links-grid a:hover {
      color: var(--brand-blue);
    }
    .footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-top: 1px solid var(--card-border);
      padding-top: 1.5rem;
      font-size: 0.82rem;
      color: var(--muted);
      flex-wrap: wrap;
      gap: 1rem;
    }

    /* RESPONSIVE LAYOUT (Under 900px) */
    @media (max-width: 900px) {
      .workspace-container {
        height: auto;
        min-height: unset;
        margin-bottom: 70px; /* space for sticky bar */
      }
      .workspace-layout {
        flex-direction: column;
        gap: 1rem;
      }
      #left-pane, #right-pane {
        width: 100% !important;
        min-height: 60dvh;
      }
      .pane-divider {
        display: none;
      }
      .mobile-sticky-bar {
        display: flex;
      }
      .site-nav {
        display: none; /* simple hamburger fallback */
      }
      .nav-toggle-btn {
        display: block;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      * {
        animation: none !important;
        transition: none !important;
      }
    }


/* 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;
}
