:root {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --brand: #10b981;
  --brand-deep: #059669;
  --accent: #6366f1;
  --warn: #f59e0b;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.25);
  --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #f4f6fb;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(1100px, 92vw); margin: 0 auto; }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #cbd5e1; }
.btn-link { background: transparent; color: var(--accent); padding: 6px 4px; }
.btn-link:hover { text-decoration: underline; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(15, 23, 42, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; }
.brand-mark {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  background: var(--brand); color: #062b21; border-radius: 9px; font-weight: 800; font-size: 15px;
}
.brand-mark.small { width: 26px; height: 26px; font-size: 13px; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: #cbd5e1; text-decoration: none; font-size: 14px; font-weight: 500; }
.topnav a:hover { color: #fff; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 500px at 80% -10%, #1e293b, var(--bg)); color: #fff; padding: 70px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 14px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 46px); line-height: 1.18; margin: 0 0 18px; font-weight: 800; letter-spacing: -.01em; }
.lede { color: #cbd5e1; font-size: 17px; margin: 0 0 26px; max-width: 36em; }
.lede strong { color: #fff; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: #cbd5e1; font-size: 14.5px; }

.hero-card {
  background: #16233d;
  border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 18px; box-shadow: var(--shadow);
}
.hero-card-head { display: flex; align-items: center; gap: 7px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.hero-card-head .dot { width: 11px; height: 11px; border-radius: 50%; background: #475569; }
.hero-card-head .dot:nth-child(1) { background: #f87171; }
.hero-card-head .dot:nth-child(2) { background: #fbbf24; }
.hero-card-head .dot:nth-child(3) { background: #34d399; }
.hero-card-title { margin-left: auto; color: #94a3b8; font-size: 12.5px; }
.hero-card-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; color: #cbd5e1; font-size: 14px; }
.tag { display: inline-block; font-weight: 700; color: #fff; padding: 3px 9px; border-radius: 7px; font-size: 12.5px; margin-right: 8px; }
.tag-1 { background: #6366f1; } .tag-2 { background: #0ea5e9; } .tag-3 { background: #10b981; }
.tag-4 { background: #f59e0b; } .tag-5 { background: #ec4899; }

/* ---------- generic section ---------- */
section.builder, section.output, section.how, section.modules { padding: 56px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
section h2 { font-size: clamp(22px, 3vw, 30px); margin: 0; font-weight: 800; }

/* ---------- form ---------- */
.builder { background: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.span-2 { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 14.5px; }
.req { color: #ef4444; }
.hint { color: var(--ink-soft); font-weight: 400; font-size: 12.5px; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 15px; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }

/* ---------- output ---------- */
.output { background: #f4f6fb; }
.output-actions { display: flex; gap: 10px; }
.blueprint { display: grid; gap: 22px; }
.bp-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.bp-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); background: #fbfcfe; }
.bp-step { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 8px; background: var(--bg); color: #fff; font-weight: 700; font-size: 14px; padding: 0 8px; }
.bp-head h3 { margin: 0; font-size: 17px; }
.bp-modtype { margin-left: auto; font-size: 12px; color: var(--ink-soft); background: #eef2f7; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.bp-body { padding: 18px 20px; display: grid; gap: 14px; }
.bp-row { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start; }
.bp-row .k { color: var(--ink-soft); font-size: 13px; font-weight: 600; padding-top: 2px; }
.bp-row .v { font-size: 15px; }
.bp-row .v ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.bp-headline { font-size: 18px; font-weight: 700; color: var(--ink); }
.bp-shot { color: var(--ink-soft); font-style: italic; }
.muted { color: var(--ink-soft); }

.summary-card { background: linear-gradient(180deg, #ecfdf5, #fff); border: 1px solid #a7f3d0; }
.summary-card .bp-head { background: transparent; border-color: #d1fae5; }
.summary-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; }
.chip strong { color: var(--brand-deep); }

table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cmp th, table.cmp td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; }
table.cmp thead th { background: #f1f5f9; font-weight: 700; }
table.cmp td.you { background: #ecfdf5; font-weight: 600; }
table.cmp th.you { background: var(--brand); color: #fff; }
.cmp-wrap { overflow-x: auto; }

.faq-item { border-bottom: 1px solid var(--line-soft); padding: 10px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 700; }
.faq-a { color: var(--ink-soft); margin-top: 3px; }

.title-pick { background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.title-pick .lbl { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.title-pick .txt { font-size: 15.5px; margin-top: 3px; }

/* ---------- how ---------- */
.how { background: #fff; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how-step { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fbfcfe; }
.how-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 12px; }
.how-step h3 { margin: 0 0 6px; font-size: 17px; }
.how-step p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ---------- modules ---------- */
.modules { background: #f4f6fb; }
.modules-lede { color: var(--ink-soft); margin: -8px 0 24px; }
.modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mod-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.mod-card h4 { margin: 0 0 4px; font-size: 15.5px; }
.mod-card .mod-en { color: var(--ink-soft); font-size: 12.5px; margin: 0 0 8px; }
.mod-card p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

/* ---------- footer ---------- */
.footer { background: var(--bg); color: #cbd5e1; padding: 32px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-inner > div { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 600; }
.footer-note { margin: 0; font-size: 13.5px; max-width: 50em; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14.5px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 48px 0 56px; }
  .form-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .bp-row { grid-template-columns: 1fr; gap: 4px; }
  .bp-row .k { padding-top: 0; }
}
