@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;
  --card-radius: 14px;
  --card-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --focus-ring: 0 0 0 4px rgba(37, 99, 235, 0.15);
  --status-success: #16a34a;
  --status-success-bg: #f0fdf4;
  --status-warning: #b45309;
  --status-warning-bg: #fffbeb;
  --status-error: #dc2626;
  --status-error-bg: #fef2f2;
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
}

* { 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;
  position: relative;
  overflow-x: hidden;
}

/* Soft Mesh Glow Background */
.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle 650px at 5% 15%, rgba(169, 214, 245, 0.55), transparent 70%),
    radial-gradient(circle 700px at 95% 20%, rgba(227, 201, 243, 0.45), transparent 70%),
    linear-gradient(180deg, transparent 65%, #ffffff 100%);
  filter: blur(45px);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

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

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

.tests-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

/* Compact Hero Section (<140px tall) */
.hero-section {
  padding: 0.85rem 2rem 0.5rem;
  max-width: 1720px;
  margin: 0 auto;
}

.hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.65rem;
  border-radius: 9999px;
  background-color: 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;
}

.privacy-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--status-success);
  background: var(--status-success-bg);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.hero-h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

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

.hero-subline {
  font-size: 0.875rem;
  color: var(--body);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: none;
  min-height: 38px;
  user-select: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.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;
  color: var(--heading);
  border: 1px solid var(--card-border);
}

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

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  min-height: 32px;
  border-radius: 8px;
}

.btn-icon {
  padding: 0.35rem;
  min-width: 32px;
  min-height: 32px;
}

/* Workspace Wrapper */
.workspace-wrapper {
  max-width: 1720px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 1.5rem;
}

/* Toolbar & Platform Tabs */
.toolbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 0.5rem 0.85rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.target-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 2px 0;
}

.target-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.target-tab:hover {
  color: var(--heading);
  background: #f1f5f9;
}

.target-tab.active {
  background: #ffffff;
  color: var(--brand-blue);
  border-color: var(--badge-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Options Drawer (Collapsible) */
.options-drawer {
  display: none;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--card-shadow);
  gap: 1.25rem;
}

.options-drawer.open {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--heading);
  font-weight: 500;
}

.option-hint {
  font-size: 0.74rem;
  color: var(--muted);
  margin-left: 1.5rem;
}

/* Split Screen Panes Layout */
.split-container {
  display: flex;
  height: calc(100vh - 215px);
  min-height: 570px;
  position: relative;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.split-container.is-focus-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  padding: 1rem;
  background: #ffffff;
  border-radius: 0;
}

.pane {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.pane-left {
  width: 50%;
  min-width: 25%;
}

.pane-right {
  flex: 1;
  min-width: 25%;
}

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

.pane-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pane-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--heading);
}

.pane-stats {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 6px;
}

.pane-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pane-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Draggable Divider */
.split-divider {
  width: 10px;
  cursor: col-resize;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  user-select: none;
  margin: 0 -5px;
}

.split-divider-handle {
  width: 4px;
  height: 48px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s, height 0.2s;
}

.split-divider:hover .split-divider-handle,
.split-divider.is-dragging .split-divider-handle {
  background: var(--brand-blue);
  height: 72px;
}

/* Textareas & Editors */
.editor-textarea {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  padding: 1rem;
  resize: none;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  color: var(--heading);
  background: transparent;
}

.editor-textarea::placeholder {
  color: #94a3b8;
}

/* Right Pane Previews */
.preview-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.richtext-preview {
  font-family: var(--font-body);
  color: var(--heading);
  line-height: 1.65;
}

.richtext-preview h1, .richtext-preview h2, .richtext-preview h3, .richtext-preview h4 {
  font-family: var(--font-heading);
  color: #004ac6;
  margin: 1rem 0 0.5rem;
}

.richtext-preview p { margin-bottom: 0.75rem; }
.richtext-preview ul, .richtext-preview ol { margin: 0.5rem 0 0.75rem 1.5rem; }
.richtext-preview table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 0.88rem;
  border: 1px solid var(--card-border);
}
.richtext-preview th {
  background: #f1f5f9;
  border: 1px solid var(--card-border);
  padding: 8px 10px;
  font-weight: 700;
  text-align: left;
}
.richtext-preview td {
  border: 1px solid var(--card-border);
  padding: 6px 10px;
}
.richtext-preview code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.richtext-preview pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  overflow-x: auto;
  margin: 0.85rem 0;
}
.richtext-preview blockquote {
  border-left: 4px solid var(--brand-blue);
  padding: 4px 14px;
  margin: 0.85rem 0;
  background: #f8fafc;
  color: var(--muted);
  font-style: italic;
}

.monospace-preview {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--heading);
  user-select: text;
}

/* Modals & Dialogs */
dialog {
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: #ffffff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  max-width: 520px;
  width: 90%;
  padding: 0;
  margin: auto;
}
dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--card-border);
}
.dialog-body {
  padding: 1.25rem;
}
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.85rem;
}
.shortcut-row kbd {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--card-border);
}

/* SEO Article Section */
.seo-article-wrapper {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.seo-article-wrapper h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--heading);
  margin: 1.8rem 0 0.75rem;
}

.seo-article-wrapper h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  margin: 1.2rem 0 0.5rem;
}

.seo-article-wrapper p {
  margin-bottom: 1rem;
  color: var(--body);
  line-height: 1.7;
}

.seo-article-wrapper ol, .seo-article-wrapper ul {
  margin: 0.5rem 0 1.25rem 1.5rem;
  color: var(--body);
}

.seo-article-wrapper li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.code-box {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
  margin: 1rem 0;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.faq-accordion details {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.faq-accordion details[open] {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.faq-accordion summary {
  font-weight: 600;
  color: var(--heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-accordion summary::-webkit-details-marker { display: none; }
.faq-accordion summary::after {
  content: "›";
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}
.faq-accordion details[open] summary::after {
  transform: rotate(90deg);
}

.faq-accordion p {
  margin-top: 0.6rem;
  margin-bottom: 0;
  font-size: 0.88rem;
  color: var(--body);
}

/* Toast */
.toast-pill,
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-pill.show,
.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-pill .btn-toast-action,
.toast-notification .btn-toast-action {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.toast-pill .btn-toast-action:hover,
.toast-notification .btn-toast-action:hover {
  background: rgba(255, 255, 255, 0.35);
}

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

/* Mobile Responsiveness Under 900px */
.mobile-action-bar {
  display: none;
}

@media (max-width: 900px) {
  .split-container {
    flex-direction: column;
    height: auto;
  }
  .pane-left, .pane-right {
    width: 100% !important;
    min-height: 60dvh;
    margin-bottom: 1rem;
  }
  .split-divider {
    display: none;
  }
  .mobile-action-bar {
    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;
    display: flex;
    gap: 0.75rem;
    z-index: 50;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  }
  body {
    padding-bottom: 60px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !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); }
}

