/* ==========================================================================
   Zinq — landing page styles
   Light, clean, no framework. Organised as: tokens → base → layout →
   components → sections → editor demo → utilities → responsive.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --c-bg: #ffffff;
  --c-bg-soft: #f7f8fa;
  --c-bg-tint: #f3f6fb;
  --c-surface: #ffffff;
  --c-border: #e5e8ee;
  --c-border-strong: #d4d9e2;

  --c-text: #0f172a;
  --c-text-2: #475569;
  --c-text-3: #8a94a6;

  --c-accent: #2563eb;
  --c-accent-600: #1d4ed8;
  --c-accent-50: #eff4ff;
  --c-accent-100: #dbe6fe;
  --c-success: #16a34a;
  --c-danger: #dc2626;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px -4px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .04);
  --shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, .18), 0 12px 24px -12px rgba(15, 23, 42, .10);

  --container: 1120px;
  --container-wide: 1240px;
  --header-h: 64px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
code {
  font-family: var(--font-mono);
  font-size: .88em;
  padding: .1em .35em;
  border-radius: 4px;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--c-accent-100); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 760px; }

.section { padding: 112px 0; }
.section--tint { background: var(--c-bg-tint); }

.section__head {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}
.section__head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 750; }
.section__lead { margin-top: 16px; font-size: 1.1rem; color: var(--c-text-2); }

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s var(--ease), box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn--sm { height: 36px; padding: 0 14px; font-size: .875rem; border-radius: 8px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 1rem; }

.btn--primary { background: var(--c-accent); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .3), inset 0 1px 0 rgba(255,255,255,.15); }
.btn--primary:hover { background: var(--c-accent-600); }

.btn--ghost { background: var(--c-surface); border-color: var(--c-border); color: var(--c-text); }
.btn--ghost:hover { border-color: var(--c-border-strong); background: var(--c-bg-soft); }

.btn--light { background: #fff; color: var(--c-accent-600); }
.btn--light:hover { background: var(--c-accent-50); }
.btn--outline-light { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* ---------- Pills & tags ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  font-size: .85rem;
  font-weight: 500;
  color: var(--c-text-2);
  box-shadow: var(--shadow-sm);
}
.pill__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .18);
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--c-accent-50);
  color: var(--c-accent-600);
}
.tag--muted { background: var(--c-bg-soft); color: var(--c-text-3); border: 1px solid var(--c-border); }

.text-accent { color: var(--c-accent); }

/* ---------- Header ---------- */
.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--c-text);
  color: #fff;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--c-border); }

.site-header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--c-accent); }
.brand__mark { width: 30px; height: 30px; }
.brand__name { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; color: var(--c-text); }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  font-size: .925rem;
  font-weight: 500;
  color: var(--c-text-2);
  transition: color .15s;
}
.site-nav a:hover { color: var(--c-text); }

.site-header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-text);
  transition: transform .2s var(--ease), top .2s var(--ease);
}
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 22px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 18px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 18px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 0%, var(--c-accent-50) 0%, rgba(239, 244, 255, 0) 100%),
    var(--c-bg);
}
.hero::before {
  /* subtle dot grid — a nod to printer dots */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(15, 23, 42, .08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 55% at 50% 20%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 55% at 50% 20%, #000 0%, transparent 100%);
  pointer-events: none;
}

.hero__intro { position: relative; text-align: center; max-width: 1040px; }
.hero__title {
  margin-top: 24px;
  font-size: clamp(2.3rem, 5.2vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.lead {
  max-width: 640px;
  margin: 24px auto 0;
  font-size: 1.15rem;
  color: var(--c-text-2);
}
.hero__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  margin-bottom: 28px;
  font-size: .9rem;
  color: var(--c-text-3);
}
.hero__hint svg { animation: bob 2s var(--ease) infinite; }

@keyframes bob { 50% { transform: translateY(3px); } }

/* ---------- Compatible strip ---------- */
.strip { border-block: 1px solid var(--c-border); background: var(--c-bg-soft); }
.strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding-block: 22px;
}
.strip__label { font-size: .85rem; color: var(--c-text-3); }
.strip__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0; padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .95rem;
  color: var(--c-text-2);
}

