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

    /* Design Tokens */
    :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);

      --status-success-bg: #f0fdf4;
      --status-success-text: #16a34a;
      --status-warning-bg: #fffbeb;
      --status-warning-text: #b45309;
      --status-error-bg: #fef2f2;
      --status-error-text: #dc2626;

      --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, "SF Mono", monospace;
    }

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

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

    /* Soft Mesh Glow Background */
    .bg-mesh {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: -1;
      background:
        radial-gradient(circle 600px at 10% 15%, rgba(169, 214, 245, 0.55), transparent 70%),
        radial-gradient(circle 550px at 90% 20%, rgba(227, 201, 243, 0.45), transparent 70%);
      filter: blur(60px);
    }

    /* Layout Elements */
    .site-header {
      height: 64px;
      border-bottom: 1px solid rgba(226, 232, 240, 0.8);
      backdrop-filter: blur(12px);
      background: rgba(255, 255, 255, 0.8);
      position: sticky;
      top: 0;
      z-index: 40;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 1.5rem;
    }

    .brand-link {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      text-decoration: none;
      font-family: var(--font-heading);
      font-weight: 800;
      font-size: 1.35rem;
      letter-spacing: -0.02em;
    }

    .brand-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: var(--brand-gradient);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 18px;
      font-weight: 800;
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    }

    .brand-text-navy {
      color: #0f172a;
    }

    .brand-text-grad {
      background: var(--brand-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .header-nav {
      display: flex;
      align-items: center;
      gap: 1.25rem;
    }

    .header-nav a {
      color: var(--muted);
      text-decoration: none;
      font-weight: 500;
      font-size: 0.95rem;
      transition: color 0.15s ease;
    }

    .header-nav a:hover {
      color: var(--brand-blue);
    }

    .menu-toggle {
      display: none;
      background: none;
      border: 1px solid var(--card-border);
      border-radius: 8px;
      padding: 6px 10px;
      cursor: pointer;
      color: var(--heading);
      font-size: 1.25rem;
    }

    /* Compact Hero (< 140px on desktop) */
    .compact-hero {
      padding: 0.85rem 1.5rem 0.6rem;
      text-align: center;
      max-width: 1200px;
      margin: 0 auto;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.2rem 0.75rem;
      border-radius: 9999px;
      background: var(--badge-bg);
      border: 1px solid var(--badge-border);
      color: var(--badge-text);
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 0.35rem;
    }

    .compact-hero h1 {
      font-family: var(--font-heading);
      font-weight: 800;
      font-size: clamp(1.4rem, 2.5vw, 1.85rem);
      color: var(--heading);
      letter-spacing: -0.03em;
      line-height: 1.15;
    }

    .grad-heading {
      background: var(--brand-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .hero-subtitle {
      font-size: 0.88rem;
      color: var(--body);
      margin-top: 0.25rem;
    }

    .hero-privacy {
      font-size: 0.76rem;
      color: var(--muted);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      margin-top: 0.2rem;
    }

    /* Toolbar */
    .workspace-toolbar {
      max-width: 1400px;
      margin: 0 auto;
      padding: 0.5rem 1.5rem;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      z-index: 10;
    }

    .toolbar-left, .toolbar-right {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-family: var(--font-body);
      font-size: 0.85rem;
      font-weight: 600;
      padding: 0.45rem 0.9rem;
      border-radius: 10px;
      cursor: pointer;
      text-decoration: none;
      transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
      min-height: 38px;
    }

    .btn:focus-visible {
      outline: none;
      box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
    }

    .btn-primary {
      background: var(--brand-gradient);
      color: #ffffff;
      border: none;
      box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
    }

    .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 20px rgba(79, 70, 229, 0.34);
    }

    .btn-secondary {
      background: #ffffff;
      color: var(--heading);
      border: 1px solid var(--card-border);
    }

    .btn-secondary:hover {
      border-color: var(--brand-blue);
      color: var(--brand-blue);
    }

    .btn-subtle {
      background: transparent;
      color: var(--muted);
      border: 1px solid transparent;
      padding: 0.35rem 0.6rem;
    }

    .btn-subtle:hover {
      background: rgba(241, 245, 249, 0.8);
      color: var(--heading);
    }

    /* Workspace Split Screen */
    .workspace-container {
      max-width: 1400px;
      margin: 0 auto;
      padding: 0 1.5rem 1rem;
      height: calc(100vh - 240px);
      min-height: 560px;
      position: relative;
    }

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

    .pane {
      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;
      height: 100%;
      overflow: hidden;
      position: relative;
    }

    .pane-left {
      width: 50%;
    }

    .pane-right {
      width: 50%;
    }

    .pane-resizer {
      width: 12px;
      cursor: col-resize;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 20;
      margin: 0 -6px;
      user-select: none;
    }

    .pane-resizer::after {
      content: "";
      width: 4px;
      height: 48px;
      background: #cbd5e1;
      border-radius: 9999px;
      transition: background 0.15s ease;
    }

    .pane-resizer:hover::after, .pane-resizer.dragging::after {
      background: var(--brand-blue);
    }

    .pane-header {
      padding: 0.65rem 1rem;
      border-bottom: 1px solid var(--card-border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(255, 255, 255, 0.6);
    }

    .pane-title {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--heading);
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .pane-badge {
      font-size: 0.72rem;
      padding: 0.15rem 0.5rem;
      border-radius: 9999px;
      background: #f1f5f9;
      color: var(--muted);
      font-weight: 600;
    }

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

    /* Focus Mode Overlay */
    .workspace-container.focus-mode {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      max-width: none;
      margin: 0;
      padding: 0.75rem;
      background: rgba(15, 23, 42, 0.75);
      backdrop-filter: blur(8px);
      z-index: 100;
    }

    .workspace-container.focus-mode .workspace-split {
      background: transparent;
    }

    /* Empty Drop Zone */
    .drop-zone {
      flex: 1;
      border: 2px dashed #cbd5e1;
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 2rem 1.5rem;
      text-align: center;
      background: rgba(255, 255, 255, 0.4);
      transition: all 0.2s ease;
      cursor: pointer;
    }

    .drop-zone.dragover {
      border-color: var(--brand-blue);
      background: rgba(239, 246, 255, 0.7);
      transform: scale(0.99);
    }

    .drop-zone-icon {
      width: 52px;
      height: 52px;
      border-radius: 14px;
      background: #eff6ff;
      color: var(--brand-blue);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 0.85rem;
      font-size: 1.6rem;
    }

    .drop-zone h3 {
      font-size: 1.05rem;
      color: var(--heading);
      margin-bottom: 0.35rem;
    }

    .drop-zone p {
      font-size: 0.85rem;
      color: var(--muted);
      max-width: 320px;
      margin-bottom: 1rem;
    }

    /* Viewer / Text Content */
    .text-content-viewer {
      font-family: var(--font-mono);
      font-size: 0.9rem;
      line-height: 1.6;
      color: #334155;
      white-space: pre-wrap;
      word-break: break-word;
      user-select: text;
    }

    .doc-paragraph {
      position: relative;
      padding: 0.3rem 0.5rem 0.3rem 2.8rem;
      border-radius: 6px;
      transition: background 0.15s ease;
    }

    .doc-paragraph:hover {
      background: rgba(241, 245, 249, 0.6);
    }

    .doc-paragraph.highlighted {
      background: #fef08a !important;
      outline: 2px solid #ca8a04;
    }

    .p-num {
      position: absolute;
      left: 0.4rem;
      top: 0.3rem;
      font-size: 0.75rem;
      color: #94a3b8;
      font-family: var(--font-mono);
      user-select: none;
    }

    /* Findings List */
    .findings-controls {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding-bottom: 0.75rem;
      border-bottom: 1px solid var(--card-border);
      margin-bottom: 0.75rem;
    }

    .filter-tags {
      display: flex;
      gap: 0.35rem;
      flex-wrap: wrap;
    }

    .filter-btn {
      font-size: 0.75rem;
      font-weight: 600;
      padding: 0.2rem 0.55rem;
      border-radius: 6px;
      border: 1px solid var(--card-border);
      background: #ffffff;
      color: var(--muted);
      cursor: pointer;
    }

    .filter-btn.active {
      background: var(--brand-blue);
      color: #ffffff;
      border-color: var(--brand-blue);
    }

    .finding-card {
      border: 1px solid var(--card-border);
      border-radius: 10px;
      padding: 0.75rem;
      background: #ffffff;
      margin-bottom: 0.65rem;
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
      position: relative;
    }

    .finding-card:hover {
      border-color: #cbd5e1;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    }

    .finding-card.severity-high {
      border-left: 4px solid var(--status-error-text);
    }

    .finding-card.severity-medium {
      border-left: 4px solid var(--status-warning-text);
    }

    .finding-card.severity-info {
      border-left: 4px solid var(--brand-blue);
    }

    .finding-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      font-size: 0.75rem;
      margin-bottom: 0.35rem;
    }

    .badge-sev {
      padding: 0.15rem 0.45rem;
      border-radius: 4px;
      font-weight: 700;
      font-size: 0.7rem;
      text-transform: uppercase;
    }

    .sev-high {
      background: var(--status-error-bg);
      color: var(--status-error-text);
    }

    .sev-medium {
      background: var(--status-warning-bg);
      color: var(--status-warning-text);
    }

    .sev-info {
      background: #eff6ff;
      color: var(--brand-blue);
    }

    .finding-loc {
      font-family: var(--font-mono);
      color: var(--muted);
      cursor: pointer;
      text-decoration: underline dotted;
    }

    .finding-reason {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--heading);
      margin-bottom: 0.35rem;
    }

    .finding-excerpt {
      background: #f8fafc;
      border: 1px solid #f1f5f9;
      border-radius: 6px;
      padding: 0.45rem 0.6rem;
      font-family: var(--font-mono);
      font-size: 0.8rem;
      color: #0f172a;
      white-space: pre-wrap;
      word-break: break-all;
      position: relative;
    }

    .finding-context {
      font-size: 0.75rem;
      color: var(--muted);
      margin-top: 0.4rem;
      font-style: italic;
    }

    /* Modal / Popover */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.4);
      backdrop-filter: blur(4px);
      z-index: 110;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    .modal-backdrop.open {
      display: flex;
    }

    .modal-card {
      background: #ffffff;
      border-radius: var(--radius);
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
      border: 1px solid var(--card-border);
      width: 100%;
      max-width: 580px;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .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-size: 1.1rem;
      color: var(--heading);
    }

    .modal-body {
      padding: 1.25rem;
      overflow-y: auto;
      font-size: 0.88rem;
      color: var(--body);
    }

    .modal-footer {
      padding: 0.85rem 1.25rem;
      border-top: 1px solid var(--card-border);
      display: flex;
      justify-content: flex-end;
      gap: 0.5rem;
      background: #f8fafc;
    }

    /* Progress bar */
    .worker-progress {
      height: 4px;
      width: 100%;
      background: #e2e8f0;
      position: absolute;
      top: 0;
      left: 0;
      overflow: hidden;
      display: none;
    }

    .worker-progress-bar {
      height: 100%;
      width: 0%;
      background: var(--brand-gradient);
      transition: width 0.1s ease;
    }

    /* Bottom sticky bar for mobile */
    .mobile-actions-bar {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      border-top: 1px solid var(--card-border);
      padding: 0.6rem 1rem;
      z-index: 50;
      box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
    }

    /* SEO Section */
    .seo-section {
      max-width: 900px;
      margin: 3rem auto 2rem;
      padding: 0 1.5rem;
    }

    .seo-section h2 {
      font-family: var(--font-heading);
      color: var(--heading);
      font-size: 1.5rem;
      margin: 2rem 0 0.85rem;
      letter-spacing: -0.02em;
    }

    .seo-section h3 {
      font-family: var(--font-heading);
      color: var(--heading);
      font-size: 1.15rem;
      margin: 1.25rem 0 0.5rem;
    }

    .seo-section p {
      margin-bottom: 1rem;
      line-height: 1.7;
    }

    .seo-section ol, .seo-section ul {
      margin: 0 0 1.25rem 1.4rem;
      line-height: 1.7;
    }

    .seo-section li {
      margin-bottom: 0.35rem;
    }

    .code-comparison {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
      margin: 1.25rem 0;
    }

    .code-box {
      background: #0f172a;
      color: #e2e8f0;
      padding: 1rem;
      border-radius: 8px;
      font-family: var(--font-mono);
      font-size: 0.8rem;
      overflow-x: auto;
    }

    .code-box-title {
      color: #94a3b8;
      font-size: 0.75rem;
      text-transform: uppercase;
      font-weight: 700;
      margin-bottom: 0.5rem;
      letter-spacing: 0.05em;
    }

    /* FAQ Accordions */
    details.faq-item {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: 10px;
      margin-bottom: 0.65rem;
      overflow: hidden;
      transition: all 0.2s ease;
    }

    details.faq-item summary {
      padding: 0.85rem 1.15rem;
      font-weight: 600;
      color: var(--heading);
      cursor: pointer;
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      user-select: none;
    }

    details.faq-item summary::-webkit-details-marker {
      display: none;
    }

    details.faq-item summary::after {
      content: "+";
      font-size: 1.25rem;
      font-weight: 400;
      color: var(--muted);
      transition: transform 0.2s ease;
    }

    details[open].faq-item summary::after {
      content: "−";
    }

    .faq-answer {
      padding: 0.2rem 1.15rem 1rem;
      color: var(--body);
      line-height: 1.6;
      font-size: 0.92rem;
    }

    /* Footer */
    .site-footer {
      border-top: 1px solid var(--card-border);
      background: rgba(255, 255, 255, 0.7);
      backdrop-filter: blur(8px);
      padding: 2.5rem 1.5rem;
      margin-top: 4rem;
    }

    .footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    .footer-links-row {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem 2rem;
      font-size: 0.9rem;
    }

    .footer-links-row a {
      color: var(--muted);
      text-decoration: none;
    }

    .footer-links-row a:hover {
      color: var(--brand-blue);
    }

    /* Live Toast / Announcer */
    .toast-pill {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: #0f172a;
      color: #ffffff;
      padding: 0.6rem 1.1rem;
      border-radius: 9999px;
      font-size: 0.85rem;
      font-weight: 500;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      z-index: 120;
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      pointer-events: none;
    }

    .toast-pill.show {
      opacity: 1;
      transform: translateY(0);
    }

    /* Responsive Queries */
    @media (max-width: 900px) {
      .workspace-container {
        height: auto;
        min-height: unset;
      }
      .workspace-split {
        flex-direction: column;
        height: auto;
        gap: 1rem;
      }
      .pane-left, .pane-right {
        width: 100% !important;
        min-height: 55vh;
        height: auto;
      }
      .pane-resizer {
        display: none;
      }
      .mobile-actions-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
      }
      .mobile-actions-bar .btn {
        flex: 1;
        justify-content: center;
      }
      .code-comparison {
        grid-template-columns: 1fr;
      }
      body {
        padding-bottom: 64px;
      }
    }

    @media (max-width: 700px) {
      .header-nav {
        display: none;
      }
      .menu-toggle {
        display: block;
      }
      .header-nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid var(--card-border);
        padding: 1.25rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
      }
    }

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


