:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-muted: #edf1ee;
  --text: #1f2523;
  --muted: #64706b;
  --border: #d9ded8;
  --accent: #0b6b57;
  --accent-strong: #084d40;
  --gold: #c28a2c;
  --blue: #315d87;
  --danger: #a33b2f;
  --shadow: 0 18px 50px rgba(31, 37, 35, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 244, 239, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(100% - 32px, var(--max));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--accent-strong);
}

.hero {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  min-height: calc(100vh - 108px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: 48px;
  padding: 56px 0 28px;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  max-width: 880px;
  font-size: clamp(40px, 7vw, 76px);
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
}

h3 {
  font-size: 20px;
}

p {
  margin: 0;
}

.lead {
  max-width: 760px;
  margin-top: 22px;
  color: #40504a;
  font-size: 19px;
}

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

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.score {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.score div {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-muted);
}

.score strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--accent-strong);
}

.score span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 76px 0;
  border-top: 1px solid var(--border);
}

.section.alt {
  background: #fff;
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.section-head {
  max-width: 780px;
  margin-bottom: 30px;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
}

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

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

.card {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card p,
.card li {
  color: var(--muted);
}

.card h3 + p,
.card h3 + ul {
  margin-top: 12px;
}

.kicker {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.list {
  margin: 14px 0 0;
  padding-left: 18px;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-muted);
  color: var(--accent-strong);
}

tr:last-child td {
  border-bottom: 0;
}

.page-hero {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 72px 0 42px;
}

.page-hero h1 {
  font-size: clamp(36px, 5.5vw, 64px);
}

.page-layout {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding-bottom: 78px;
}

.content {
  display: grid;
  gap: 18px;
}

.content-block {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.content-block h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 34px);
}

.content-block p + p,
.content-block p + ul,
.content-block ul + p {
  margin-top: 12px;
}

.side {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 14px;
}

.side a {
  display: block;
  text-decoration: none;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.notice {
  border-left: 4px solid var(--gold);
}

.site-footer {
  padding: 36px 0;
  background: var(--text);
  color: #e7ece9;
}

.footer-grid {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.site-footer a {
  color: #e7ece9;
}

.tool-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 0 0 78px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
}

.tool-panel {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.tool-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.tool-panel.sticky {
  position: sticky;
  top: 96px;
  align-self: start;
}

.field-grid {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

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

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-muted);
}

.metric strong {
  display: block;
  color: var(--accent-strong);
  font-size: 26px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.result-stack {
  display: grid;
  gap: 16px;
}

.scenario-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 16px;
  align-items: start;
}

.scenario-score {
  display: grid;
  place-items: center;
  min-height: 78px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.small-note {
  color: var(--muted);
  font-size: 13px;
}

.export-box {
  min-height: 220px;
  white-space: pre-wrap;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
}

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

.tracker-row {
  display: grid;
  grid-template-columns: 44px minmax(220px, 1.2fr) 150px 110px minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.tracker-row + .tracker-row {
  margin-top: 10px;
}

.tracker-row .row-id {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--accent-strong);
  font-weight: 900;
}

.tracker-row input,
.tracker-row select {
  min-height: 42px;
}

.tracker-labels {
  display: grid;
  grid-template-columns: 44px minmax(220px, 1.2fr) 150px 110px minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .nav {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .page-layout,
  .grid,
  .grid.two,
  .footer-grid,
  .tool-shell,
  .metric-strip,
  .tracker-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .side {
    position: static;
  }

  .tool-panel.sticky {
    position: static;
  }

  .tracker-labels {
    display: none;
  }

  .tracker-row {
    grid-template-columns: 1fr;
  }

  .tracker-row .row-id {
    width: 44px;
  }
}

@media (max-width: 560px) {
  .score {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }
}
