/* ===========================================================
   FastCompiler — design tokens
   =========================================================== */
:root {
  --bg: #f6f7f9;              /* page backdrop */
  --bg-accent: #eef1fb;        /* soft tinted edge for backdrop wash */
  --surface: #ffffff;          /* panels */
  --surface-2: #fafbfc;        /* nested surfaces / toolbar */
  --border: #e6e8ee;           /* hairline borders */
  --border-strong: #d7dae2;
  --text: #1b2230;             /* primary text */
  --text-2: #5b6472;           /* secondary text */
  --text-3: #939ba7;           /* muted text */
  --accent: #4f46e5;           /* calm indigo */
  --accent-strong: #4338ca;
  --accent-soft: #eef0ff;
  --green: #16a34a;
  --red: #dc2626;

  /* file-type badge colors */
  --badge-orange: #f59e0b;
  --badge-blue: #3b82f6;
  --badge-yellow: #eab308;

  /* premium graduated brand gradient + soft sheen */
  --grad-brand: linear-gradient(135deg, #8b7cff 0%, #5b53f0 38%, #4f46e5 62%, #3f35db 88%, #332e9e 100%);
  --grad-brand-glare: linear-gradient(165deg, rgba(255,255,255,0.42) 0%, rgba(255,255,255,0.08) 38%, rgba(255,255,255,0) 52%);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-sm: 0 2px 6px -2px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 14px 34px -16px rgba(16, 24, 40, 0.22), 0 4px 10px -6px rgba(16, 24, 40, 0.10);
  --shadow-primary: 0 10px 22px -8px rgba(79, 70, 229, 0.55), 0 4px 10px -6px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255,255,255,0.28);
  --shadow-primary-hover: 0 16px 34px -10px rgba(79, 70, 229, 0.7), 0 6px 14px -8px rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255,255,255,0.32);

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: Georgia, "Times New Roman", "Charter", "Bitstream Charter", serif;

  --toolbar-h: 66px;
  --status-h: 32px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===========================================================
   Reset / base
   =========================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { min-height: 100%; overflow-x: hidden; }
body { max-width: 100vw; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 18% -6%, var(--bg-accent) 0%, rgba(239, 242, 255, 0) 60%),
    radial-gradient(1000px 480px at 95% -10%, rgba(224, 231, 255, 0.9) 0%, rgba(239, 242, 255, 0) 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

/* ===========================================================
   App shell — fixed viewport IDE; page scrolls below for content
   =========================================================== */
.app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 2;
  background:
    radial-gradient(1200px 500px at 18% -6%, var(--bg-accent) 0%, rgba(239, 242, 255, 0) 60%),
    radial-gradient(1000px 480px at 95% -10%, rgba(224, 231, 255, 0.9) 0%, rgba(239, 242, 255, 0) 55%),
    var(--bg);
  background-attachment: fixed;
}

/* ===========================================================
   Toolbar
   =========================================================== */
.toolbar {
  height: var(--toolbar-h);
  flex: 0 0 var(--toolbar-h);
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 0 16px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  justify-content: flex-start;
}
.toolbar .brand { flex: 0 0 auto; }
.toolbar .toolbar-actions {
  margin-left: auto;
  flex: 0 0 auto;
}
.toolbar .nav-toggle {
  flex: 0 0 44px;
  margin-left: 8px;
}

/* Brand stays flush left and the actions stay flush right; the center nav
   is placed with auto margins so it sits exactly in the middle of the space
   between the two — regardless of the brand and button widths. */
.toolbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0 auto;
}

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

.toolbar-spacer-left,
.toolbar-spacer-right { display: none; }

/* ===========================================================
   Brand / custom logo
   =========================================================== */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  z-index: 1;
}
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: #fff;
  background: var(--grad-brand);
  overflow: hidden;
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, 0.7), inset 0 1px 0 rgba(255,255,255,0.35);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-brand-glare);
  pointer-events: none;
}
.brand-mark svg { position: relative; z-index: 1; width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(40, 28, 160, 0.5)); }
.brand-mark-ring {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.brand-meta { display: flex; flex-direction: column; line-height: 1.18; }
.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-name .accent { color: var(--accent); }
.brand-tag {
  font-size: 10px;
  font-style: italic;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: none;
}
@media (min-width: 720px) { .brand-tag { display: block; } }

/* ===========================================================
   Center navigation menus
   =========================================================== */
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(79, 70, 229, 0.06); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--accent); font-weight: 600; }
.nav-link.active::after { transform: scaleX(1); }