/* Ambient Viewport Floating Mesh Blobs */
.blob-bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  transition: all 0.5s ease;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0) 70%);
  top: -100px;
  left: -100px;
  animation: blob-float-1 25s infinite alternate ease-in-out;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(14, 165, 233, 0) 70%);
  bottom: -150px;
  right: -150px;
  animation: blob-float-2 28s infinite alternate ease-in-out;
}

.blob-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, rgba(244, 63, 94, 0) 70%);
  top: 40%;
  right: 15%;
  animation: blob-float-3 22s infinite alternate ease-in-out;
}

.blob-4 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(20, 184, 166, 0) 70%);
  bottom: 10%;
  left: 20%;
  animation: blob-float-4 30s infinite alternate ease-in-out;
}

@keyframes blob-float-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, 80px) scale(1.1); }
  100% { transform: translate(50px, 150px) scale(0.95); }
}

@keyframes blob-float-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, -90px) scale(1.08); }
  100% { transform: translate(-140px, -40px) scale(0.92); }
}

@keyframes blob-float-3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, 110px) scale(1.15); }
  100% { transform: translate(-120px, -60px) scale(0.9); }
}

@keyframes blob-float-4 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(90px, -120px) scale(1.05); }
  100% { transform: translate(140px, 60px) scale(0.95); }
}