/* ---------- Compare ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare > * { min-width: 0; } /* let the code snippet scroll instead of widening the page */
.compare__card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.compare__card header { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.compare__card h3 { font-size: 1.35rem; font-weight: 700; }
.compare__card--new { border-color: var(--c-accent-100); box-shadow: var(--shadow); }

.compare__snippet {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--c-text);
}
.compare__snippet mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 2px; }
.c-ctrl { color: var(--c-text-3); }
.c-comment { color: var(--c-text-3); font-style: italic; }

.compare__visual {
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--c-accent-50);
  background-image: radial-gradient(rgba(37, 99, 235, .14) 1px, transparent 1px);
  background-size: 12px 12px;
}
.mini-label {
  position: relative;
  width: 220px; height: 110px;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}
.mini-label > span { position: absolute; display: block; border-radius: 2px; }
.mini-label__field--a { left: 14px; top: 14px; width: 110px; height: 12px; background: var(--c-text); }
.mini-label__field--b { left: 14px; top: 34px; width: 70px; height: 8px; background: var(--c-text-3); }
.mini-label__barcode {
  left: 14px; bottom: 14px;
  width: 140px; height: 40px;
  background: repeating-linear-gradient(90deg, var(--c-text) 0 2px, transparent 2px 4px, var(--c-text) 4px 7px, transparent 7px 9px, var(--c-text) 9px 10px, transparent 10px 13px);
  outline: 1.5px dashed var(--c-accent);
  outline-offset: 3px;
  animation: nudge 3.2s var(--ease) infinite;
}
.mini-label__cursor {
  left: 120px; bottom: 6px;
  width: 14px; height: 18px;
  background: none;
  animation: nudge 3.2s var(--ease) infinite;
}
.mini-label__cursor::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-text);
  clip-path: polygon(0 0, 0 100%, 30% 72%, 52% 100%, 66% 92%, 46% 66%, 85% 66%);
}
@keyframes nudge {
  0%, 15% { transform: translateX(0); }
  45%, 70% { transform: translateX(46px); }
  100% { transform: translateX(0); }
}

.cycle {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: c;
  display: grid;
  gap: 10px;
}
.cycle li {
  counter-increment: c;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--c-text-2);
}
.cycle li::before {
  content: counter(c);
  flex: none;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  color: var(--c-text-3);
}
.cycle--good li::before { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  padding: 28px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c-border-strong); }
.feature h3 { margin-top: 18px; font-size: 1.1rem; font-weight: 650; }
.feature p { margin-top: 8px; color: var(--c-text-2); font-size: .95rem; }
.feature__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--c-accent-50);
  color: var(--c-accent);
}
.feature__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0; padding: 0;
  list-style: none;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 24px; left: 16%; right: 16%;
  border-top: 2px dashed var(--c-border-strong);
}
.step { position: relative; text-align: center; padding: 0 12px; }
.step__num {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 2px solid var(--c-accent);
  color: var(--c-accent);
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 0 0 8px var(--c-bg);
}
.step h3 { margin-top: 20px; font-size: 1.25rem; font-weight: 700; }
.step p { margin-top: 10px; color: var(--c-text-2); }

/* ---------- Formats ---------- */
.formats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.format {
  padding: 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.format--active { border: 2px solid var(--c-accent); box-shadow: var(--shadow); }
.format__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.format h3 { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; }
.format p { margin-top: 14px; font-size: .9rem; color: var(--c-text-2); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  transition: border-color .15s, box-shadow .15s;
}
.faq details[open] { border-color: var(--c-border-strong); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-right: 2px solid var(--c-text-3);
  border-bottom: 2px solid var(--c-text-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p { padding: 0 22px 20px; color: var(--c-text-2); }

/* ---------- CTA ---------- */
.section--cta { padding-top: 0; }
.cta {
  position: relative;
  overflow: hidden;
  padding: 72px 32px;
  border-radius: var(--radius-xl);
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 800; }
.cta p { max-width: 520px; margin: 16px auto 0; color: rgba(255, 255, 255, .85); font-size: 1.1rem; }
.cta__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--c-border); padding: 32px 0; }
.site-footer__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 32px; }
.brand--footer .brand__mark { width: 24px; height: 24px; }
.brand--footer .brand__name { font-size: 1rem; }
.site-footer__note { font-size: .85rem; color: var(--c-text-3); }
.site-footer__note a { color: var(--c-text-2); font-weight: 500; text-decoration: underline; text-decoration-color: var(--c-border-strong); text-underline-offset: 3px; }
.site-footer__note a:hover { color: var(--c-accent); text-decoration-color: var(--c-accent); }
.site-footer__links { display: flex; gap: 24px; margin-left: auto; font-size: .9rem; color: var(--c-text-2); }
.site-footer__links a:hover { color: var(--c-text); }