@media (max-width: 900px) {
  .toolbar-center { display: none; }
  .toolbar { padding-right: 0; gap: 8px; }
  .page-header { padding-right: 0; gap: 8px; }
  .toolbar .nav-toggle,
  .page-header .nav-toggle {
    border-left: none;
    border-top: none;
    border-bottom: none;
    border-radius: 0;
  }
}

/* ===========================================================
   Hamburger toggle (mobile nav) — hidden on desktop
   =========================================================== */
.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
  flex: 0 0 auto;
}
.nav-toggle:hover { color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.nav-toggle:active { transform: scale(0.96); }
.nav-toggle svg { width: 20px; height: 20px; }
.mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(78vw, 320px);
  max-width: 100vw;
  height: 100dvh;
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 32px rgba(16,24,40,0.18);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.28s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 8px;
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}
.mobile-nav a.active, .mobile-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16,24,40,0.38);
  backdrop-filter: blur(2px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}
.mobile-nav-backdrop.open { opacity: 1; pointer-events: auto; }
.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.mobile-nav-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
}

@media (min-width: 901px) {
  .page-header { position: relative; }
  .page-header .nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }
}
@media (max-width: 900px) {
  .page-header .nav { display: none !important; }
  .nav-toggle { display: grid !important; }
}

/* ===========================================================
   Buttons
   =========================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 0.14s var(--ease-spring), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-label svg { flex: 0 0 auto; }

.btn-text {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.btn-text.swap { animation: labelIn 0.26s var(--ease); }

.btn-primary {
  color: #fff;
  background: var(--grad-brand);
  background-size: 150% 150%;
  box-shadow: var(--shadow-primary);
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-brand-glare);
  pointer-events: none;
}
.btn-primary .btn-label, .btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover { background-position: 90% 90%; box-shadow: var(--shadow-primary-hover); }
.btn-primary:hover::after { opacity: 0.7; }

.btn-ghost {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { color: var(--text); background: #fff; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:active { box-shadow: var(--shadow-xs); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--text-3);
  background: transparent;
  transition: transform 0.14s var(--ease-spring), color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.icon-btn:hover { color: var(--text); background: #fff; border-color: var(--border); box-shadow: var(--shadow-xs); }
.icon-btn:active { transform: scale(0.9); }

/* ===========================================================
   Workspace layout
   =========================================================== */
.workspace {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  padding: 12px;
  gap: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  transition: flex-grow 0.28s var(--ease), flex-basis 0.28s var(--ease);
}
/* while dragging the splitter, no transition so the panels track 1:1 with the cursor */
.workspace.dragging .panel { transition: none; }

.panel-editor { flex: 1 1 55%; }
.panel-output { flex: 1 1 45%; }
.panel.collapsed { flex: 0 0 0 !important; box-shadow: none; border-color: transparent; }

/* ===========================================================
   Splitter — pure drag handle
   =========================================================== */
.splitter {
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  position: relative;
  z-index: 6;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}
.splitter-line {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.splitter:hover .splitter-line,
.splitter.dragging .splitter-line,
.splitter:focus-visible .splitter-line {
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.18), 0 0 10px rgba(79, 70, 229, 0.35);
}
.splitter-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 44px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  pointer-events: none;
}
.splitter-grip::before {
  content: "";
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--text-3);
  box-shadow: 0 4px 0 var(--text-3), 0 8px 0 var(--text-3);
}
.splitter:hover .splitter-grip,
.splitter.dragging .splitter-grip,
.splitter:focus-visible .splitter-grip {
  opacity: 1;
  box-shadow: var(--shadow-sm);
  border-color: var(--accent);
}

/* ===========================================================
   Editor tabs
   =========================================================== */
.editor-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 8px 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
}

