:root {
  --brand: #16a34a;
  --brand-dark: #15803d;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --pro: #0f172a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Onest", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

h1, h2, h3, .brand-name { font-family: "Unbounded", "Onest", sans-serif; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px;
}
.brand-name { font-weight: 700; font-size: 19px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.badge {
  font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: #f1f5f9; color: var(--muted);
}
.badge[data-state="pro"] { background: var(--brand); color: #fff; }

/* Hero */
.hero { padding: 72px 0 40px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--brand-dark);
  background: #dcfce7; padding: 6px 12px; border-radius: 999px; margin: 0 0 20px;
}
.hero h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -0.02em; }
.lede { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 0 28px; }
.lede.center { margin-left: auto; margin-right: auto; text-align: center; }
.cta {
  display: inline-block; background: var(--brand); color: #fff; text-decoration: none;
  font-weight: 600; padding: 13px 26px; border-radius: 11px; transition: background 0.15s;
}
.cta:hover { background: var(--brand-dark); }

/* Tool */
.tool { padding: 30px 0 60px; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel-label, .panel-label-row { font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: 10px; display: block; }
.panel-label-row { display: flex; align-items: center; justify-content: space-between; }
textarea#input {
  width: 100%; min-height: 220px; resize: vertical;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
  border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: var(--ink);
  background: #fcfdfe;
}
textarea#input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.tool-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btn {
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  border-radius: 10px; padding: 11px 18px; border: 1px solid transparent; transition: all 0.15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-pro { background: var(--pro); color: #fff; }
.btn-pro:hover { background: #1e293b; }
.btn.full { width: 100%; }
.status { font-size: 13px; margin: 12px 0 0; min-height: 18px; }
.status.ok { color: var(--brand-dark); }
.status.err { color: #dc2626; }

.output {
  margin: 0; min-height: 220px; max-height: 360px; overflow: auto;
  background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 14px;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
  white-space: pre-wrap; word-break: break-word;
}
.output .muted { color: #64748b; }
.pill { font-size: 12px; font-weight: 600; background: #f1f5f9; color: var(--muted); padding: 3px 10px; border-radius: 999px; }

.pro-block { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.pro-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pro-title { font-weight: 600; font-size: 14px; }
.lock { font-size: 12px; font-weight: 600; color: var(--muted); }
.lock.unlocked { color: var(--brand-dark); }
.pro-hint { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.is-unlocked .btn-pro { box-shadow: 0 0 0 2px #dcfce7; }

/* Pricing */
.pricing { padding: 50px 0 70px; }
.pricing h2 { text-align: center; font-size: 32px; margin: 0 0 10px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 34px auto 0; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.plan-pro { background: var(--pro); color: #fff; border-color: var(--pro); }
.plan h3 { margin: 0 0 6px; font-size: 22px; }
.price { font-size: 28px; font-weight: 700; margin: 0 0 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; }
.plan li { padding: 7px 0 7px 26px; position: relative; font-size: 15px; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.plan-pro li::before { color: #4ade80; }
.plan-current { font-size: 14px; color: var(--muted); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; }
.site-footer p { color: var(--muted); font-size: 14px; margin: 0; text-align: center; }

/* Upgrade placeholder (собственная заглушка продукта) */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); padding: 28px; max-width: 380px; width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25); text-align: center;
}
.modal h3 { margin: 0 0 10px; font-size: 22px; }
.modal p { color: var(--muted); margin: 0 0 20px; }
.modal .btn { width: 100%; }
.modal-close { margin-top: 10px; background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; }

@media (max-width: 760px) {
  .tool-grid, .plans { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 30px; }
}
