/* 贷款预测系统 · 视觉系统
   风格锚点：精装金融年报 × 国内数字银行落地页
   色板：墨蓝 #16324F / 暖纸 #F7F3EE / 陶土橙 #C45C26
*/

:root {
  --ink: #16324F;
  --ink-2: #2C4A6E;
  --muted: #6B7C8F;
  --paper: #F7F3EE;
  --surface: #FFFFFF;
  --line: #E2D9CE;
  --line-soft: #EDE6DC;
  --accent: #C45C26;
  --accent-soft: #F4E4D8;
  --accent-deep: #9A4318;
  --teal: #1F7A6B;
  --teal-soft: #D8EDE8;
  --gold: #B4862D;
  --danger: #B33A3A;
  --shadow: 0 12px 40px rgba(22, 50, 79, 0.08);
  --shadow-sm: 0 4px 16px rgba(22, 50, 79, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* hidden 优先于组件 display，避免多步表单同时露出 */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(196, 92, 38, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(31, 122, 107, 0.06), transparent 50%),
    var(--paper);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* —— 顶栏 —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(247, 243, 238, 0.86);
  border-bottom: 1px solid rgba(226, 217, 206, 0.8);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand__tag {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav a,
.btn-ghost {
  color: var(--ink-2);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.header-nav a:hover,
.btn-ghost:hover {
  background: rgba(22, 50, 79, 0.06);
  text-decoration: none;
}

/* —— 按钮 —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(196, 92, 38, 0.28);
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-secondary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 22px rgba(22, 50, 79, 0.2);
}

.btn-secondary:hover {
  background: var(--ink-2);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: rgba(22, 50, 79, 0.04);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.city-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.city-row select {
  flex: 1;
}

/* 报告工具条：固定在视口，不属于报告正文 */
/* 吸顶导航高度补偿，锚点不被遮挡 */
#how,
#products,
.section-title[id] {
  scroll-margin-top: 84px;
}

.header-nav a {
  scroll-margin-top: 84px;
}

#btn-print[hidden],
#nav-start[hidden],
#btn-restart[hidden],
#btn-home[hidden] {
  display: none !important;
}

.source-list {
  margin: 12px 0 0;
  padding-left: 1.15em;
  color: var(--ink-2);
  font-size: 13px;
}

.source-list li + li {
  margin-top: 8px;
}

.source-list .tag {
  margin-left: 6px;
  vertical-align: middle;
}

.data-intro {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-2);
}

.data-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.product-card__body .detail-block {
  margin-top: 4px;
}

.product-card__body .detail-block h4 {
  margin: 12px 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.product-card__body .detail-block ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.55;
}

.product-card__body .detail-block li + li {
  margin-top: 3px;
}

/* —— 布局 —— */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.view {
  display: none;
  animation: fadeIn 0.35s ease;
}

.view.is-active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Hero —— */
.hero {
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
}

.hero__eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--ink);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 8px;
  background: var(--accent-soft);
  z-index: -1;
}

.hero__lead {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 34em;
  margin: 0 0 28px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.stat-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  line-height: 1.2;
}

.stat-card span {
  font-size: 12px;
  color: var(--muted);
}

.hero__panel {
  background: linear-gradient(165deg, var(--ink) 0%, #1F3F62 55%, #2A547A 100%);
  color: #F4EFE8;
  border-radius: 22px;
  padding: 28px 26px;
  box-shadow: 0 24px 50px rgba(22, 50, 79, 0.22);
  position: relative;
  overflow: hidden;
}

.hero__panel::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(196, 92, 38, 0.22);
  top: -60px;
  right: -40px;
  filter: blur(4px);
}

.hero__panel h2 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
}

.hero__panel p {
  margin: 0 0 22px;
  color: rgba(244, 239, 232, 0.78);
  font-size: 14px;
}

.preview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.preview-item strong {
  font-size: 14px;
  display: block;
}