.editor-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 2px solid transparent;
  letter-spacing: -0.01em;
  transition: color 0.14s var(--ease), background 0.14s var(--ease);
}
.editor-tab:hover { color: var(--text); background: rgba(16, 24, 40, 0.03); }
.editor-tab[aria-selected="true"] {
  color: var(--text);
  background: var(--surface);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.badge {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: 0 0 auto;
}
.badge-orange { background: var(--badge-orange); }
.badge-blue   { background: var(--badge-blue); }
.badge-yellow { background: var(--badge-yellow); }

/* CodeMirror holder */
.editor-holder {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.editor-holder .CodeMirror {
  height: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  background: var(--surface);
  color: var(--text);
  -webkit-overflow-scrolling: touch;
}
.editor-holder .CodeMirror-gutters {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
}
.editor-holder .CodeMirror-linenumber { color: var(--text-3); }
.editor-holder .CodeMirror-cursor { border-left: 2px solid var(--accent); }
.editor-holder .CodeMirror-selected { background: var(--accent-soft); }
.editor-holder .CodeMirror-activeline-background { background: rgba(79, 70, 229, 0.045); }
.editor-holder .CodeMirror-lines { padding: 12px 0; }
.editor-holder .CodeMirror pre.CodeMirror-line,
.editor-holder .CodeMirror pre.CodeMirror-line-like { padding: 0 14px; }

/* ===========================================================
   Output panel
   =========================================================== */
.output-header {
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.output-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.preview-frame {
  flex: 1 1 auto;
  width: 100%;
  border: none;
  background: #fff;
  min-height: 0;
}

/* ===========================================================
   Bottom action bar
   =========================================================== */
.actionbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ===========================================================
   Status bar
   =========================================================== */
.statusbar {
  height: var(--status-h);
  flex: 0 0 var(--status-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
  user-select: none;
}

.status-left, .status-right { display: flex; align-items: center; gap: 14px; }

.status-item { display: inline-flex; align-items: center; gap: 6px; }

.status-item.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  transition: background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.status-item.dot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14); }
.status-item.dot.err { background: var(--red); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14); }

::selection { background: var(--accent-soft); }

/* ===========================================================
   Animations + accessibility
   =========================================================== */
@keyframes labelIn {
  0%   { opacity: 0; transform: translateY(5px); filter: blur(2px); }
  60%  { opacity: 1; transform: translateY(-1px); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); }
}

.splitter:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* touch-friendly splitter on coarse pointers */
@media (pointer: coarse) {
  .splitter { flex-basis: 26px; width: 26px; min-width: 26px; }
  .splitter-grip { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn-text, .nav-link { transition-duration: 0.01ms !important; animation: none !important; }
  .btn:active { transform: none; }
  .toolbar { backdrop-filter: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===========================================================
   High-value content (below the fold) — SEO
   =========================================================== */
.content {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0;
}

.content-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 104px 40px 92px;
  text-align: center;
  background:
    radial-gradient(560px 220px at 50% 0%, rgba(239, 242, 255, 0.9) 0%, rgba(239, 242, 255, 0) 70%);
}
.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.16);
}
.content-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
}
.hero-sub {
  margin: 0 auto 28px;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-2);
}
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.content-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 88px 40px;
  border-top: 1px solid var(--border);
}
.content-section h2 {
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.content-section h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.section-lead {
  margin: 0 0 28px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.content-section p { line-height: 1.7; color: var(--text-2); margin: 0; }

/* eyebrow + section-lead must keep their margins/color inside content sections
   (the generic .content-section p rule above would otherwise zero them) */
.content-section .eyebrow { margin: 0 0 16px; color: var(--accent); }
.content-section .section-lead { margin: 0 0 28px; }

/* Steps — animated vertical stepper */
.steps {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.steps::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 44px;
  bottom: 44px;
  width: 2px;
  background: linear-gradient(var(--accent), rgba(79, 70, 229, 0.18));
}
.step {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease), border-color 0.24s var(--ease);
}
.step + .step { margin-top: 18px; }
.step:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.step-num {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 6px 14px -6px rgba(79, 70, 229, 0.6);
}
.step-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  color: var(--text-3);
  opacity: 0;
  transition: transform 0.26s var(--ease), opacity 0.26s var(--ease), color 0.26s var(--ease);
}
.step:hover .step-arrow { opacity: 1; transform: translateY(-50%) translateX(0); color: var(--accent); }
.step h3 { color: var(--text); }
.step p { margin-top: 6px !important; }

