:root {
  --surface: #fbf9f3;
  --surface-low: #f5f3ed;
  --surface-card: #ffffff;
  --surface-line: #c0c8c4;
  --ink: #1b1c18;
  --muted: #414846;
  --muted-soft: #717976;
  --primary: #002921;
  --primary-soft: #163f36;
  --primary-light: #c0ecde;
  --secondary: #895100;
  --secondary-soft: #ffdcbc;
  --tertiary: #0a2248;
  --error: #ba1a1a;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(0, 41, 33, 0.08);
  --sans: "Inter", "Manrope", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 41, 33, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 41, 33, 0.035) 1px, transparent 1px),
    var(--surface);
  background-size: 32px 32px;
  font-family: var(--sans);
  line-height: 1.6;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(192, 200, 196, 0.72);
  background: rgba(251, 249, 243, 0.9);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: min(206px, 42vw);
  height: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--primary);
  color: var(--surface);
  font-size: 14px;
}

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

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--primary-soft);
  border-color: var(--primary-soft);
}

.btn.secondary {
  background: transparent;
  color: var(--primary);
}

.btn.secondary:hover {
  background: var(--surface-low);
}

.btn.growth {
  border-color: var(--secondary);
  background: var(--secondary);
}

.btn.growth:hover {
  background: #6e4000;
  border-color: #6e4000;
}

.hero {
  padding: 84px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.node {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--secondary);
  box-shadow: 0 0 0 5px rgba(137, 81, 0, 0.11);
}

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

h1 {
  max-width: 850px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  font-size: 20px;
  line-height: 1.25;
}

.lead {
  margin-top: 20px;
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

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

.panel {
  border: 1px solid rgba(192, 200, 196, 0.8);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.keyword-preview {
  padding: 18px;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--surface-line);
  color: var(--muted-soft);
  font-size: 13px;
  font-weight: 700;
}

.preview-body {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.preview-row {
  padding: 12px;
  border: 1px solid rgba(192, 200, 196, 0.72);
  border-radius: 6px;
  background: #fbfcf7;
}

.preview-label {
  margin-bottom: 5px;
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: 800;
}

.preview-value {
  color: var(--primary);
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.section {
  padding: 64px 0;
}

.section.compact {
  padding: 36px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head p {
  max-width: 560px;
  color: var(--muted);
}

.grid-2,
.grid-3,
.grid-4,
.grid-1 {
  display: grid;
  gap: 16px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

.card {
  padding: 20px;
  border: 1px solid rgba(192, 200, 196, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

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

.tool-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 16px;
}

.tool-card h3 {
  margin-top: 14px;
  overflow-wrap: anywhere;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.meta-list div {
  display: grid;
  gap: 4px;
}

.meta-list dt {
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: 850;
}

.meta-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.compact-list {
  margin-top: 14px;
}

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(192, 200, 196, 0.72);
  font-size: 14px;
}

.card-foot.split,
.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-foot a {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 850;
}

.project-head strong {
  color: var(--secondary);
  font-size: 14px;
  white-space: nowrap;
}

.portal-preview {
  padding: 18px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 16px;
}

.portal-grid a {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(192, 200, 196, 0.8);
  border-radius: 6px;
  background: #fbfcf7;
}

.portal-grid strong {
  color: var(--primary);
  font-size: 18px;
}

.portal-grid span {
  color: var(--muted);
  font-size: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--surface-line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-card {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(192, 200, 196, 0.9);
  border-radius: var(--radius);
  background: white;
}

.price-card.highlight {
  border-color: rgba(0, 41, 33, 0.5);
  box-shadow: 0 0 0 2px rgba(0, 41, 33, 0.06);
}

.price {
  margin-top: 18px;
  color: var(--primary);
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
}

.price small {
  color: var(--muted-soft);
  font-size: 15px;
  font-weight: 700;
}

.list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.list li {
  position: relative;
  padding-left: 18px;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.codebox {
  border: 1px solid #263a34;
  border-radius: var(--radius);
  background: #111916;
  color: #dff4ea;
  overflow: hidden;
}

.codebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

pre,
code {
  font-family: var(--mono);
}

pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.form {
  display: grid;
  gap: 12px;
}

.app-state {
  color: var(--muted);
}

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

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

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--surface-line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat {
  padding: 18px;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  background: white;
}

.stat span {
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: 800;
}

.stat strong {
  display: block;
  margin-top: 8px;
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  overflow: hidden;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--surface-line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted-soft);
  background: var(--surface-low);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.badge.warn {
  background: var(--secondary-soft);
  color: #6e4000;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  padding: 16px;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  background: white;
  color: var(--muted);
  font-size: 14px;
}

.prose {
  padding: 28px;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  background: white;
}

.prose h2 {
  margin-top: 32px;
  font-size: 28px;
}

.prose h2:first-child {
  margin-top: 0;
}

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

.prose p {
  margin-top: 12px;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 32, 26, 0.45);
}

.modal.show {
  display: grid;
}

.modal-card {
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 28px 80px rgba(0, 32, 26, 0.28);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.qr {
  display: grid;
  place-items: center;
  margin: 16px 0;
  padding: 6px 0;
  text-align: center;
}

.qr img {
  display: block;
  width: min(280px, 100%);
  height: auto;
}

.site-footer {
  margin-top: 72px;
  padding: 32px 0;
  border-top: 1px solid var(--surface-line);
  color: var(--muted);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo {
  display: block;
  width: min(220px, 70vw);
  height: auto;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 14px;
  border-radius: 6px;
  background: #111916;
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

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

  .hero {
    padding-top: 48px;
  }

  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .stats,
    .blog-grid,
    .article-layout {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .toc {
    position: static;
  }

  th:nth-child(4),
  td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1120px);
  }

  .hero-actions,
  .section-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .prose {
    padding: 18px;
  }
}
