:root {
  --accent: #0d9488;
  --accent-deep: #0f766e;
  --accent-soft: #ccfbf1;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --paper: #f8fafc;
  --paper-cool: #eef2f7;
  --card: #ffffff;
  --line: #e2e8f0;
  --editor-bg: #0b1220;
  --editor-line: #1e293b;
  --editor-text: #e2e8f0;
  --ok: #15803d;
  --err: #b91c1c;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 32px -12px rgba(15, 23, 42, 0.12);
  --shadow-pop: 0 2px 6px rgba(15, 23, 42, 0.06), 0 24px 56px -16px rgba(13, 148, 136, 0.25);
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; margin: 18px 0 18px; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.15; letter-spacing: -0.015em; font-weight: 700; margin: 6px 0 12px; }
h3 { margin: 0 0 8px; font-size: 1.05rem; }
.muted { color: var(--ink-500); font-size: 0.9em; }
.eyebrow {
  display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-deep);
}
.section-sub { color: var(--ink-700); max-width: 46rem; margin: 0 0 8px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 250, 252, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; padding: 14px 24px; }
.wordmark { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink-900); text-decoration: none; }
.wordmark span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink-700); text-decoration: none; font-size: 0.94rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink-900); }
.btn-nav { padding: 9px 16px; font-size: 0.9rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 12px 22px; font-size: 1rem; font-weight: 600; cursor: pointer;
  text-decoration: none; color: var(--ink-900); background: var(--card);
  font-family: var(--font-body);
  transition: transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.3), 0 8px 22px -8px rgba(13, 148, 136, 0.5);
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { border-color: var(--ink-300); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-700); }
.btn-invert { background: #fff; color: var(--accent-deep); }
.btn-invert:hover { background: var(--accent-soft); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-small { padding: 8px 14px; font-size: 0.88rem; border-color: var(--line); }
.btn-big { display: block; text-align: center; font-size: 1.08rem; padding: 15px 22px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- hero (compact — demo sits above the fold) ---------- */
.hero { padding: 52px 0 36px; background:
  radial-gradient(1000px 420px at 75% -15%, var(--accent-soft), transparent 60%), var(--paper); }
.badge {
  display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--accent-deep);
  background: var(--accent-soft); border: 1px solid #99e6dd;
  padding: 5px 12px; border-radius: 999px;
}
.lead { font-size: 1.08rem; color: var(--ink-700); max-width: 47rem; margin: 0 0 22px; }
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.honesty {
  font-size: 0.92rem; color: var(--ink-500);
  border-left: 3px solid var(--accent); padding-left: 12px; max-width: 46rem; margin: 0;
}

/* ---------- demo band ---------- */
.demo-band { padding: 44px 0 64px; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; margin-top: 22px; }

.editor-pane { min-width: 0; }
.editor-toolbar { display: flex; align-items: center; gap: 12px; }
.demo-label { font-weight: 600; font-size: 0.92rem; }
#tpl-select {
  flex: 1; font: inherit; font-size: 0.92rem; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink-900);
}
#tpl-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tpl-note { margin: 8px 0 10px; color: var(--ink-500); font-size: 0.82rem; }

.editor-shell {
  background: var(--editor-bg); border: 1px solid var(--editor-line);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-soft);
}
.editor-chrome {
  display: flex; align-items: center; gap: 6px;
  background: #0f172a; border-bottom: 1px solid var(--editor-line); padding: 9px 13px;
}
.editor-chrome span { width: 9px; height: 9px; border-radius: 50%; background: #334155; }
.editor-chrome em { font-style: normal; font-family: var(--font-mono); font-size: 0.72rem; color: #7d8aa3; margin-left: 8px; }

.editor-body { position: relative; }
#hl-layer, #json-input {
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.55;
  padding: 12px 14px; margin: 0; border: 0;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;
  width: 100%; height: 430px; overflow: auto; tab-size: 2;
}
#hl-layer {
  position: absolute; inset: 0; color: var(--editor-text); pointer-events: none;
  background: transparent;
}
#json-input {
  position: relative; display: block; background: transparent;
  color: transparent; caret-color: #f8fafc; resize: none; z-index: 1;
}
#json-input::selection { background: rgba(56, 189, 248, 0.28); }
#json-input:focus { outline: none; }
.editor-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25); }
.tok-key { color: #7dd3fc; }
.tok-str { color: #bef264; }
.tok-num { color: #fca5a5; }
.tok-kw { color: #f0abfc; }

.demo-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.render-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-500); }
.err { color: var(--err); font-size: 0.9rem; white-space: pre-wrap; }

.preview-pane { min-width: 0; }
.preview-shell {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; background: var(--paper-cool); box-shadow: var(--shadow-soft);
}
#pdf-frame { display: block; width: 100%; height: 496px; border: 0; }
.preview-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--ink-500); font-size: 0.95rem; pointer-events: none;
}
.preview-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.curl-block {
  margin-top: 12px; background: var(--editor-bg); color: var(--editor-text);
  border: 1px solid var(--editor-line); border-radius: var(--r-md);
  padding: 14px; font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.5;
  overflow-x: auto; white-space: pre;
}

