:root {
  --night: #0b1426;
  --night-2: #13213d;
  --flame: #ff7a1a;        /* on dark backgrounds / as button fill with dark text */
  --flame-dark: #b8400b;   /* orange text on white (contrast > 4.5:1) */
  --ink: #1b2333;
  --muted: #4a5568;
  --line: #e2e6ee;
  --bg: #f7f8fb;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; }
a { color: var(--flame-dark); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 100; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; }

header.top { background: var(--night); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; gap: 16px; }
.logo { color: #fff; font-weight: 700; font-size: 1.2rem; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo svg { width: 26px; height: 26px; }
nav a { color: #d6deee; text-decoration: none; margin-left: 18px; font-size: .95rem; }
nav a:hover { color: #fff; }

.hero { background: linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%); color: #fff; padding: 72px 0 88px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 16px; max-width: 760px; }
.hero h1 span { color: var(--flame); }
.hero p { font-size: 1.15rem; color: #d6deee; max-width: 680px; margin: 0 0 28px; }
.btn { display: inline-block; background: var(--flame); color: var(--night); font-weight: 700; padding: 12px 22px; border-radius: 8px; text-decoration: none; border: 0; font-size: 1rem; cursor: pointer; }
.btn:hover { background: #ff9447; }
.btn.ghost { background: transparent; color: #fff; border: 1px solid #5a6b8c; margin-left: 10px; }

section { padding: 64px 0; }
section.alt { background: var(--bg); }
h2 { font-size: 1.8rem; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 32px; max-width: 680px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--night); color: var(--flame); font-weight: 700; margin-bottom: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 0; }
.tags li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; }

form.contact { display: grid; gap: 14px; max-width: 620px; }
form.contact label { font-weight: 600; font-size: .95rem; }
input, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #9aa5b8; border-radius: 8px; margin-top: 4px; }
.hp { display: none; }
.note { font-size: .88rem; color: var(--muted); }
.status { min-height: 1.4em; font-weight: 600; }

footer { background: var(--night); color: #b9c4d9; padding: 28px 0; font-size: .9rem; }
footer a { color: #fff; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Chat widget */
#ask-btn { position: fixed; right: 20px; bottom: 20px; z-index: 50; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 1.05rem; padding: 14px 22px; text-decoration: none; }
#chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 40px));
  background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; }
#chat[hidden], #chat-open[hidden] { display: none; }
#chat header { background: var(--night); color: #fff; padding: 12px 14px; display: flex; justify-content: space-between; gap: 8px; }
#chat header strong { display: block; }
#chat header small { color: #c7d1e4; font-size: .8rem; }
#chat-close { background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
#chat-log { flex: 1; overflow-y: auto; padding: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; font-size: .95rem; }
.msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg.me { background: var(--night); color: #fff; align-self: flex-end; }
#chat form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
#chat form input { margin: 0; }
#chat form .btn { padding: 10px 14px; }
#chat .note { padding: 0 12px 10px; margin: 0; font-size: .78rem; }

@media (max-width: 640px) {
  nav { display: none; }
  .hero { padding: 48px 0 60px; }
  .btn.ghost { margin: 10px 0 0; }
}

/* ---- v2: bilingual + pricing ---- */
html[lang="zh"] [lang="en"], html[lang="en"] [lang="zh"] { display: none; }
#lang { background: none; border: 1px solid #5a6a8a; color: #d6deee; border-radius: 6px; padding: 4px 10px; cursor: pointer; margin-left: 18px; font-size: .9rem; }
#lang:hover { color: #fff; border-color: #fff; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .tiers { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.tier { border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: #fff; display: flex; flex-direction: column; }
.tier.hot { border-color: var(--flame); box-shadow: 0 0 0 2px rgba(255,122,26,.15); }
.tier h3 { margin: 0 0 4px; }
.tier .price { font-size: 1.6rem; font-weight: 700; color: var(--flame-dark); margin: 6px 0; }
.tier .sub { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.tier ul { padding-left: 18px; margin: 0 0 16px; flex: 1; }
.tier li { margin-bottom: 6px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--muted); }
.promise { background: var(--night-2); color: #fff; border-radius: 12px; padding: 24px 28px; margin-top: 24px; }
.promise strong { color: var(--flame); }
.hero h1 [lang] { color: inherit; }
.tier .btn.ghost { color: var(--ink); border-color: #9aa5b8; margin-left: 0; align-self: flex-start; }
.tier .btn { align-self: flex-start; }

.tier.free { background: linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%); color: #fff; border-color: var(--night); position: relative; }
.tier.free .price { color: var(--flame); font-size: 2.2rem; }
.tier.free .sub { color: #d6deee; }
.tier.free li::marker { color: var(--flame); }
.badge { display: inline-block; background: var(--flame); color: var(--night); font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; align-self: flex-start; }

/* ---- v3: free-first CTAs ---- */
.cta { margin-top: 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cta span { color: var(--muted); }
.cta a:not(.btn) { font-weight: 600; }
