:root {
  --bg: #f6f8fb;
  --hero: #0f172a;
  --hero-2: #1e3a8a;
  --blue: #2563eb;
  --deep-blue: #1e3a8a;
  --cyan: #0ea5e9;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --violet: #7c3aed;
  --rose: #e11d48;
  --indigo: #4f46e5;
  --text: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --soft: #94a3b8;
  --border: #e2e8f0;
  --light-border: #f1f5f9;
  --card: #ffffff;
  --soft-bg: #f8fafc;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.1);
  --shadow-color: 0 22px 60px rgba(37, 99, 235, 0.09);
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner,
.container,
.hero-inner,
.footer-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 12px;
  letter-spacing: 0;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text);
  background: var(--soft-bg);
}

.language-control {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
}

.currency-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.currency-control select {
  width: auto;
  height: 30px;
  min-width: 78px;
  padding: 0 28px 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.lang-button {
  min-width: 38px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.lang-button.is-active {
  color: white;
  background: var(--text);
}

.hero {
  background:
    linear-gradient(90deg, rgba(14, 165, 233, 0.12), transparent 46%),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #0369a1 100%);
  color: white;
}

.hero-inner {
  min-height: min(760px, calc(100vh - 132px));
  max-height: 860px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: 44px;
  align-items: center;
  padding: 72px 0 56px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0;
  font-size: 76px;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero-text {
  max-width: 620px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 21px;
  line-height: 1.7;
}

.hero-risk {
  margin: 16px 0 0;
  color: #bae6fd;
  font-size: 14px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 680;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.secondary-button {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.dashboard-preview {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.13), rgba(255, 255, 255, 0.04) 45%, rgba(16, 185, 129, 0.08)),
    rgba(255, 255, 255, 0.1);
  box-shadow: 0 34px 80px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(18px);
}

.preview-header,
.preview-metrics {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.preview-header {
  align-items: center;
  color: #cbd5e1;
  font-size: 13px;
}

.status-dot {
  padding: 6px 10px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.14);
}

.preview-value {
  margin-top: 28px;
}

.preview-value span,
.preview-metrics span {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
}

.preview-value strong {
  display: block;
  margin-top: 8px;
  font-size: 54px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.mini-chart-wrap {
  height: 170px;
  margin: 24px 0;
}

.preview-metrics > div {
  flex: 1;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.22);
}

.preview-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.content-band {
  padding: 72px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 24px;
}

.section-heading h2,
.calculator-title h2,
.disclaimer-block h2 {
  margin: 0;
  font-size: 42px;
  letter-spacing: -0.03em;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.74), rgba(255, 255, 255, 0.94) 46%, rgba(236, 253, 245, 0.6)),
    rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(37, 99, 235, 0.25);
}

.tool-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 800;
}

.tool-card h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tool-card .secondary-button {
  margin-top: auto;
  min-height: 42px;
}

.ad-placeholder {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  color: var(--soft);
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  font-size: 13px;
}

.calculators {
  display: grid;
  gap: 54px;
  padding: 24px 0 78px;
}

.calculator-section {
  scroll-margin-top: 92px;
  min-width: 0;
  padding: 34px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.72), rgba(255, 255, 255, 0.96) 140px),
    #ffffff;
  box-shadow: var(--shadow-color);
}

.calculator-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.calculator-title p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96)),
    var(--soft-bg);
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

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

.input-wrap {
  position: relative;
}

input,
select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  font-size: 15px;
}

input {
  padding: 0 50px 0 14px;
}

select {
  padding: 0 14px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

input:disabled,
select:disabled {
  color: var(--muted);
  background: #f1f5f9;
  cursor: not-allowed;
}

.unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--soft);
  font-size: 13px;
  pointer-events: none;
}

.data-status {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: #eff6ff;
}

.data-status-label {
  color: var(--deep-blue);
  font-size: 12px;
  font-weight: 760;
}

.data-status-value {
  color: var(--body);
  font-size: 13px;
  line-height: 1.5;
}

.data-status.is-muted {
  border-color: var(--border);
  background: #ffffff;
}

.data-status.is-muted .data-status-label,
.data-status.is-muted .data-status-value {
  color: var(--muted);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.form-actions button {
  cursor: pointer;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-card {
  position: relative;
  overflow: hidden;
  min-height: 122px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.045);
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.result-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  pointer-events: none;
}

.result-card span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.result-value {
  position: relative;
  z-index: 1;
  margin: 10px 0 8px;
  color: var(--deep-blue);
  font-size: 38px;
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: -0.03em;
  display: block;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

.result-value.is-long {
  font-size: 32px;
  letter-spacing: -0.02em;
}

.result-value.is-very-long {
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: 0;
}

.result-card:nth-child(2)::before {
  background: var(--indigo);
}

.result-card:nth-child(2)::after {
  background: rgba(79, 70, 229, 0.08);
}

.result-card:nth-child(3)::before,
.result-card:nth-child(6)::before {
  background: var(--green);
}

.result-card:nth-child(3)::after,
.result-card:nth-child(6)::after {
  background: rgba(16, 185, 129, 0.09);
}

.result-card:nth-child(4)::before {
  background: var(--amber);
}

.result-card:nth-child(4)::after {
  background: rgba(245, 158, 11, 0.12);
}

.result-card:nth-child(5)::before {
  background: var(--violet);
}

.result-card:nth-child(5)::after {
  background: rgba(124, 58, 237, 0.08);
}

.result-card:nth-child(3n) .result-value,
.result-card:nth-child(6) .result-value {
  color: var(--green);
}

.result-card small {
  position: relative;
  z-index: 1;
  color: var(--soft);
  line-height: 1.5;
}

.chart-card {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.05);
}

.chart-card > strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 16px;
}