.preview-item small {
  color: rgba(244, 239, 232, 0.65);
  font-size: 12px;
}

.preview-item .rate {
  font-family: var(--font-serif);
  font-size: 20px;
  color: #F0C48A;
}

/* —— 步骤条 —— */
.stepper {
  display: flex;
  gap: 8px;
  margin: 8px 0 28px;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.step__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--line-soft);
  color: var(--ink-2);
  font-size: 12px;
  flex-shrink: 0;
}

.step.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.step.is-active .step__num {
  background: var(--accent);
  color: #fff;
}

.step.is-done {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.step.is-done .step__num {
  background: var(--teal);
  color: #fff;
}

/* —— 卡片 / 表单 —— */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.card__header {
  margin-bottom: 22px;
}

.card__header h2 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.25;
}

.card__header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}

.field label .req {
  color: var(--accent);
  margin-left: 2px;
}

.field .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: -2px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #FFFCF8;
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.15);
}

.field.is-error input,
.field.is-error select,
.field.is-error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(179, 58, 58, 0.12);
}

.credit-assist {
  margin-top: 22px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background: #FBF8F3;
}

.credit-assist__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.credit-assist__head span {
  font-size: 12px;
  color: var(--muted);
}

.credit-assist__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.credit-parse-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--ink-2);
}

.credit-parse-result .tag-list {
  margin-top: 8px;
}

.field .error-msg {
  display: none;
  font-size: 12px;
  color: var(--danger);
}

.field.is-error .error-msg {
  display: block;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
  user-select: none;
}

.choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 650;
}

.choice span:hover {
  border-color: var(--accent);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.form-actions .note {
  font-size: 12px;
  color: var(--muted);
  max-width: 28em;
}

/* —— 匹配中 —— */
.matching {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
}

.matching h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  margin: 0 0 10px;
}

.matching p {
  color: var(--muted);
  margin: 0 0 32px;
}

.orbit {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px dashed var(--line);
  position: relative;
  margin-bottom: 28px;
}

.orbit::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  animation: spin 1.1s linear infinite;
}

.orbit::after {
  content: "信";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--ink);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.match-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  min-width: 280px;
}

.match-steps li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--muted);
  font-size: 14px;
}

.match-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
}

.match-steps li.is-done {
  color: var(--ink);
  font-weight: 600;
}

.match-steps li.is-done::before {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: inset 0 0 0 2px #fff;
}

/* —— 报告 —— */
.report-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  margin: 28px 0;
  align-items: stretch;
}

.report-banner {
  background: linear-gradient(150deg, var(--ink), #274B73);
  color: #F7F2EA;
  border-radius: 20px;
  padding: 30px 28px;
  box-shadow: 0 20px 40px rgba(22, 50, 79, 0.18);
  position: relative;
  overflow: hidden;
}

.report-banner h1 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.25;
}

.report-banner p {
  margin: 0 0 18px;
  color: rgba(247, 242, 234, 0.8);
  font-size: 15px;
  max-width: 36em;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  color: rgba(247, 242, 234, 0.92);
}

.score-panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.score-ring {
  --value: 78;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--value) * 1%), var(--line-soft) 0);
  display: grid;
  place-items: center;
  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  background: var(--surface);
  border-radius: 50%;
}

.score-ring strong {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1;
}

.score-panel .score-label {
  font-weight: 700;
  color: var(--ink);
}

.score-panel .score-sub {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 36px 0 16px;
}

.section-title h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.summary-item {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.summary-item dt {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.summary-item dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

/* 无匹配空态 */
.match-empty {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}

.match-empty h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
}

.match-empty p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 14px;
}

.match-empty ul {
  margin: 0 0 10px;
  padding-left: 1.2em;
  color: var(--ink-2);
  font-size: 14px;
}

.match-empty li + li {
  margin-top: 6px;
}