/* staggered reveal for steps */
.steps .step.reveal { transition-delay: calc(var(--i, 0) * 90ms); }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.feature {
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 11px;
  font-size: 18px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.feature h3 { color: var(--text); }
.feature p { font-size: 14px; }

/* Generic table wrapper for responsive tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.table-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.compare-table th, .compare-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); }
.compare-table th { background: var(--surface-2); }
@media (max-width: 560px) {
  .table-wrap table { min-width: 480px; }
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 0 4px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  position: relative;
  transition: color 0.15s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translateY(-50%) rotate(135deg);
  border-right: 2px solid var(--text-3);
  border-top: 2px solid var(--text-3);
  transition: transform 0.22s var(--ease), border-color 0.2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(225deg); }
.faq summary:hover { color: var(--accent); }
.faq details p {
  padding: 0 18px 18px;
  font-size: 14.5px;
  color: var(--text-2);
}

/* smooth FAQ open/close */
.faq details[open] summary { color: var(--accent); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(225deg); border-color: var(--accent); }
.faq details p {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .32s var(--ease), opacity .3s var(--ease), padding .3s var(--ease);
}
.faq details[open] p {
  max-height: 800px;
  opacity: 1;
  padding-bottom: 18px;
}
@media (prefers-reduced-motion: reduce) {
  .faq details p { max-height: none; opacity: 1; transition: none; }
}

/* Roadmap (upcoming) */
.roadmap {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.roadmap li {
  position: relative;
  padding-left: 22px;
  line-height: 1.7;
  color: var(--text-2);
}
.roadmap li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
.roadmap li strong { color: var(--text); }

/* Wide highlight band (FAQ) */
.content-wide {
  max-width: 1080px;
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(239, 242, 255, 0.9) 0%, rgba(239, 242, 255, 0) 70%);
}

/* ===========================================================
   Scroll reveal animation
   =========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===========================================================
   Site footer — multi-column rich
   =========================================================== */
.site-footer {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), #6ee7b7, var(--accent)) 1;
  background:
    radial-gradient(760px 260px at 50% 0%, rgba(239, 242, 255, 0.85) 0%, rgba(239, 242, 255, 0) 60%),
    var(--surface-2);
  overflow-x: hidden;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 76px 40px 56px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-legal { justify-content: center; text-align: center; }
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.footer-logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.16);
}
.footer-about { font-size: 13.5px; line-height: 1.7; color: var(--text-3); }
.footer-col h4 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s var(--ease), transform 0.15s var(--ease);
}
.footer-links a:hover { color: var(--accent); transform: translateX(3px); }
.status-line { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.status-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14); }
.socials { display: flex; gap: 10px; margin-top: 4px; }
.social-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-2);
  background: #fff;
  transition: transform 0.16s var(--ease-spring), color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.social-btn:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 16px -8px rgba(79, 70, 229, 0.6); }