.chart-card > strong::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
}

.chart-wrap {
  height: 340px;
}

.matrix-card {
  min-width: 0;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.88)),
    #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.05);
}

.matrix-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.matrix-heading strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.matrix-heading p {
  max-width: 780px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.matrix-scroll {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.fire-matrix {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.fire-matrix th,
.fire-matrix td {
  border-right: 1px solid rgba(226, 232, 240, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.fire-matrix thead th {
  position: sticky;
  top: 0;
  color: #475569;
  background: #eef2ff;
  font-weight: 760;
}

.fire-matrix tr > th:first-child {
  width: 150px;
  border-left: 1px solid rgba(226, 232, 240, 0.86);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.fire-matrix thead tr > th:first-child {
  border-top-left-radius: 14px;
  background: #eef2ff;
}

.fire-matrix thead tr > th:last-child {
  border-top-right-radius: 14px;
}

.fire-matrix tbody tr:last-child > th:first-child {
  border-bottom-left-radius: 14px;
}

.fire-matrix tbody tr:last-child > td:last-child {
  border-bottom-right-radius: 14px;
}

.fire-matrix thead th {
  border-top: 1px solid rgba(226, 232, 240, 0.86);
}

.fire-matrix td strong,
.fire-matrix th strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.fire-matrix td strong {
  font-size: 17px;
  letter-spacing: 0;
}

.fire-matrix td span,
.fire-matrix th span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.fire-matrix td.is-achieved span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  font-weight: 720;
}

.fire-matrix td.is-near span {
  color: #92400e;
  font-weight: 680;
}

.fire-matrix td.is-far span {
  color: #64748b;
}

.fire-matrix td small {
  display: block;
  margin-top: 6px;
  color: var(--soft);
  line-height: 1.4;
}

.fire-matrix td.is-achieved {
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.96), rgba(209, 250, 229, 0.78));
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.16);
}

.fire-matrix td.is-achieved strong {
  color: #047857;
}

.fire-matrix td.is-near {
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.82));
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.16);
}

.fire-matrix td.is-near strong {
  color: #b45309;
}

.fire-matrix td.is-far {
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.fire-matrix td.is-far strong {
  color: #475569;
}

.notes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  margin-top: 18px;
}

.note {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: var(--body);
  line-height: 1.7;
}

.note strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.risk-note {
  border-color: rgba(245, 158, 11, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 255, 255, 0.92));
}

.error-box,
.warning-box {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.5;
  font-size: 14px;
}

.error-box {
  color: #b91c1c;
  background: #fff1f2;
  border: 1px solid rgba(225, 29, 72, 0.16);
}

.warning-box {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.error-box.is-visible,
.warning-box.is-visible {
  display: block;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 720;
}

.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
  line-height: 1.7;
}

.disclaimer-block {
  margin-bottom: 78px;
  padding: 28px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 24px;
  background: #fffbeb;
}

.disclaimer-block p {
  color: var(--body);
  line-height: 1.8;
}

.footer {
  color: #e2e8f0;
  background: #0f172a;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer p {
  margin: 8px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #cbd5e1;
  font-size: 14px;
}

.copyright {
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .hero h1 {
    font-size: 62px;
  }

  .preview-value strong {
    font-size: 46px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-layout,
  .notes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner,
  .container,
  .hero-inner,
  .footer-inner {
    width: min(100% - 22px, var(--max));
  }

  .header-inner {
    min-height: 76px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-bottom: 2px;
  }

  .language-control {
    margin-left: auto;
  }

  .currency-control {
    order: 2;
  }

  .hero-inner {
    min-height: min(720px, calc(100vh - 128px));
    padding: 42px 0 34px;
    gap: 28px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-text {
    font-size: 17px;
  }

  .preview-value strong {
    font-size: 34px;
  }

  .section-heading h2,
  .calculator-title h2,
  .disclaimer-block h2 {
    font-size: 32px;
  }

  .result-value {
    font-size: 28px;
  }

  .result-value.is-long {
    font-size: 24px;
  }

  .result-value.is-very-long {
    font-size: 21px;
  }

  .dashboard-preview {
    padding: 18px;
  }

  .preview-metrics {
    flex-direction: column;
  }

  .content-band {
    padding: 48px 0;
  }

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

  .calculator-section {
    padding: 22px 16px;
    border-radius: 22px;
  }

  .calculator-title {
    display: block;
  }

  .form-actions .primary-button,
  .form-actions .secondary-button {
    width: 100%;
  }

  .chart-wrap {
    height: 280px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