/* 产品卡 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card.is-top {
  border-color: var(--accent);
  box-shadow: 0 16px 36px rgba(196, 92, 38, 0.16);
}

.product-card__rank {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15px;
}

.product-card.is-top .product-card__rank {
  background: var(--accent);
}

.product-card__head {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.product-card__bank {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.product-card__name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.3;
  padding-right: 40px;
}

.product-card__body {
  padding: 16px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.kv-row dt {
  color: var(--muted);
  margin: 0;
}

.kv-row dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}

.rate-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
}

.rate-pill small {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
}

.match-bar {
  margin-top: 2px;
}

.match-bar__label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.match-bar__track {
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.match-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #F3EDE4;
  color: var(--ink-2);
}

.tag.pos {
  background: var(--teal-soft);
  color: var(--teal);
}

.tag.warn {
  background: #F8E8E4;
  color: var(--danger);
}

.product-card__footer {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 8px;
}

.product-card__footer .btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
}

/* 对比表 */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

table.compare th,
table.compare td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

table.compare thead th {
  background: #F4EEE6;
  font-weight: 700;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
}

table.compare tbody tr:last-child td {
  border-bottom: none;
}

table.compare td:first-child {
  color: var(--muted);
  font-weight: 600;
  width: 18%;
}

table.compare .best {
  background: rgba(31, 122, 107, 0.08);
  color: var(--teal);
  font-weight: 700;
}

/* 建议 / 风险 */
.advice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.advice-card {
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
}

.advice-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.advice-card ul {
  margin: 0;
  padding-left: 1.15em;
  color: var(--ink-2);
  font-size: 14px;
}

.advice-card li + li {
  margin-top: 8px;
}

.advice-card.good {
  background: linear-gradient(180deg, #F3FBF8, var(--surface));
}

.advice-card.risk {
  background: linear-gradient(180deg, #FCF4F1, var(--surface));
}

.disclaimer {
  margin: 28px 0 48px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: #F1E9DE;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

/* 详情弹层 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 28, 44, 0.48);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal__panel {
  background: var(--surface);
  border-radius: 18px;
  width: min(680px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  animation: popIn 0.22s ease;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 24px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.modal__head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
}

.modal__close {
  border: none;
  background: var(--line-soft);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.modal__body {
  padding: 20px 24px 28px;
}

.detail-block + .detail-block {
  margin-top: 18px;
}

.detail-block h4 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

.detail-block p,
.detail-block li {
  color: var(--ink-2);
  font-size: 14px;
  margin: 0;
}

.detail-block ul {
  margin: 0;
  padding-left: 1.15em;
}

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--line);
  background: #F0E9DE;
  padding: 28px 0 36px;
  margin-top: 20px;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.site-footer strong {
  color: var(--ink);
}

/* 雷达图容器 */
.radar-wrap {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.radar-legend {
  display: grid;
  gap: 10px;
}

.radar-legend div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #F7F1E9;
}

.radar-legend strong {
  font-family: var(--font-serif);
}

/* 月供条形 */
.bar-compare {
  display: grid;
  gap: 12px;
}

.bar-item__top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.bar-item__track {
  height: 12px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.bar-item__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ink-2), var(--accent));
}

/* 打印 */
@media print {
  body {
    background: #fff;
  }

  .site-header,
  .site-footer,
  .no-print,
  .hero,
  #view-home,
  #view-form,
  #view-matching {
    display: none !important;
  }

  #view-report {
    display: block !important;
  }

  .card,
  .product-card,
  .score-panel,
  .report-banner {
    box-shadow: none !important;
    break-inside: avoid;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    display: none !important;
  }
}

/* 响应式 */
@media (max-width: 960px) {
  .hero,
  .report-hero,
  .radar-wrap {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .advice-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 32px;
  }
}

@media (max-width: 560px) {
  .site-header__inner,
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero__stats {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }

  .header-nav .hide-sm {
    display: none;
  }
}