/* ---------- features ---------- */
.features { padding: 56px 0 24px; background: var(--paper-cool); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0 56px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-soft);
}
.card p { margin: 0; color: var(--ink-700); font-size: 0.94rem; }
.disclaimer { display: block; margin-top: 10px; font-size: 0.84rem; color: var(--ink-900); font-style: italic; }
.card-glyph { width: 38px; height: 38px; border-radius: 10px; margin-bottom: 14px; position: relative; background: var(--accent-soft); }
.card-glyph::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  border: 2px solid var(--accent-deep); border-radius: 3px;
}
.glyph-eu::after { width: 16px; height: 16px; border-radius: 50%; border-style: dashed; }
.glyph-schema::after { width: 16px; height: 12px; }
.glyph-credits::after { width: 14px; height: 14px; transform: rotate(45deg); }

/* ---------- pricing ---------- */
.pricing-band { padding: 72px 0; }
.pricing-inner { display: flex; justify-content: center; }
.price-card {
  background: var(--card); border: 2px solid var(--accent); border-radius: var(--r-lg);
  padding: 32px; max-width: 480px; width: 100%; box-shadow: var(--shadow-pop);
}
.price-tag { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-deep); }
.price { font-size: 3.2rem; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 12px; }
.price-once { font-size: 1rem; font-weight: 600; color: var(--ink-500); }
.price-list { list-style: none; padding: 0; margin: 0 0 22px; }
.price-list li { padding: 7px 0 7px 28px; position: relative; font-size: 0.96rem; }
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent-soft); border: 1px solid #99e6dd;
}
.price-list li::after {
  content: ""; position: absolute; left: 5px; top: 17px; width: 8px; height: 4px;
  border-left: 2px solid var(--accent-deep); border-bottom: 2px solid var(--accent-deep);
  transform: rotate(-45deg);
}
.refund-note { font-size: 0.9rem; margin: 16px 0 0; text-align: center; line-height: 1.7; }

/* ---------- faq ---------- */
.faq { padding: 10px 0 64px; }
.faq-wrap { max-width: 760px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card);
  padding: 16px 20px; margin-bottom: 10px; box-shadow: var(--shadow-soft);
}
.faq summary {
  font-weight: 600; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-ind { position: relative; width: 18px; height: 18px; flex: none; }
.faq-ind::before, .faq-ind::after {
  content: ""; position: absolute; background: var(--accent-deep); border-radius: 2px;
  transition: transform 0.18s ease;
}
.faq-ind::before { left: 0; top: 8px; width: 18px; height: 2px; }
.faq-ind::after { left: 8px; top: 0; width: 2px; height: 18px; }
.faq details[open] .faq-ind::after { transform: scaleY(0); }
.faq p { color: var(--ink-700); margin: 12px 0 4px; }

/* ---------- closing band ---------- */
.closing-band { background: linear-gradient(120deg, #115e59, var(--accent)); color: #fff; padding: 56px 0; }
.closing-inner { text-align: center; max-width: 640px; }
.closing-band h2 { color: #fff; margin-bottom: 8px; }
.closing-band p { color: rgba(255, 255, 255, 0.88); margin: 0 0 22px; }

/* ---------- footer ---------- */
.footer { padding: 34px 0 42px; background: var(--paper); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.wordmark-footer { font-size: 1.1rem; }
.footer p { margin: 6px 0; font-size: 0.92rem; }
.footer a { color: var(--accent-deep); }
.footer-right { text-align: right; max-width: 60%; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .demo-grid, .feature-grid { grid-template-columns: 1fr; }
  #pdf-frame { height: 400px; }
  .footer-inner, .footer-right { text-align: left; max-width: 100%; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding-top: 40px; }
  #hl-layer, #json-input { height: 340px; }
}
