:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --blue: #0b1f3a;
  --blue-2: #123a68;
  --green: #16a34a;
  --green-dark: #12813d;
  --white: #ffffff;
  --shadow: 0 18px 55px rgba(15, 23, 42, .09);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226,232,240,.8);
}
.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: white;
}
.nav-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-weight: 600; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: white; box-shadow: 0 12px 26px rgba(22, 163, 74, .22); }
.btn-primary:hover { background: var(--green-dark); }
.btn-dark { background: var(--blue); color: white; }
.btn-ghost { background: #eef2f7; color: var(--ink); }
.btn-outline { border: 1px solid var(--line); background: white; color: var(--ink); }
.hero {
  padding: 82px 0 42px;
  background:
    radial-gradient(circle at top left, rgba(22,163,74,.12), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 82%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 44px;
  align-items: center;
}
.eyebrow { color: var(--green); font-weight: 900; text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 14px; letter-spacing: 0; }
h1 { font-size: clamp(2.25rem, 5vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
p { margin: 0 0 16px; color: var(--muted); }
.hero p { font-size: 1.16rem; max-width: 620px; }
.search-box {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.search-box input, .field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  font: inherit;
  background: white;
}
.search-box input { border: 0; padding: 0 12px; min-height: 46px; }
.hero-preview {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.doc-paper {
  min-height: 420px;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #edf2f7;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.02);
}
.doc-lines span {
  display: block;
  height: 10px;
  margin: 13px 0;
  border-radius: 999px;
  background: #e2e8f0;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  font-weight: 800;
  font-size: .9rem;
}
.section { padding: 70px 0; }
.section-soft { background: var(--soft); }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 28px rgba(15,23,42,.04);
}
.template-card { display: flex; flex-direction: column; min-height: 220px; }
.template-card h3 { font-size: 1.08rem; }
.template-card .meta { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.template-card .actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price { font-weight: 900; color: var(--green); }
.category-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.category-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: white;
  font-weight: 800;
}
.steps { counter-reset: step; }
.step { position: relative; padding-left: 54px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 20px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 28px; }
.stat strong { display: block; font-size: 2rem; color: var(--blue); }
.page-head { padding: 52px 0 24px; background: linear-gradient(180deg, #f8fbff, #fff); }
.breadcrumbs { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.document-layout { display: grid; grid-template-columns: 430px 1fr; gap: 24px; align-items: start; }
.form-panel, .preview-panel { position: sticky; top: 88px; }
.form-progress { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.form-progress span { display: block; height: 100%; width: 16%; background: var(--green); transition: width .2s ease; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; }
.field small { color: var(--muted); }
.preview-document {
  white-space: pre-wrap;
  min-height: 520px;
  padding: 34px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.legal-note { padding: 12px; border-radius: var(--radius); background: #fff7ed; color: #9a3412; font-size: .9rem; }
.sticky-mobile-cta { display: none; }
.auth-wrap { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 50px 16px; background: var(--soft); }
.auth-card { width: min(440px, 100%); }
.flash { padding: 12px 14px; border-radius: var(--radius); margin: 16px 0; font-weight: 800; }
.flash.success { background: #ecfdf5; color: #166534; }
.flash.error { background: #fef2f2; color: #991b1b; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; font-size: .85rem; text-transform: uppercase; color: var(--muted); }
.footer { padding: 44px 0; background: var(--blue); color: white; }
.footer p, .footer a { color: #cbd5e1; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero { padding-top: 54px; }
  .hero-grid, .document-layout, .grid-3, .grid-4, .stats { grid-template-columns: 1fr; }
  .search-box { flex-direction: column; }
  .form-panel, .preview-panel { position: static; }
  .section { padding: 46px 0; }
  .sticky-mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 10px 16px;
    background: rgba(255,255,255,.94);
    border-top: 1px solid var(--line);
  }
  .sticky-mobile-cta .btn { width: 100%; }
  body.has-sticky { padding-bottom: 74px; }
}