/* newsletter */
.newsletter-text { font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.newsletter-form { display: flex; gap: 8px; width: 100%; max-width: 320px; }
.newsletter-form input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.footer-legal {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 40px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}
.footer-copy { font-size: 12.5px; color: var(--text-3); }
.footer-legal nav { display: flex; gap: 20px; }
.footer-legal a { font-size: 12.5px; color: var(--text-3); transition: color 0.15s var(--ease); }
.footer-legal a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 760px) {
  .content-hero { padding: 56px 20px 40px; }
  .content-section { padding: 48px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .actionbar { flex-wrap: wrap; gap: 8px; }
  .content-hero h1 { font-size: 26px; }
  .footer-legal { padding: 20px; }
  .table-wrap { margin: 0 -4px; }
}
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* Scroll-margin so anchored sections aren't hidden under the fixed shell */
.content-section, .content-hero { scroll-margin-top: 8px; }

/* ===========================================================
   Sub-pages: page shell + shared header for Tools/Docs/Blog
   =========================================================== */
.page-shell { display: flex; flex-direction: column; min-height: 100vh; }
.page-header {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  height: var(--toolbar-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 4px 0 16px;
}
.page-header .brand { flex: 0 0 auto; }
.page-header .nav {
  flex: 0 0 auto;
  margin: 0 auto;
}
.page-header .toolbar-actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-header .nav-toggle {
  flex: 0 0 44px;
  margin-left: 8px;
}
.page-main { flex: 1 1 auto; }

/* Sub-page hero */
.page-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 88px 40px 68px;
  text-align: center;
  background:
    radial-gradient(560px 220px at 50% 0%, rgba(239, 242, 255, 0.9) 0%, rgba(239, 242, 255, 0) 70%);
}
.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.page-hero .hero-sub { margin: 0 auto 0; max-width: 680px; }

/* Generic page section */
.page-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 40px 96px;
}

/* ---- Tools page ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.tool-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.tool-card .tool-icon { margin-bottom: 2px; }
.tool-card .tool-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.75);
}
.tool-icon svg { flex: 0 0 auto; }
.tool-card.soft .tool-icon { box-shadow: 0 8px 18px -8px rgba(79, 70, 229, 0.55); }
.icon-html  { background: linear-gradient(135deg, #ff8a5b, #f97316 55%, #ea580c) !important; box-shadow: 0 10px 20px -10px rgba(249, 115, 22, 0.7) !important; color: #fff !important; }
.icon-css   { background: linear-gradient(135deg, #60a5fa, #3b82f6 55%, #2563eb) !important; box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.7) !important; color: #fff !important; }
.icon-js    { background: linear-gradient(135deg, #fbbf24, #f59e0b 55%, #d97706) !important; box-shadow: 0 10px 20px -10px rgba(245, 158, 11, 0.7) !important; color: #fff !important; }
.icon-markdown { background: linear-gradient(135deg, #a78bfa, #8b5cf6 55%, #7c3aed) !important; box-shadow: 0 10px 20px -10px rgba(139, 92, 246, 0.7) !important; color: #fff !important; }
.icon-json  { background: linear-gradient(135deg, #34d399, #10b981 55%, #059669) !important; box-shadow: 0 10px 20px -10px rgba(16, 185, 129, 0.7) !important; color: #fff !important; }
.icon-csv   { background: linear-gradient(135deg, #f472b6, #ec4899 55%, #db2777) !important; box-shadow: 0 10px 20px -10px rgba(236, 72, 153, 0.7) !important; color: #fff !important; }
.icon-python { background: linear-gradient(135deg, #38bdf8, #2563eb 55%, #1e40af) !important; box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.7) !important; color: #fff !important; }
.icon-node  { background: linear-gradient(135deg, #4ade80, #22c55e 55%, #15803d) !important; box-shadow: 0 10px 20px -10px rgba(34, 197, 94, 0.7) !important; color: #fff !important; }
.icon-home  { background: linear-gradient(135deg, #a5b4fc, #6366f1 55%, #4f46e5) !important; box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.7) !important; color: #fff !important; }
.icon-pdf   { background: linear-gradient(135deg, #f87171, #ef4444 55%, #dc2626) !important; box-shadow: 0 10px 20px -10px rgba(239, 68, 68, 0.7) !important; color: #fff !important; }
.tool-card h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.tool-card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); flex: 1 1 auto; }
.tool-card .tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--text-3);
  background: #fff;
  border: 1px solid var(--border);
}

/* ---- Docs page (real documentation layout) ---- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.docs-nav-col {
  position: sticky;
  top: 78px;
  align-self: start;
}
.docs-nav-col h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.docs-category { margin: 0 0 26px; }
.docs-category ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.docs-category ul a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-left: 2px solid transparent;
  transition: color 0.16s var(--ease), background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.docs-category ul a:hover { color: var(--accent); background: var(--accent-soft); border-left-color: var(--accent); }
.docs-category ul a.active { color: var(--accent); font-weight: 600; background: var(--accent-soft); border-left-color: var(--accent); }

.docs-article {
  max-width: 720px;
  min-width: 0;
}
.docs-article h2 {
  margin: 44px 0 16px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  scroll-margin-top: 90px;
}
.docs-article h2[id] { scroll-margin-top: 90px; }
.docs-article h3 { margin: 38px 0 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.docs-article p { margin: 0 0 16px; font-size: 15px; line-height: 1.75; color: var(--text-2); }
.docs-article ul, .docs-article ol { margin: 0 0 22px; padding-left: 22px; }
.docs-article li { margin: 6px 0; line-height: 1.7; color: var(--text-2); }
.docs-article pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.docs-article code { font-family: var(--font-mono); font-size: 0.9em; }
.docs-article pre code { background: none; padding: 0; color: inherit; font-size: 13px; }
.docs-article p code, .docs-article li code {
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 2px 6px;
  border-radius: 5px;
}
.docs-callout {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.18);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  margin: 26px 0;
}
.docs-callout svg { flex: 0 0 auto; margin-top: 2px; color: var(--accent); }

/* ---- Contact page ---- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.contact-form {
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
@media (min-width: 768px) {
  .field input, .field textarea, .field select { font-size: 14px; }
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-info { display: grid; gap: 14px; }
.info-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.info-card .info-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, 0.6);
  flex: 0 0 auto;
}
.info-card h4 { margin: 0 0 3px; font-size: 15px; }
.info-card p { margin: 0; font-size: 14px; color: var(--text-2); }
.form-note { font-size: 12.5px; color: var(--text-3); }

@media (max-width: 720px) {
  .contact-wrap { grid-template-columns: 1fr; }
}

/* ---- Blog page (sidebar layout) ---- */
.blog-header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 76px 40px 28px;
}
.blog-header h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.blog-header-desc { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-2); max-width: 640px; }

