:root {
  --paper: #f4efe6;
  --paper-2: #fbf8f1;
  --ink: #15130f;
  --soft: #524d45;
  --muted: #7c7266;
  --line: #d8ccbc;
  --brown: #3a2618;
  --moss: #2f6b55;
  --rust: #a24832;
  --ochre: #b98836;
  --shadow: 0 18px 55px rgba(58, 38, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
  line-height: 1.7;
}

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

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 3px;
  background: transparent;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--ochre);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(216, 204, 188, 0.7);
  background: rgba(244, 239, 230, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Aptos, Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  width: 11px;
  height: 11px;
  background: var(--ochre);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.top-nav a {
  padding: 8px 10px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.top-nav a.active,
.top-nav a:hover {
  color: var(--ink);
  background: var(--paper-2);
}

main {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(36px, 7vw, 96px);
  padding: clamp(44px, 7vw, 88px) clamp(20px, 5vw, 64px);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--soft);
  font-family: Aptos, Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--ochre);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 28px;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin-bottom: 32px;
  color: var(--soft);
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1.55;
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.primary-action {
  background: var(--ink);
  color: var(--paper);
}

.secondary-action {
  background: transparent;
}

.freedom-board {
  position: relative;
  display: grid;
  gap: 36px;
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.freedom-board::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(185, 136, 54, 0.3);
  transform: rotate(18deg);
}

.board-column {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 24px;
  align-items: baseline;
}

.board-column span {
  grid-row: span 3;
  color: var(--moss);
  font-size: 26px;
  font-weight: 900;
}

.board-column strong {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
}

.board-column.internal span {
  color: var(--rust);
}

.board-line {
  width: 160px;
  height: 1px;
  background: var(--line);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-strip div {
  min-height: 116px;
  padding: 26px clamp(20px, 5vw, 64px);
  border-right: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.45);
}

.summary-strip div:last-child {
  border-right: 0;
}

.strip-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-strip strong {
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.25;
}

.section {
  padding: clamp(64px, 8vw, 108px) clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 920px;
  margin-bottom: 42px;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.16;
  letter-spacing: 0;
}

.section-head p:not(.kicker),
.split-section > div:first-child p {
  color: var(--soft);
  font-size: 20px;
}

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

.system-card,
.concept-card,
.split-compare article,
.formula-chain div,
.path article {
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.system-card {
  padding: clamp(26px, 4vw, 42px);
}

.card-index,
.concept-card span,
.formula-chain span,
.path span,
.split-compare span {
  color: var(--ochre);
  font-family: Aptos, Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.system-card h3 {
  margin: 10px 0 22px;
  color: var(--moss);
  font-size: 32px;
}

.system-card.accent h3 {
  color: var(--rust);
}

.system-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 23px;
  font-weight: 800;
}

.system-card li + li {
  margin-top: 12px;
}

.quick-search {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
}

.quick-search label {
  font-size: 20px;
  font-weight: 900;
}

.quick-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(244, 239, 230, 0.35);
  background: rgba(244, 239, 230, 0.08);
  color: var(--paper);
  padding: 0 16px;
  font: inherit;
  outline: none;
}

.quick-search input::placeholder {
  color: rgba(244, 239, 230, 0.58);
}

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

.concept-card {
  min-height: 248px;
  padding: 28px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

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

.concept-card.is-hidden {
  display: none;
}

.concept-card h3 {
  margin: 12px 0 18px;
  font-size: 26px;
  line-height: 1.28;
}

.concept-card p {
  margin-bottom: 0;
  color: var(--soft);
  font-size: 17px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

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

.split-compare article {
  min-height: 320px;
  padding: 32px;
}

.split-compare article:first-child h3 {
  color: var(--rust);
}

.split-compare article:last-child h3 {
  color: var(--moss);
}

.split-compare h3 {
  margin: 16px 0 24px;
  font-size: 34px;
}

.split-compare p {
  color: var(--soft);
  font-size: 19px;
}

.formula-chain {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr 40px 1fr;
  align-items: stretch;
  gap: 12px;
}

.formula-chain div {
  min-height: 170px;
  padding: 24px;
}

.formula-chain strong {
  display: block;
  margin: 18px 0 8px;
  color: var(--moss);
  font-size: 28px;
  line-height: 1.15;
}

.formula-chain div:nth-of-type(2) strong {
  color: var(--ochre);
}

.formula-chain div:nth-of-type(3) strong {
  color: var(--rust);
}

.formula-chain b {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 28px;
}

.formula-chain small,
.path small {
  color: var(--soft);
  font-size: 15px;
  font-weight: 800;
}

.path {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 26px;
}

.path article {
  min-height: 134px;
  padding: 24px;
}

.path strong {
  display: block;
  margin: 12px 0 4px;
  color: var(--moss);
  font-size: 25px;
}

.callout {
  width: min(720px, 100%);
  margin: 44px auto 0;
  padding: 18px 24px;
  border: 1px solid var(--line);
  background: #efe4d6;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
}

.dark-section {
  background: var(--brown);
  color: var(--paper);
}

.dark-section .kicker,
.dark-section .dark-lead {
  color: #d8ccbc;
}

.dark-section .dark-lead {
  max-width: 820px;
  margin-bottom: 42px;
  font-size: 21px;
}

.decision-list {
  display: grid;
  gap: 18px;
  width: min(920px, 100%);
  margin: 0 auto;
}

.decision-list article {
  display: grid;
  grid-template-columns: 28px 180px 1fr;
  align-items: center;
  gap: 24px;
  min-height: 74px;
  padding: 18px 28px;
  background: var(--paper-2);
  color: var(--ink);
}

.decision-list span {
  width: 28px;
  height: 28px;
  background: var(--moss);
}

.decision-list article:nth-child(2) span {
  background: var(--ochre);
}

.decision-list article:nth-child(3) span {
  background: var(--rust);
}

.decision-list strong {
  color: var(--moss);
  font-size: 24px;
}

.decision-list article:nth-child(2) strong {
  color: var(--ochre);
}

.decision-list article:nth-child(3) strong {
  color: var(--rust);
}

.decision-list p {
  margin: 0;
  color: var(--soft);
  font-size: 19px;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}

.checklist li {
  counter-increment: item;
}

.checklist label {
  display: grid;
  grid-template-columns: 42px 22px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.checklist label::before {
  content: counter(item, decimal-leading-zero);
  color: var(--ochre);
  font-family: Aptos, Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
}

.checklist input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--moss);
}

.checklist label:has(input:checked) {
  background: #edf1ea;
  color: var(--moss);
}

.sources-section {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 40px;
}

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

.source-list a {
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--soft);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.source-list a:hover {
  color: var(--ink);
  border-color: var(--ochre);
}

.page-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 42px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 22px;
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .split-section,
  .sources-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .summary-strip,
  .system-map,
  .split-compare,
  .concept-grid,
  .path {
    grid-template-columns: 1fr;
  }

  .summary-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-strip div:last-child {
    border-bottom: 0;
  }

  .formula-chain {
    grid-template-columns: 1fr;
  }

  .formula-chain b {
    min-height: 28px;
  }

  .quick-search {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .top-nav {
    justify-content: flex-start;
  }

  .board-column {
    grid-template-columns: 1fr;
  }

  .board-column span {
    grid-row: auto;
  }

  .decision-list article {
    grid-template-columns: 28px 1fr;
    gap: 12px 18px;
  }

  .decision-list p {
    grid-column: 2;
  }

  .checklist label {
    grid-template-columns: 38px 22px minmax(0, 1fr);
    gap: 12px;
  }
}