/* ==========================================================================
   Interactive editor demo
   ========================================================================== */
.editor {
  position: relative;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}

.editor__titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg-soft);
}
.editor__dots { display: flex; gap: 6px; }
.editor__dots i { width: 11px; height: 11px; border-radius: 50%; background: #e2e5ea; }
.editor__dots i:nth-child(1) { background: #ff5f57; }
.editor__dots i:nth-child(2) { background: #febc2e; }
.editor__dots i:nth-child(3) { background: #28c840; }
.editor__title { flex: 1; text-align: center; font-size: .82rem; font-weight: 500; color: var(--c-text-2); }
.editor__badge {
  font-family: var(--font-mono);
  font-size: .72rem;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-2);
}

.editor__body {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 248px;
  grid-template-rows: auto 210px;
  grid-template-areas:
    "tools stage panel"
    "tools code  code";
}

/* Tool rail */
.editor__tools {
  grid-area: tools;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  border-right: 1px solid var(--c-border);
  background: var(--c-surface);
}
.tool {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--c-text-2);
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.tool:hover { background: var(--c-accent-50); color: var(--c-accent); }
.tool:active { border-color: var(--c-accent-100); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-sep { width: 24px; height: 1px; margin: 6px 0; background: var(--c-border); }

/* Stage */
.editor__stage {
  grid-area: stage;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 44px 40px 36px 52px;
  background-color: var(--c-bg-tint);
  background-image:
    linear-gradient(rgba(15, 23, 42, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .04) 1px, transparent 1px);
  background-size: 20px 20px;
  outline: none;
}
.editor__stage:focus-visible { box-shadow: inset 0 0 0 2px var(--c-accent); }

.ruler {
  position: absolute;
  background-color: var(--c-surface);
  color: var(--c-text-3);
  font-family: var(--font-mono);
  font-size: 9px;
}
.ruler--x {
  top: 0; left: 0; right: 0;
  height: 20px;
  border-bottom: 1px solid var(--c-border);
  background-image: repeating-linear-gradient(90deg, var(--c-border-strong) 0 1px, transparent 1px 10px);
  background-size: 100% 5px;
  background-repeat: repeat-x;
  background-position: 0 bottom;
}
.ruler--y {
  top: 20px; left: 0; bottom: 0;
  width: 20px;
  border-right: 1px solid var(--c-border);
  background-image: repeating-linear-gradient(180deg, var(--c-border-strong) 0 1px, transparent 1px 10px);
  background-size: 5px 100%;
  background-repeat: repeat-y;
  background-position: right 0;
}

.editor__paper {
  width: 100%;
  max-width: 640px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 10px 30px -10px rgba(15, 23, 42, .25);
}
.label { width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }

.label .el { cursor: move; }
.label .el-hit { fill: transparent; stroke: none; }
.label .el:hover .el-outline { stroke: var(--c-accent); stroke-opacity: .5; }
.label .el-outline { fill: none; stroke: transparent; stroke-width: 2; vector-effect: non-scaling-stroke; }
.label .el.is-selected .el-outline { stroke: var(--c-accent); stroke-opacity: 1; stroke-dasharray: 5 3; }
.label .handle { fill: #fff; stroke: var(--c-accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.label text { font-family: var(--font-sans); dominant-baseline: hanging; }
.label .guide { stroke: #ec4899; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; }

/* Properties panel */
.editor__panel {
  grid-area: panel;
  border-left: 1px solid var(--c-border);
  background: var(--c-surface);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.panel__head,
.code__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--c-border);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.panel__body { padding: 14px; display: grid; gap: 12px; align-content: start; }
.panel__empty { font-size: .85rem; color: var(--c-text-3); line-height: 1.5; }
.panel__type {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 600;
}
.panel__type code { font-size: .75rem; }
.panel__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > span { font-size: .72rem; font-weight: 500; color: var(--c-text-3); }
.field input,
.field select {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background: var(--c-bg-soft);
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--c-text);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--c-accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--c-accent-50);
}

/* Code */
.editor__code {
  grid-area: code;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-top: 1px solid var(--c-border);
  background: #fbfcfd;
}
.code__copy {
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background: var(--c-surface);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--c-text-2);
  cursor: pointer;
}
.code__copy:hover { border-color: var(--c-border-strong); color: var(--c-text); }
.code__copy.is-done { color: var(--c-success); border-color: currentColor; }

.code {
  flex: 1;
  margin: 0;
  padding: 10px 0;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.75;
  color: var(--c-text);
  counter-reset: ln;
}
.code .ln {
  display: block;
  padding: 0 16px 0 0;
  white-space: pre;
  counter-increment: ln;
  border-left: 2px solid transparent;
  transition: background-color .2s;
}
.code .ln::before {
  content: counter(ln);
  display: inline-block;
  width: 42px;
  padding-right: 14px;
  text-align: right;
  color: var(--c-text-3);
  opacity: .6;
}
.code .ln.is-active { background: var(--c-accent-50); border-left-color: var(--c-accent); }
.code .ln.is-flash { animation: flash .6s var(--ease); }
@keyframes flash { from { background: #fef3c7; } }
.code .t-ctrl { color: #94a3b8; }
.code .t-cmd { color: #7c3aed; font-weight: 600; }
.code .t-num { color: #0369a1; }
.code .t-str { color: #15803d; }
.code .t-cmt { color: #94a3b8; font-style: italic; }

/* Status bar */
.editor__status {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 30px;
  padding: 0 14px;
  border-top: 1px solid var(--c-border);
  background: var(--c-bg-soft);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--c-text-3);
}
.editor__status-mid { flex: 1; text-align: center; }
.snap { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: var(--font-sans); }
.snap input { accent-color: var(--c-accent); margin: 0; }

/* ==========================================================================
   Utilities & motion
   ========================================================================== */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .formats { grid-template-columns: repeat(2, 1fr); }
  .editor__body { grid-template-columns: 52px minmax(0, 1fr) 216px; }
}

@media (max-width: 860px) {
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--c-border); }
  .site-nav a:last-child { border-bottom: 0; }
  .nav-toggle { display: block; }
  .site-header__actions .btn--ghost { display: none; }

  .section { padding: 80px 0; }
  .compare { grid-template-columns: 1fr; }

  .steps { grid-template-columns: 1fr; gap: 40px; }
  .steps::before { display: none; }

  .editor__body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto 200px;
    grid-template-areas: "tools" "stage" "panel" "code";
  }
  .editor__tools { flex-direction: row; justify-content: center; border-right: 0; border-bottom: 1px solid var(--c-border); padding: 6px; }
  .tool-sep { width: 1px; height: 24px; margin: 0 6px; }
  .editor__stage { min-height: 0; padding: 32px 16px 24px 28px; }
  .editor__panel { border-left: 0; border-top: 1px solid var(--c-border); }
  .panel__grid { grid-template-columns: repeat(4, 1fr); }
  .editor__status-mid { display: none; }
  .editor__status { justify-content: space-between; }
}

@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .hero { padding: 56px 0 64px; }
  .features, .formats { grid-template-columns: 1fr; }
  .compare__card { padding: 24px; }
  .panel__grid { grid-template-columns: 1fr 1fr; }
  .site-header__actions .btn--primary { display: none; }
  .site-footer__inner { flex-direction: column; justify-content: center; gap: 14px; text-align: center; }
  .site-footer__links { margin-left: 0; justify-content: center; }
  .editor__badge { display: none; }
  .hero__hint { flex-direction: column-reverse; gap: 8px; text-align: center; text-wrap: balance; }
}