/* Feed + sidebar two-column shell */
.blog-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 40px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 860px) {
  .blog-layout { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .blog-layout { padding: 24px 20px 56px; }
}

/* Feed cards */
.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.blog-post {
  padding: 30px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.blog-post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.blog-post .post-title {
  margin: 0 0 10px;
}
.blog-post .post-title a {
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.015em;
  transition: color 0.18s var(--ease);
}
.blog-post .post-title a:hover { color: var(--accent); }
.blog-post .post-excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}
.blog-post .post-meta { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Shared blog atoms */
.post-title {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--text);
  line-height: 1.28;
  letter-spacing: -0.015em;
}
.post-cat {
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 12px;
}
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-3);
}
.post-meta .post-author { color: var(--text); font-weight: 500; }
.dot-sep { color: var(--border-strong); }

/* Feed cards with thumbnail */
.blog-post { display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.post-thumb {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 8;
  margin: -30px -30px 0;
  border-radius: 0;
  border: none;
  border-top-left-radius: calc(var(--radius) - 1px);
  border-top-right-radius: calc(var(--radius) - 1px);
  overflow: hidden;
  background: var(--surface-1);
}
.post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}
.blog-post:hover .post-thumb img { transform: scale(1.05); }
.blog-post .post-body { flex: 1 1 auto; min-width: 0; }
@media (max-width: 560px) {
  .post-thumb { margin: -30px -30px 0; }
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 860px) {
  .blog-sidebar { position: static; }
}
.side-card {
  padding: 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.side-card h3 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.side-about p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.side-about {
  background:
    radial-gradient(300px 120px at 0% 0%, rgba(239, 242, 255, 0.9) 0%, rgba(239, 242, 255, 0) 70%),
    var(--surface-2);
}

/* Category tag cloud */
.side-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.side-tags .tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.side-tags .tag:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

/* Popular posts */
.side-posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.side-posts a {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 10px;
  align-items: baseline;
  text-decoration: none;
}
.side-num {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
}
.side-post-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  transition: color 0.15s var(--ease);
}
.side-posts a:hover .side-post-title { color: var(--accent); }
.side-post-meta {
  grid-column: 2;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

/* Sidebar CTA */
.side-cta {
  border: 1px solid rgba(79, 70, 229, 0.18);
  background:
    radial-gradient(340px 160px at 100% 0%, rgba(239, 242, 255, 0.95) 0%, rgba(239, 242, 255, 0) 70%),
    var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side-cta-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.7);
}
.side-cta h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
}
.side-cta p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.side-cta .btn { align-self: flex-start; }

