:root {
  --bg: #f5f2eb;
  --paper: #fffaf0;
  --ink: #18211f;
  --muted-ink: #5f6862;
  --line: #d8d1c3;
  --forest: #24594b;
  --forest-dark: #15392f;
  --amber: #b46b23;
  --red: #a64536;
  --blue: #315f7c;
  --pale-green: #dfeee6;
  --pale-amber: #f3e0c8;
  --pale-red: #efd5cf;
  --shadow: 0 18px 55px rgba(24, 33, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC",
    system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

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

button,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(24, 33, 31, 0.12);
  background: rgba(245, 242, 235, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.cta-inner,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 18px;
  font-weight: 750;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(36, 89, 75, 0.3);
  border-radius: 8px;
  background: var(--forest);
  color: #fffaf0;
  font-size: 17px;
}

.nav-links {
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted-ink);
  font-size: 14px;
}

.nav-links a,
.header-action,
.secondary-link {
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.header-action {
  padding: 9px 14px;
  border: 1px solid rgba(36, 89, 75, 0.28);
  border-radius: 8px;
  color: var(--forest-dark);
  font-size: 14px;
  font-weight: 700;
}

.header-action:hover,
.header-action:focus-visible {
  background: var(--pale-green);
}

.hero {
  position: relative;
  min-height: min(820px, 86svh);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(245, 242, 235, 0.96), rgba(245, 242, 235, 0.82)),
    radial-gradient(circle at 75% 35%, rgba(49, 95, 124, 0.16), transparent 34%),
    var(--bg);
}

.decision-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.78fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: center;
  max-width: 1180px;
  min-height: min(700px, calc(74svh - 40px));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) clamp(18px, 4vw, 56px) 52px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker,
.panel-kicker {
  margin: 0 0 12px;
  color: var(--forest-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

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

h1 {
  max-width: 880px;
  font-size: clamp(46px, 9vw, 92px);
  font-weight: 850;
}

h2 {
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 820;
}

h3 {
  font-size: 21px;
  font-weight: 800;
}

.hero-lede {
  max-width: 680px;
  margin: 24px 0 0;
  color: #39433e;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-link,
.secondary-link,
.primary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
}

.primary-link,
.primary-button {
  border: 1px solid var(--forest);
  background: var(--forest);
  color: #fffaf0;
  box-shadow: 0 12px 28px rgba(36, 89, 75, 0.2);
}

.primary-link {
  padding: 12px 18px;
}

.primary-link:hover,
.primary-link:focus-visible,
.primary-button:hover,
.primary-button:focus-visible {
  background: var(--forest-dark);
}

.secondary-link {
  padding: 12px 16px;
  border: 1px solid rgba(24, 33, 31, 0.18);
  color: var(--ink);
}

.secondary-link:hover,
.secondary-link:focus-visible {
  border-color: rgba(24, 33, 31, 0.38);
  background: rgba(255, 250, 240, 0.64);
}

.filter-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(24, 33, 31, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.84);
  box-shadow: var(--shadow);
}

.panel-heading {
  padding-bottom: 6px;
}

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

.filter-panel label {
  color: #303a35;
  font-size: 14px;
  font-weight: 750;
}

textarea {
  width: 100%;
  min-height: 142px;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(24, 33, 31, 0.22);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--ink);
  outline: none;
}

textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(36, 89, 75, 0.13);
}

.primary-button {
  width: 100%;
  cursor: pointer;
}

.form-note {
  margin: 0;
  color: var(--muted-ink);
  font-size: 13px;
}

.result-band {
  border-bottom: 1px solid var(--line);
  background: var(--forest-dark);
  color: #fffaf0;
}

.section-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(26px, 5vw, 52px) 0;
}

.result-layout .section-kicker {
  color: #bfddcf;
}

.result-layout h2 {
  font-size: clamp(24px, 4vw, 42px);
}

.result-output {
  display: grid;
  gap: 12px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(255, 250, 240, 0.22);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.08);
}

.result-output p {
  margin: 0;
  color: rgba(255, 250, 240, 0.84);
}

.result-status {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.system-in {
  background: var(--pale-green);
  color: var(--forest-dark);
}

.system-edge {
  background: var(--pale-amber);
  color: #5a3512;
}

.system-out {
  background: var(--pale-red);
  color: #72271d;
}

.content-section {
  padding: clamp(70px, 10vw, 132px) 0;
  border-bottom: 1px solid var(--line);
  background: #fffaf0;
}

.content-section.muted {
  background: #ece8df;
}

.two-column,
.sample-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 96px);
}

.body-copy {
  color: #33403b;
  font-size: clamp(17px, 2vw, 21px);
}

.body-copy p {
  margin: 0;
}

.body-copy p + p {
  margin-top: 18px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

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

.scenario-card {
  min-height: 250px;
  padding: 22px;
  border: 1px solid rgba(24, 33, 31, 0.14);
  border-radius: 8px;
  background: #fffaf0;
}

.scenario-number {
  display: inline-block;
  margin-bottom: 44px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.scenario-card p,
.section-summary {
  margin: 14px 0 0;
  color: var(--muted-ink);
}

.section-summary {
  max-width: 560px;
  font-size: 18px;
}

.sample-list {
  display: grid;
  gap: 10px;
}

.sample-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 16px 18px;
  border: 1px solid rgba(24, 33, 31, 0.14);
  border-radius: 8px;
  background: #fffdf7;
}

.sample-row span {
  color: var(--muted-ink);
  font-size: 14px;
  font-weight: 750;
}

.sample-row strong {
  color: var(--ink);
  font-size: clamp(17px, 2vw, 20px);
}

.cta-section {
  padding: clamp(42px, 7vw, 78px) 0;
  background: var(--amber);
  color: #fffaf0;
}

.cta-inner {
  justify-content: space-between;
  gap: 22px;
}

.cta-section .section-kicker {
  color: rgba(255, 250, 240, 0.78);
}

.cta-section h2 {
  font-size: clamp(28px, 5vw, 52px);
}

.primary-link.dark {
  flex: 0 0 auto;
  border-color: #fffaf0;
  background: #fffaf0;
  color: #4a2a0d;
  box-shadow: none;
}

.primary-link.dark:hover,
.primary-link.dark:focus-visible {
  background: #f2eadc;
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 56px);
  background: #18211f;
  color: rgba(255, 250, 240, 0.72);
  font-size: 14px;
}

.site-footer span:first-child {
  color: #fffaf0;
  font-weight: 850;
}

:focus-visible {
  outline: 3px solid rgba(49, 95, 124, 0.55);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .site-header {
    min-height: 62px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .result-layout,
  .two-column,
  .sample-layout {
    grid-template-columns: 1fr;
  }

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

  .filter-panel {
    padding: 18px;
  }

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

  .scenario-card {
    min-height: auto;
  }

  .scenario-number {
    margin-bottom: 24px;
  }

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

@media (max-width: 540px) {
  .header-action {
    display: none;
  }

  .hero-grid {
    padding: 30px 18px 34px;
    gap: 22px;
  }

  h1 {
    font-size: 38px;
  }

  .hero-lede {
    margin-top: 16px;
    font-size: 16px;
  }

  .hero-actions {
    display: none;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .sample-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  textarea {
    min-height: 108px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
