:root {
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --panel: #111c34;
  --panel-2: #16233f;
  --line: #243352;
  --text: #e6edf7;
  --muted: #9fb0c9;
  --faint: #6b7d99;
  --brand: #34d399;
  --brand-2: #38bdf8;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --shadow: 0 18px 48px -20px rgba(0, 0, 0, 0.65);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1100px 620px at 78% -8%, #14233f 0%, var(--bg) 56%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1120px, 92vw); margin: 0 auto; }
.hidden { display: none !important; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), #10b981); color: #05231a; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-link { background: transparent; color: var(--brand); padding: 6px 8px; }
.btn-link:hover { color: var(--brand-2); }
.btn-link.danger { color: var(--danger); }
.btn-lg { padding: 13px 26px; font-size: 15px; }

.pill {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--brand); color: #05231a;
  font-size: 11px; font-weight: 800;
}

/* ---- topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 17, 32, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #0f3d2e, #064e3b); color: var(--brand);
  font-weight: 800; font-size: 15px; border: 1px solid #1f6b4f;
}
.brand-mark.small { width: 26px; height: 26px; font-size: 12px; }
.brand-ver { color: var(--brand); font-size: 12px; margin-left: 5px; vertical-align: super; }
.topnav { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--muted); }
.topnav a:hover { color: var(--text); }

/* ---- hero ---- */
.hero { padding: 64px 0 36px; }
.hero-grid { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--brand); font-weight: 700; letter-spacing: .03em; font-size: 13px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.16; margin: 0 0 18px; letter-spacing: -.01em; }
.lede { color: var(--muted); font-size: 16px; margin: 0 0 24px; max-width: 38em; }
.lede strong { color: var(--text); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--muted); font-size: 14px; }

.hero-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
}
.hero-card-head { display: flex; align-items: center; gap: 7px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hero-card-head .dot { width: 10px; height: 10px; border-radius: 50%; background: #2b3a59; }
.hero-card-head .dot:nth-child(1) { background: #ef5f5f; }
.hero-card-head .dot:nth-child(2) { background: #f4bf4f; }
.hero-card-head .dot:nth-child(3) { background: #57c66a; }
.hero-card-title { margin-left: auto; font-size: 12px; color: var(--faint); }
.hero-card-list { list-style: none; margin: 16px 0 4px; padding: 0; display: grid; gap: 12px; font-size: 13px; color: var(--muted); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 7px; font-weight: 700; font-size: 12px; margin-right: 8px; color: #05231a; }
.tag-1 { background: #93c5fd; } .tag-2 { background: #86efac; } .tag-3 { background: #fcd34d; }
.tag-4 { background: #c4b5fd; } .tag-5 { background: #f9a8d4; } .tag-6 { background: #5eead4; }

/* ---- builder ---- */
.builder { padding: 30px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 21px; margin: 0; }
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 7px; }
.span-2 { grid-column: 1 / -1; }
label { font-size: 14px; font-weight: 600; }
.req { color: var(--brand); }
.hint { color: var(--faint); font-weight: 400; font-size: 12px; }
input, select, textarea {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); padding: 11px 12px; font-size: 14px; font-family: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
textarea { resize: vertical; line-height: 1.7; }
.form-actions { display: flex; gap: 12px; align-items: center; }

/* ---- point ranker ---- */
.point-ranker { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.point-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px; font-size: 13px;
}
.point-chip .star { cursor: pointer; font-size: 16px; color: var(--faint); line-height: 1; user-select: none; transition: transform .1s ease; }
.point-chip .star:hover { transform: scale(1.2); }
.point-chip.is-top { border-color: var(--warn); background: rgba(251, 191, 36, .08); }
.point-chip.is-top .star { color: var(--warn); }
.point-chip .ptxt { flex: 1; color: var(--muted); }
.point-chip.is-top .ptxt { color: var(--text); }
.point-chip .badge { font-size: 11px; color: var(--warn); font-weight: 700; }

/* ---- output ---- */
.output { padding: 18px 0 40px; }
.output-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#result { display: grid; gap: 16px; }
.blueprint-meta {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted);
}
.blueprint-meta b { color: var(--text); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 9px; }
.card h3 .num {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--brand); font-size: 12px; font-weight: 800;
}
.card h3 .key-flag { margin-left: auto; font-size: 11px; color: #05231a; background: var(--warn); padding: 2px 8px; border-radius: 6px; font-weight: 800; }
.module-purpose { color: var(--faint); font-size: 12px; margin: -6px 0 12px; }
.headline-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.headline-list li { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.headline-list .label { display: block; color: var(--faint); font-size: 11px; margin-bottom: 3px; }
.body-points { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.body-points li { margin-bottom: 5px; }
.shot {
  margin-top: 12px; background: var(--bg-soft); border-left: 3px solid var(--brand-2);
  border-radius: 0 9px 9px 0; padding: 9px 12px; font-size: 13px; color: var(--muted);
}
.shot b { color: var(--brand-2); }

.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-wrap { overflow-x: auto; }
.cmp-table th, .cmp-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.cmp-table th { background: var(--panel-2); color: var(--text); white-space: nowrap; }
.cmp-table td.us { color: var(--brand); font-weight: 600; }
.cmp-table tr:nth-child(even) td { background: rgba(255,255,255,.015); }

.faq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.faq-list .q { font-weight: 700; color: var(--text); margin-bottom: 3px; }
.faq-list .a { color: var(--muted); font-size: 14px; }

/* ---- how / modules ---- */
.how, .modules { padding: 44px 0; border-top: 1px solid var(--line); }
.how h2, .modules h2 { font-size: 22px; margin: 0 0 6px; }
.modules-lede { color: var(--muted); margin: 0 0 22px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.how-step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.how-num {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--bg-soft); color: var(--brand); font-weight: 800; margin-bottom: 12px; border: 1px solid var(--line);
}
.how-step h3 { margin: 0 0 8px; font-size: 16px; }
.how-step p { margin: 0; color: var(--muted); font-size: 14px; }
.modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.module-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.module-card h4 { margin: 0 0 6px; font-size: 14px; color: var(--brand); }
.module-card p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 20px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner > div { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.footer-note { color: var(--faint); font-size: 13px; margin: 0; max-width: 44em; }

/* ---- drawer (history) ---- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); z-index: 50;
  background: var(--bg-soft); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
  transform: translateX(0); transition: transform .2s ease;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { margin: 0; font-size: 16px; }
.history-list { display: grid; gap: 10px; flex: 1; }
.history-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer;
  transition: border-color .15s ease;
}
.history-item:hover { border-color: var(--brand); }
.history-item .hi-name { font-weight: 700; font-size: 14px; }
.history-item .hi-meta { color: var(--faint); font-size: 12px; margin-top: 3px; }
.history-empty { color: var(--faint); font-size: 14px; text-align: center; padding: 30px 0; }
.drawer-mask { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.5); }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #05231a; color: var(--brand); border: 1px solid #1f6b4f; border-radius: 10px;
  padding: 11px 18px; font-size: 14px; font-weight: 600; 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 { padding: 40px 0 20px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-card { order: -1; }
  .form-grid { grid-template-columns: 1fr; padding: 18px; }
  .span-2 { grid-column: 1; }
  .how-grid { grid-template-columns: 1fr; }
  .topnav a { display: none; }
  .output-actions { width: 100%; }
}
