:root {
  --bg: #07111f;
  --bg-soft: #0c1930;
  --card: rgba(16, 27, 47, 0.72);
  --card-strong: rgba(14, 22, 39, 0.9);
  --line: rgba(116, 164, 255, 0.18);
  --text: #eaf2ff;
  --muted: #9cb1d0;
  --primary: #60a5fa;
  --primary-2: #22d3ee;
  --success: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.14), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(96, 165, 250, 0.12), transparent 30%),
    linear-gradient(180deg, #06101d 0%, #081426 35%, #07111f 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent 70%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(7, 17, 31, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 30px rgba(96, 165, 250, 0.35);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.42);
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}
.nav-links a:hover { color: var(--text); }

.hero {
  padding: 84px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 30px;
  align-items: stretch;
}
.hero-copy,
.hero-panel,
.card,
.glass {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.hero-copy {
  padding: 34px;
  position: relative;
  overflow: hidden;
}
.hero-copy::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -120px;
  background: radial-gradient(circle, rgba(34,211,238,0.18), transparent 60%);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #d9f3ff;
  border: 1px solid rgba(96,165,250,0.3);
  background: rgba(96,165,250,0.08);
  font-size: 13px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.04em;
}
.hero p.lead {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  max-width: 760px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #03121f;
  background: linear-gradient(135deg, #93c5fd, #67e8f9);
  box-shadow: 0 14px 35px rgba(103, 232, 249, 0.25);
}
.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.12);
}
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 26px;
}
.metric {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.metric .num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}
.metric .label {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.hero-panel {
  padding: 28px;
  display: grid;
  gap: 18px;
}
.panel-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.ring-wrap {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
}
.ring {
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--primary-2) 0 25%, var(--primary) 25% 68%, rgba(255,255,255,0.12) 68% 100%);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.28);
}
.ring::before {
  content: "";
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.07);
}
.ring-label {
  position: absolute;
}
.ring-center {
  position: relative;
  width: 0;
  height: 0;
}
.ring-value {
  position: absolute;
  left: -30px;
  top: -18px;
  font-size: 30px;
  font-weight: 800;
}
.ring-sub {
  position: absolute;
  left: -52px;
  top: 18px;
  width: 104px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.signal-box {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(11,18,34,0.9), rgba(14,25,47,0.8));
  border: 1px solid rgba(255,255,255,0.07);
}
.signal-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.signal-graph {
  height: 120px;
  width: 100%;
  display: block;
}
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
}
.legend .l1::before { background: var(--primary-2); }
.legend .l2::before { background: var(--danger); }

.section {
  padding: 34px 0;
}
.section-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 22px;
}
.section-header h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}
.section-header p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}
.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 18px;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,0.08), transparent 60%);
}
.tag {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #d8ecff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.card h3 {
  margin: 14px 0 12px;
  font-size: 20px;
}
.card p, .card li {
  color: var(--muted);
  line-height: 1.75;
}
.card ul { padding-left: 18px; margin: 0; }
.kpi {
  display: flex;
  align-items: center;
  gap: 14px;
}
.kpi .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.55);
}
.kpi strong { font-size: 20px; }
.mini-note {
  color: var(--muted);
  font-size: 13px;
}
.research-card .source {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255,255,255,0.1);
  color: #cfe3ff;
  font-size: 13px;
}
.cta {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items: stretch;
}
.cta .hero-copy { padding: 30px; }
.cta-box {
  padding: 24px;
  background: linear-gradient(180deg, rgba(15,25,45,0.95), rgba(9,17,31,0.95));
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}
.cta-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.reference-list {
  display: grid;
  gap: 14px;
}
.reference-item {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.reference-item h4 {
  margin: 0 0 8px;
  font-size: 16px;
}
.reference-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.footer {
  padding: 26px 0 60px;
  color: var(--muted);
  font-size: 14px;
}
.footer-box {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.small {
  font-size: 13px;
  color: var(--muted);
}

/* estimate page */
.page-wrap {
  padding: 48px 0 60px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}
.page-head h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 44px);
}
.panel-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
}
.panel,
.chart-panel,
.table-panel {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.panel { padding: 24px; }
.chart-panel, .table-panel { padding: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.file-input {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.16);
  color: var(--muted);
}
.tip-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(96,165,250,0.08);
  color: #d8ebff;
  border: 1px solid rgba(96,165,250,0.18);
  line-height: 1.7;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
}
.result-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.chart-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.chart-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.chart-box h3 {
  margin: 0 0 14px;
  font-size: 17px;
}
canvas { width: 100% !important; }
.table-wrap {
  max-height: 720px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
.table-wrap th,
.table-wrap td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(8, 20, 38, 0.96);
}
.table-wrap td { color: #dce9ff; }
.table-wrap tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.back-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #d8ebff;
}
.callout {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.18);
  color: #fff7da;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .hero-grid, .cta, .panel-grid, .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .ring-wrap { grid-template-columns: 1fr; }
  .hero-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .container { width: min(var(--max), calc(100% - 24px)); }
  .nav-links { display: none; }
  .hero { padding-top: 56px; }
  .hero-copy, .hero-panel, .card, .panel, .chart-panel, .table-panel { padding: 18px; }
}
