:root {
  --ink: #111827;
  --navy: #132844;
  --navy-2: #1d4164;
  --paper: #f6f7f5;
  --surface: #ffffff;
  --line: #dfe3df;
  --muted: #667085;
  --amber: #e7a23d;
  --amber-dark: #a96410;
  --teal: #187a70;
  --red: #b54735;
  --blue: #286e9e;
  --shadow: 0 12px 34px rgba(14, 30, 51, .09);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app-shell { min-height: 100vh; padding-bottom: calc(76px + var(--safe-bottom)); }
.page { min-height: 100vh; }
.container { width: min(100%, 760px); margin: 0 auto; padding: 0 18px; }
.desktop-wide { width: min(100%, 1040px); }

.topbar {
  position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 40px 1fr 40px;
  align-items: center; min-height: 56px; padding: 0 12px; border-bottom: 1px solid rgba(223, 227, 223, .9);
  background: rgba(246, 247, 245, .94); backdrop-filter: blur(14px);
}
.topbar h1 { margin: 0; text-align: center; font-size: 16px; letter-spacing: 0; }
.icon-btn {
  width: 38px; height: 38px; border: 0; background: transparent; color: var(--navy); border-radius: 7px;
  display: grid; place-items: center; font-size: 24px;
}
.icon-btn:active { background: #e9ece9; }

.hero {
  min-height: min(720px, 88vh); color: white; position: relative; overflow: hidden; display: flex; align-items: flex-end;
  background-color: #12263f; background-image: url('/assets/hero-briefing.png');
  background-size: cover; background-position: center;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(9, 23, 39, .66); }
.hero-content { width: min(100%, 1040px); margin: 0 auto; padding: 84px 22px 46px; position: relative; z-index: 2; }
.brand { font-size: 13px; color: #f4c57d; font-weight: 750; letter-spacing: .08em; }
.hero h1 { font-size: clamp(36px, 8vw, 62px); line-height: 1.04; max-width: 650px; margin: 18px 0 16px; letter-spacing: 0; }
.hero-copy { max-width: 620px; margin: 0; color: #e7edf4; font-size: 16px; line-height: 1.75; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 24px; color: #f7d9a8; font-size: 13px; font-weight: 650; }
.hero-actions { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.hero-price { font-size: 13px; color: #c9d4df; white-space: nowrap; }
.hero-price strong { color: white; font-size: 28px; margin-left: 4px; }

.btn {
  min-height: 48px; border: 0; border-radius: 7px; padding: 0 18px; font-weight: 750; letter-spacing: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn-primary { color: white; background: var(--navy); }
.btn-amber { color: #261b08; background: var(--amber); }
.btn-outline { color: var(--navy); background: transparent; border: 1px solid #b9c1c9; }
.btn-danger { color: white; background: var(--red); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.landing-section { padding: 42px 0; border-bottom: 1px solid var(--line); background: var(--paper); }
.landing-section.white { background: white; }
.section-kicker { color: var(--amber-dark); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.section-title { margin: 8px 0 10px; font-size: 25px; line-height: 1.25; letter-spacing: 0; }
.section-copy { margin: 0; color: var(--muted); line-height: 1.75; font-size: 14px; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.value-item { padding-top: 16px; border-top: 3px solid var(--navy); }
.value-item:nth-child(2) { border-color: var(--amber); }
.value-item:nth-child(3) { border-color: var(--teal); }
.value-item b { font-size: 16px; }
.value-item p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 8px 0 0; }
.sample-report { margin-top: 24px; padding: 22px; background: var(--navy); color: white; border-radius: 7px; box-shadow: var(--shadow); }
.sample-tag { color: #f4c57d; font-size: 12px; font-weight: 750; }
.sample-report h3 { margin: 10px 0 16px; font-size: 19px; line-height: 1.45; }
.sample-insight { border-left: 3px solid var(--amber); padding-left: 14px; color: #dce7f1; line-height: 1.7; font-size: 14px; }

.form-page { padding-bottom: 100px; }
.step-strip { padding: 16px 0 4px; color: var(--muted); font-size: 12px; }
.step-strip b { color: var(--amber-dark); }
.form-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.form-section h2 { font-size: 18px; margin: 0 0 7px; }
.field-help { color: var(--muted); margin: 0 0 14px; font-size: 13px; line-height: 1.55; }
.industry-block { margin-top: 18px; }
.industry-title { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 13px; font-weight: 800; color: var(--navy); }
.industry-title::before { content: ""; width: 4px; height: 15px; background: var(--amber); border-radius: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid #cfd5d2; color: #344054; background: white; min-height: 38px; border-radius: 20px; padding: 7px 13px;
  font-size: 13px;
}
.chip.selected { border-color: var(--navy); background: var(--navy); color: white; }
.chip.custom { border-style: dashed; color: var(--amber-dark); }
label.field-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
.optional { color: var(--muted); font-size: 12px; font-weight: 500; }
.input, .textarea, .select {
  width: 100%; border: 1px solid #cfd5d2; background: white; border-radius: 7px; color: var(--ink); padding: 13px 14px;
}
.textarea { resize: vertical; min-height: 132px; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus { outline: 2px solid rgba(231, 162, 61, .2); border-color: var(--amber-dark); }
.nudge { margin-top: 10px; padding: 12px 14px; border-left: 3px solid var(--amber); background: #fff8ea; color: #805315; font-size: 12px; line-height: 1.55; }
.switch-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; }
.switch-copy { flex: 1; }
.switch-copy b { display: block; font-size: 14px; }
.switch-copy span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.switch { width: 48px; height: 28px; padding: 3px; border: 0; border-radius: 16px; background: #bcc4c0; transition: .2s; }
.switch::after { content: ""; display: block; width: 22px; height: 22px; background: white; border-radius: 50%; transition: .2s; box-shadow: 0 1px 5px rgba(0,0,0,.2); }
.switch.on { background: var(--teal); }
.switch.on::after { transform: translateX(20px); }
.upload-box { position: relative; border: 1px dashed #aeb8b3; background: white; border-radius: 7px; padding: 22px; text-align: center; }
.upload-box input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.upload-box strong { display: block; color: var(--navy); }
.upload-box span { color: var(--muted); font-size: 12px; }
.upload-box.uploaded { border-style: solid; border-color: var(--teal); background: #f0faf7; }
.sticky-action { position: fixed; z-index: 35; bottom: 0; left: 0; right: 0; padding: 12px 16px calc(12px + var(--safe-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
.sticky-inner { width: min(100%, 760px); margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.sticky-summary { min-width: 90px; font-size: 12px; color: var(--muted); }
.sticky-summary b { display: block; color: var(--ink); font-size: 15px; margin-top: 2px; }
.sticky-inner .btn { flex: 1; }

.checkout { padding: 22px 0 100px; }
.order-summary { background: white; border: 1px solid var(--line); border-radius: 7px; padding: 20px; box-shadow: var(--shadow); }
.order-summary h2 { margin: 0 0 16px; font-size: 19px; }
.summary-row { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid #edf0ed; font-size: 13px; }
.summary-row span:first-child { color: var(--muted); }
.summary-row span:last-child { text-align: right; }
.price-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; }
.price-total strong { color: var(--amber-dark); font-size: 30px; }
.pay-method { margin-top: 18px; background: #f1faf7; border: 1px solid #aed8cf; padding: 15px; border-radius: 7px; display: flex; justify-content: space-between; }
.legal-note { margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.legal-link { border: 0; padding: 0; background: transparent; color: var(--blue); font-size: inherit; text-decoration: underline; }

.generation-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px; background: var(--navy); color: white; text-align: center; }
.radar { width: 136px; height: 136px; border: 1px solid rgba(244,197,125,.45); border-radius: 50%; margin: 0 auto 28px; position: relative; }
.radar::before { content: ""; position: absolute; inset: 26px; border: 1px solid rgba(244,197,125,.25); border-radius: 50%; }
.radar-line { position: absolute; left: 50%; top: 50%; width: 50%; height: 2px; transform-origin: left center; background: var(--amber); animation: radar 1.8s linear infinite; }
@keyframes radar { to { transform: rotate(360deg); } }
.generation-page h1 { font-size: 23px; margin: 0; }
.generation-stage { color: #c7d5e2; margin-top: 12px; min-height: 24px; }
.progress-track { height: 6px; background: rgba(255,255,255,.14); width: min(300px, 78vw); margin: 24px auto 0; overflow: hidden; border-radius: 4px; }
.progress-value { height: 100%; background: var(--amber); transition: width .5s; }
.progress-number { margin-top: 8px; color: #f4c57d; font-size: 12px; }

.report-head { background: var(--navy); color: white; padding: 30px 0 24px; }
.report-badge { display: inline-block; color: #f4c57d; border: 1px solid rgba(244,197,125,.4); padding: 5px 9px; border-radius: 4px; font-size: 11px; }
.report-head h1 { font-size: 25px; margin: 13px 0 8px; line-height: 1.3; }
.report-meta { color: #afc0d0; font-size: 13px; line-height: 1.6; }
.report-nav { position: sticky; top: 56px; z-index: 20; overflow-x: auto; background: white; border-bottom: 1px solid var(--line); white-space: nowrap; scrollbar-width: none; }
.report-nav-inner { width: min(100%, 760px); margin: auto; padding: 11px 18px; display: flex; gap: 8px; }
.report-nav a { text-decoration: none; font-size: 12px; padding: 7px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 5px; }
.notice { margin: 18px 0 0; border-left: 3px solid var(--amber); padding: 12px 14px; background: #fff8ea; color: #805315; font-size: 13px; }
.report-section { scroll-margin-top: 120px; padding: 26px 0 4px; }
.report-section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.report-section-title small { color: var(--amber-dark); font-weight: 800; }
.report-section-title h2 { font-size: 20px; margin: 0; }
.report-section-title span { color: var(--muted); margin-left: auto; font-size: 12px; }
.question { padding: 20px 0; border-top: 1px solid var(--line); }
.question:first-of-type { border-top: 0; }
.question-title { display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 16px; font-weight: 800; line-height: 1.5; }
.q-number { width: 27px; height: 27px; display: grid; place-items: center; background: var(--navy); color: white; border-radius: 5px; font-size: 12px; }
.answer-block { margin: 14px 0 0 38px; }
.answer-label { color: var(--muted); font-size: 11px; font-weight: 800; margin-bottom: 4px; }
.answer-block p, .answer-block li { color: #344054; font-size: 14px; line-height: 1.7; }
.answer-block p { margin: 0; }
.answer-block ul { margin: 0; padding-left: 18px; }
.insight-block { background: var(--navy); border-left: 3px solid var(--amber); padding: 15px; margin-top: 14px; border-radius: 0 6px 6px 0; }
.insight-block .answer-label { color: var(--amber); }
.insight-block p { color: #dce6ef; }
.followup-block { background: #edf8f5; border-left: 3px solid var(--teal); padding: 12px 14px; margin-top: 12px; }
.group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.strategy-item { background: white; border: 1px solid var(--line); padding: 15px; border-radius: 7px; }
.strategy-item b { color: var(--navy); }
.strategy-item p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.diagnosis-item { border-top: 1px solid var(--line); padding: 18px 0; }
.diagnosis-item:first-child { border-top: 0; }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.text-panel { padding: 14px; background: white; border: 1px solid var(--line); font-size: 13px; line-height: 1.65; }
.text-panel.after { border-color: #a8d6cc; background: #f1faf7; }
.service-band { margin: 30px 0; background: var(--navy); color: white; padding: 24px; border-radius: 7px; }
.service-band p { color: #bdccda; font-size: 13px; line-height: 1.65; }

.mine-head { padding: 28px 0 18px; }
.mine-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mine-head h1 { margin: 0; font-size: 26px; }
.mine-head p { color: var(--muted); margin: 7px 0 0; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: 12px 2px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; }
.tab.active { color: var(--navy); border-color: var(--amber); }
.record-list { padding: 8px 0 30px; }
.record { padding: 18px 0; border-bottom: 1px solid var(--line); }
.record-top { display: flex; justify-content: space-between; gap: 16px; }
.record h3 { font-size: 15px; margin: 0; }
.status { font-size: 11px; color: var(--teal); border: 1px solid #a9d5cb; background: #f1faf7; padding: 4px 7px; border-radius: 4px; white-space: nowrap; }
.status.warn { color: var(--amber-dark); border-color: #e8c993; background: #fff8ea; }
.status.bad { color: var(--red); border-color: #ddb4aa; background: #fff4f1; }
.record-meta { color: var(--muted); font-size: 12px; margin-top: 7px; }
.record-actions { display: flex; gap: 9px; margin-top: 13px; }
.record-actions .btn { min-height: 36px; padding: 0 12px; font-size: 12px; }
.empty { padding: 64px 20px; text-align: center; color: var(--muted); }

.bottom-nav { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; height: calc(64px + var(--safe-bottom)); padding-bottom: var(--safe-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); display: flex; justify-content: center; }
.bottom-nav-inner { width: min(100%, 500px); display: grid; grid-template-columns: repeat(3, 1fr); }
.nav-btn { border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; display: grid; place-content: center; gap: 3px; }
.nav-btn .nav-icon { font-size: 19px; }
.nav-btn.active { color: var(--navy); }

.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(10,20,32,.55); display: flex; align-items: flex-end; }
.modal { width: 100%; max-height: 86vh; overflow: auto; background: var(--paper); border-radius: 14px 14px 0 0; padding: 22px 18px calc(24px + var(--safe-bottom)); }
.modal-handle { width: 44px; height: 4px; background: #c5cbc8; margin: -8px auto 18px; border-radius: 3px; }
.modal h2 { margin: 0 0 16px; font-size: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(86px + var(--safe-bottom)); transform: translate(-50%, 16px); max-width: calc(100vw - 36px); background: #111827; color: white; padding: 10px 14px; border-radius: 6px; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }

@media (max-width: 720px) {
  .hero { min-height: 82vh; }
  .hero-content { padding: 72px 20px 32px; }
  .hero h1 { font-size: 40px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-price { order: -1; }
  .hero-actions .btn { width: 100%; }
  .value-grid { grid-template-columns: 1fr; gap: 18px; }
  .group-grid, .before-after { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .sticky-action { left: 50%; right: auto; width: 760px; transform: translateX(-50%); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