/* ---- Responsive (mobile + tablet for the whole site) ---- */
@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-layout { grid-template-columns: 200px 1fr; }
}
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 12px; }
  .docs-nav-col { position: static; }
  .docs-nav-col { overflow-x: auto; display: flex; gap: 8px; }
  .docs-category { margin: 0; }
  .docs-category ul { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  /* single-column marketing grids */
  .tools-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 20px 40px; }
  .page-section { padding: 32px 20px 56px; }
  .content-hero { padding: 56px 20px 48px; }
  .content-hero h1 { font-size: 26px; }
  .content-section { padding: 48px 20px; }
}

/* ---- Compiler app responsiveness (index.html) ---- */
@media (max-width: 760px) {
  /* stack editor + preview vertically; tab switch on mobile */
  .app-shell { height: 100vh; height: 100dvh; }
  .workspace { flex-direction: column; padding: 8px; min-height: 0; }
  .panel-editor, .panel-output { flex: 1 1 auto !important; width: 100%; min-height: 0; }
  .workspace[data-mobile-view="editor"] .panel-output { display: none; }
  .workspace[data-mobile-view="preview"] .panel-editor { display: none; }
  .workspace[data-mobile-view="editor"] .panel-editor,
  .workspace[data-mobile-view="preview"] .panel-output { flex: 1 1 auto !important; }
  .panel.collapsed { flex: 0 0 0 !important; }
  /* collapse the splitter into a slim static divider between stacked panels */
  .splitter { display: none; }
  .actionbar { flex-wrap: wrap; gap: 6px; }
  .toolbar { padding: 0 10px; }
  /* mark the divider non-interactive */
  .workspace.dragging .panel { transition: none; }
  /* mobile tabs */
  .mobile-editor-tabs {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
  }
  .mobile-editor-tabs button {
    flex: 1 1 0;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
  }
  .mobile-editor-tabs button.active {
    color: #fff;
    background: var(--grad-brand);
    border-color: var(--accent);
    box-shadow: var(--shadow-xs);
  }
}
@media (min-width: 761px) {
  .mobile-editor-tabs { display: none !important; }
}
@media (max-width: 520px) {
  .actionbar .btn { padding: 0 10px; min-width: 44px; height: 44px; }
  .toolbar-actions .btn-text { display: inline-block; }
  .brand-meta .brand-name { font-size: 15px; }
  .status-right .status-item:first-child { display: none; } /* hide Ln/Col on tiny screens */
  .workspace { padding: 6px; }
}
@media (max-width: 380px) {
  .actionbar { gap: 4px; }
  .actionbar .btn { padding: 0 8px; min-width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .docs-layout, .tool-card, .post-row, .step { transition: none !important; }
}

/* ===========================================================
   Homepage platform sections (index.html) — additive
   =========================================================== */

/* Breadcrumb strip above the hero */
.content-breadcrumbs {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 40px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
}
.content-breadcrumbs a { color: var(--text-2); transition: color 0.15s var(--ease); }
.content-breadcrumbs a:hover { color: var(--accent); }
.content-breadcrumbs span[aria-current="page"] { color: var(--text); font-weight: 600; }
@media (max-width: 760px) { .content-breadcrumbs { padding: 18px 20px 0; } }

/* Home tool catalog — one even grid (live + coming soon) */
.tools-grid--home { margin-top: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1024px) { .tools-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tools-grid--home { grid-template-columns: 1fr; } }
.tools-cta { margin-top: 32px; text-align: center; }
.tools-cta .btn { width: auto; }

/* Use-case cards (popular use cases) */
.use-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.use-card {
  padding: 26px 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.use-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.use-card h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.use-card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.use-card .post-link { margin-top: auto; }
.post-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.16s var(--ease);
}
.post-link:hover { gap: 9px; }
@media (max-width: 900px) { .use-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .use-grid { grid-template-columns: 1fr; } }

/* ===========================================================
   Reference pages (docs references) — input + live output
   =========================================================== */
.ref-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
.ref-nav-col { position: sticky; top: 80px; }
.ref-nav-col .docs-category { margin-bottom: 26px; }
@media (max-width: 860px) {
  .ref-layout { grid-template-columns: 1fr; gap: 12px; }
  .ref-nav-col { position: static; overflow-x: auto; display: flex; gap: 8px; }
  .ref-nav-col .docs-category { margin: 0; flex: 0 0 auto; }
  .ref-nav-col ul { flex-direction: row; flex-wrap: nowrap; }
  .ref-nav-col ul a { white-space: nowrap; }
}

.ref-pane { max-width: 760px; min-width: 0; }
.ref-group { margin-bottom: 48px; }
.ref-group-head { margin-bottom: 20px; }
.ref-group-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  scroll-margin-top: 88px;
}
.ref-group-lead { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-2); }

