:root {
  --primary: #165DFF;
  --primary-dark: #0E4BE0;
  --primary-soft: rgba(22, 93, 255, .10);
  --primary-line: rgba(22, 93, 255, .20);
  --accent: #FF8000;
  --accent-2: #ffb347;
  --foreground: #333333;
  --heading: #1A1A1A;
  --muted: #616161;
  --border: #E5E7EB;
  --muted-bg: #F7F8FA;
  --card: #FFFFFF;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .05);
  --shadow-hover: 0 8px 28px rgba(16, 24, 40, .12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: #FFFFFF; color: var(--foreground);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 896px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #FFFFFF; border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; flex: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
}
.brand-mark svg { width: 17px; height: 17px; }
.brand-text { font-weight: 700; font-size: 16px; color: var(--primary); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 8px 13px; border-radius: 6px; white-space: nowrap; transition: background .18s, color .18s;
}
.nav a:hover { color: var(--heading); background: var(--muted-bg); }
.nav a.active { color: var(--primary); background: var(--primary-soft); }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted);
  border-radius: 6px; cursor: pointer; display: grid; place-items: center;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--muted-bg); color: var(--heading); }
.login-link { font-size: 14px; color: var(--muted); padding: 6px 8px; white-space: nowrap; }
.login-link:hover { color: var(--heading); }
.btn-orange {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  border: 0; border-radius: 6px; padding: 9px 16px; cursor: pointer; white-space: nowrap;
}
.btn-orange:hover { background: #E67300; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 32px; border-radius: 6px;
  font-size: 16px; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  transition: background .18s, box-shadow .18s, transform .18s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 18px rgba(22, 93, 255, .28); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
}
.hero-bg { position: absolute; inset: 0; background: url('hero.jpg') center center / cover no-repeat; }
.hero-mask { position: absolute; inset: 0; background: rgba(255, 255, 255, .80); }
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 896px; margin: 0 auto; padding: 90px 24px 60px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-soft); border: 1px solid var(--primary-line);
  color: var(--primary); font-size: 14px; font-weight: 500;
  border-radius: 999px; padding: 6px 16px; margin-bottom: 32px;
}
.hero-badge .bolt { color: var(--accent); font-size: 14px; }
.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px); line-height: 1.2; font-weight: 700;
  letter-spacing: -.02em; color: var(--heading); margin: 0 0 24px;
}
.hero-sub { font-size: clamp(16px, 1.6vw, 20px); color: var(--muted); max-width: 672px; margin: 0 auto 40px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats { position: relative; z-index: 2; width: 100%; max-width: 896px; margin: 0 auto; padding: 0 24px 56px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  text-align: center; padding: 20px 12px; transition: box-shadow .2s;
}
.stat:hover { box-shadow: var(--shadow-hover); }
.stat-num { font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; color: var(--primary); line-height: 1.25; }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-muted { background: var(--muted-bg); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; color: var(--heading); margin: 0 0 12px; letter-spacing: -.01em; }
.section-sub { font-size: 16px; color: var(--muted); margin: 0; }
.link { color: var(--primary); cursor: pointer; font-weight: 500; }
.link:hover { text-decoration: underline; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.card-hover:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.about-h { font-size: 18px; font-weight: 700; color: var(--heading); margin: 0 0 10px; }
.about-p { font-size: 15px; color: var(--muted); margin: 0 0 20px; }
.about-li { font-size: 15px; color: var(--muted); padding: 4px 0; }
.about-li::before { content: "• "; color: var(--primary); font-weight: 700; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--primary-soft);
  color: var(--primary); display: grid; place-items: center; font-size: 21px; margin-bottom: 16px;
}
.svc-title { font-size: 17px; font-weight: 700; color: var(--heading); margin-bottom: 8px; }
.svc-desc { font-size: 14px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step-no { font-size: 30px; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 12px; }
.step-title { font-size: 16px; font-weight: 700; color: var(--heading); margin-bottom: 6px; }
.step-desc { font-size: 14px; color: var(--muted); }
.case-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.tag { display: inline-block; font-size: 12px; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 3px 12px; }
.case-round { font-size: 12px; color: #0F9D58; font-weight: 500; }
.case-name { font-size: 20px; font-weight: 700; color: var(--heading); }
.case-title { font-size: 14px; color: var(--primary); margin: 4px 0 10px; }
.case-desc { font-size: 14px; color: var(--muted); }
.faq { max-width: 800px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; color: var(--heading); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "›"; font-size: 22px; color: var(--primary); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(90deg); }
.faq p { margin: 14px 0 2px; font-size: 15px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; }
.cta { text-align: center; padding: 72px 24px; background: var(--primary-soft); border-top: 1px solid var(--primary-line); }
.cta-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; color: var(--heading); margin: 0 0 12px; }
.cta-sub { font-size: 16px; color: var(--muted); margin: 0 0 28px; }

/* ---------- Forms ---------- */
.form-shell { max-width: 640px; margin: 0 auto; }
.field { margin-bottom: 20px; }
.label { display: block; font-size: 14px; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.req { color: #E5484D; }
.input, .textarea {
  width: 100%; background: #fff; color: var(--heading);
  border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px;
  font-size: 15px; outline: none; transition: border-color .18s, box-shadow .18s;
}
.input:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input::placeholder, .textarea::placeholder { color: #9AA0AE; }
.textarea { min-height: 110px; resize: vertical; }
.tip { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.form-msg { text-align: center; font-size: 13px; color: #E5484D; min-height: 20px; margin-top: 10px; }
.done { text-align: center; padding: 48px 20px; }
.done-icon { font-size: 46px; }
.done-title { font-size: 24px; font-weight: 700; color: var(--heading); margin: 12px 0 10px; }
.done-sub { font-size: 15px; color: var(--muted); max-width: 440px; margin: 0 auto 28px; }

/* ---------- Admin ---------- */
.admin-box { max-width: 960px; margin: 0 auto; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.admin-table th { color: var(--primary); font-weight: 600; }
.admin-table td { color: var(--foreground); }
.admin-empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: #fff; padding: 28px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.footer strong { color: var(--primary); }
.footer-legal { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; font-size: 12px; }
.footer-legal a { color: var(--muted); text-decoration: none; }
.footer-legal a:hover { color: var(--primary); text-decoration: underline; }

@media (max-width: 1100px) {
  .nav a { padding: 8px 9px; font-size: 13px; }
}
@media (max-width: 900px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; gap: 8px; }
  .nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .hero { min-height: auto; }
  .hero-inner { padding: 64px 20px 40px; }
  .hero-stats { padding: 0 20px 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wrap, .narrow { padding: 0 16px; }
  .login-link { display: none; }
  .hero-inner { padding: 52px 18px 34px; }
  .hero-badge { margin-bottom: 24px; font-size: 13px; }
  .hero h1 { font-size: 34px; }
  .hero-sub { font-size: 15px; margin-bottom: 28px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section { padding: 56px 0; }
  .about-grid, .grid-3, .steps { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 28px; }
  .brand-text { font-size: 14px; }
}