/* a single documented tag / property: description + input + live output */
.ref-item {
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}
.ref-item-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 18px 14px;
}
.ref-item-head h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ref-item-badge {
  align-self: center;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.18);
}
.ref-item-desc {
  margin: -4px 18px 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
}
.ref-item-desc code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 1px 5px;
  border-radius: 4px;
}
.ref-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.ref-box-title {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.ref-split > .ref-input { border-right: 1px solid var(--border); }
.ref-input pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
}
.ref-input pre code { font-family: var(--font-mono); background: none; color: inherit; font-size: 13px; }
/* live output strip across the full item width */
.ref-output {
  padding: 18px;
  background: #fff;
  border-top: 1px solid var(--border);
}
.ref-output p { margin: 0; }
.ref-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 18px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.ref-item-foot-note { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 720px) {
  .ref-split { grid-template-columns: 1fr; }
  .ref-split > .ref-input { border-right: 0; border-bottom: 1px solid var(--border); }
}

/* ===========================================================
   Blog post pages (blog/*.html) � additive
   =========================================================== */
.post-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 40px 104px;
}
.post-wrap .docs-article { max-width: none; }
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: color 0.15s var(--ease);
}
.post-back:hover { color: var(--accent); }
.post-head h1 {
  margin: 18px 0 12px;
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.post-head .post-cat { margin-top: 24px; }
.post-head .hero-sub { margin: 0 0 10px; max-width: 640px; }
.post-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 40px 0 10px;
  padding: 20px 22px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(340px 160px at 100% 0%, rgba(239, 242, 255, 0.95) 0%, rgba(239, 242, 255, 0) 70%),
    var(--surface-2);
}
.post-cta p { margin: 0; flex: 1 1 auto; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.post-cta .btn { flex: 0 0 auto; }
@media (max-width: 720px) {
  .post-wrap { padding: 44px 20px 72px; }
}

/* ===========================================================
   Coming-soon pages (noindex) � additive
   =========================================================== */
.soon-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 36px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
}
.soon-card .tool-icon { margin: 0 auto 14px; }
.soon-card h2 { margin: 0 0 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.soon-card p { margin: 0 auto 18px; font-size: 14.5px; line-height: 1.7; color: var(--text-2); max-width: 460px; }
.soon-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; text-align: left; }
.soon-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.soon-list li svg { flex: 0 0 auto; margin-top: 3px; color: var(--accent); }
.soon-shell { height: auto; min-height: 100vh; overflow: visible; }
.soon-main { flex: 1 1 auto; display: grid; place-items: center; padding: 64px 20px 72px; }
.soon-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 6px;
  border-radius: 22px;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 16px 34px -14px rgba(79, 70, 229, 0.65);
}
.soon-card h1 {
  margin: 8px 0 14px;
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
}
.soon-card .eyebrow { margin-top: 4px; }
.soon-card .soon-sub { margin-bottom: 22px; }
.soon-card .hero-cta { justify-content: center; }
@media (max-width: 520px) {
  .soon-card { padding: 28px 20px; }
  .soon-main { padding: 40px 16px 56px; }
}
