:root {
  --bg: #fbfdfc;
  --paper: #ffffff;
  --ink: #13211f;
  --muted: #5d6d68;
  --faint: #edf3f1;
  --line: #dbe5e1;
  --jade: #0c7468;
  --jade-strong: #075f55;
  --jade-soft: #e5f3f0;
  --gold: #b3832d;
  --gold-soft: #f3ead9;
  --danger: #b84a42;
  --shadow: 0 18px 48px rgba(15, 43, 38, 0.1);
  --radius: 6px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.nav-open {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  width: 100%;
  min-height: 72px;
  padding: 14px clamp(20px, 5vw, 56px);
  background: rgba(251, 253, 252, 0.92);
  border-bottom: 1px solid rgba(219, 229, 225, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--jade);
  background: var(--jade-soft);
  border: 1px solid rgba(12, 116, 104, 0.18);
  border-radius: var(--radius);
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.brand-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.25;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #32433f;
  font-size: 14px;
  white-space: nowrap;
}

.main-nav a {
  padding: 9px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--jade);
  border-bottom-color: var(--jade);
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease,
    background 160ms ease;
}

.header-action,
.button.primary {
  color: #fff;
  background: var(--jade);
  box-shadow: 0 10px 24px rgba(12, 116, 104, 0.2);
}

.header-action:hover,
.button.primary:hover {
  background: var(--jade-strong);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.button.secondary:hover {
  border-color: rgba(12, 116, 104, 0.4);
  box-shadow: 0 8px 20px rgba(15, 43, 38, 0.08);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

main {
  overflow: hidden;
}

.section-band {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf9 100%);
  border-bottom: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: clamp(34px, 6vw, 76px);
  align-items: center;
  min-height: min(760px, calc(100vh - 118px));
  max-width: none;
  padding: clamp(54px, 8vw, 92px) clamp(20px, 5vw, 56px) 46px;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 10px;
  content: "";
  background: repeating-linear-gradient(
    90deg,
    rgba(12, 116, 104, 0.2),
    rgba(12, 116, 104, 0.2) 1px,
    transparent 1px,
    transparent 22px
  );
}

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

.hero h1 {
  max-width: 820px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 4.1vw, 58px);
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
}

.hero-copy > p {
  max-width: 690px;
  margin: 24px 0 0;
  color: #445752;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.85;
}

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

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 640px;
  margin: 36px 0 0;
}

.hero-proof div {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-proof dt {
  color: var(--jade);
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}

.hero-proof dd {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-visual {
  position: relative;
  align-self: stretch;
  display: grid;
  align-content: center;
  min-height: 460px;
}

.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.visual-rail {
  position: absolute;
  right: 18px;
  bottom: 28px;
  display: grid;
  gap: 6px;
  width: min(210px, calc(100% - 36px));
  padding: 13px;
  color: #2b403b;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 28px rgba(15, 43, 38, 0.12);
  backdrop-filter: blur(8px);
}

.visual-rail span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-size: 12px;
  font-weight: 700;
}

.visual-rail span::before {
  width: 8px;
  height: 8px;
  content: "";
  background: var(--gold);
  border-radius: 50%;
}

.skills-section,
.connectors,
.quickstart,
.safety,
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.skills-section {
  padding: 62px 0 76px;
}

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

.section-heading.compact {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 28px;
  padding-top: 70px;
}

.section-heading h2,
.quickstart h2,
.safety h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p,
.quickstart p,
.safety p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.skill-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 46px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.skill-search:focus-within {
  border-color: rgba(12, 116, 104, 0.48);
  box-shadow: 0 0 0 4px rgba(12, 116, 104, 0.1);
}

.skill-search svg {
  width: 18px;
  height: 18px;
  color: var(--jade);
  flex: 0 0 auto;
}

.skill-search path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.skill-search input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-button {
  min-height: 36px;
  padding: 8px 13px;
  color: #30423e;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
  color: #fff;
  background: var(--jade);
  border-color: var(--jade);
}

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

.skill-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(15, 43, 38, 0.045);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.skill-card:hover {
  border-color: rgba(12, 116, 104, 0.35);
  box-shadow: 0 16px 34px rgba(15, 43, 38, 0.08);
  transform: translateY(-2px);
}

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

.skill-title {
  display: flex;
  gap: 12px;
  align-items: start;
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--jade);
  background: var(--jade-soft);
  border: 1px solid rgba(12, 116, 104, 0.18);
  border-radius: var(--radius);
  flex: 0 0 auto;
}

.skill-icon svg {
  width: 22px;
  height: 22px;
}

.skill-icon path,
.skill-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skill-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.skill-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  color: #5d4318;
  background: var(--gold-soft);
  border: 1px solid rgba(179, 131, 45, 0.2);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

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

.skill-meta div {
  min-height: 82px;
  padding: 12px;
  background: #f8fbfa;
  border: 1px solid var(--faint);
  border-radius: var(--radius);
}

.skill-meta strong {
  display: block;
  margin-bottom: 5px;
  color: #243631;
  font-size: 12px;
}

.skill-meta span {
  color: var(--muted);
  font-size: 13px;
}

.command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.command-row code {
  overflow: hidden;
  padding: 11px 12px;
  color: #cfeee8;
  background: #10211f;
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-command,
.copy-all {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--jade);
  background: var(--paper);
  border: 1px solid rgba(12, 116, 104, 0.25);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.copy-command:hover,
.copy-all:hover {
  color: #fff;
  background: var(--jade);
}

.empty-state {
  margin: 26px 0 0;
  padding: 18px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.workflow {
  padding-bottom: 78px;
}

.workflow-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(15, 43, 38, 0.055);
}

.workflow-track li {
  position: relative;
  min-height: 220px;
  padding: 24px 20px 22px;
  border-right: 1px solid var(--line);
}

.workflow-track li:last-child {
  border-right: 0;
}

.workflow-track li::after {
  position: absolute;
  top: 36px;
  right: -8px;
  width: 16px;
  height: 16px;
  content: "";
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: rotate(45deg);
  z-index: 2;
}

.workflow-track li:last-child::after {
  display: none;
}

.workflow-track span {
  display: block;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.workflow-track strong {
  display: block;
  margin-top: 16px;
  font-size: 19px;
  line-height: 1.25;
}

.workflow-track p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.connectors {
  padding: 72px 0 76px;
}

.connector-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 18px;
}

.source-panel {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(15, 43, 38, 0.045);
}

.source-panel h3 {
  margin: 0 0 18px;
  font-size: 22px;
}

.source-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list li {
  display: grid;
  gap: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--faint);
}

.source-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.source-list a {
  color: var(--jade);
  font-weight: 800;
}

.source-list span,
.internal-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.source-panel.internal {
  background:
    linear-gradient(135deg, rgba(12, 116, 104, 0.06), transparent 34%),
    var(--paper);
}

.internal-grid {
  display: grid;
  gap: 12px;
}

.internal-grid div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--faint);
  border-radius: var(--radius);
}

.internal-grid strong {
  display: block;
  margin-bottom: 6px;
}

.rules {
  padding: 72px 0 80px;
}

.rules .section-heading {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 26px;
}

.rules-table {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(15, 43, 38, 0.055);
}

.table-row {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(280px, 1fr) minmax(220px, 0.72fr);
  border-bottom: 1px solid var(--faint);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row span {
  padding: 16px;
  color: #40504c;
  font-size: 14px;
}

.table-row span + span {
  border-left: 1px solid var(--faint);
}

.table-head {
  background: #10211f;
}

.table-head span {
  color: #e9f5f2;
  font-size: 13px;
  font-weight: 800;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.quickstart {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: start;
  padding: 74px 0;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: #344843;
}

.check-list li::before {
  position: absolute;
  top: 6px;
  left: 0;
  width: 16px;
  height: 16px;
  content: "";
  background: var(--jade-soft);
  border: 1px solid rgba(12, 116, 104, 0.28);
  border-radius: 50%;
}

.check-list li::after {
  position: absolute;
  top: 10px;
  left: 5px;
  width: 6px;
  height: 3px;
  content: "";
  border-bottom: 2px solid var(--jade);
  border-left: 2px solid var(--jade);
  transform: rotate(-45deg);
}

.code-card {
  overflow: hidden;
  background: #10211f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 10px 12px 10px 18px;
  color: #a8c6c0;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.code-card pre {
  margin: 0;
  overflow: auto;
  padding: 20px;
  color: #d8f3ee;
  font-size: 13px;
  line-height: 1.75;
}

.safety {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 74px;
  padding: 28px;
  background: #fff8ef;
  border: 1px solid rgba(179, 131, 45, 0.24);
  border-radius: var(--radius);
}

.safety h2 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.safety p {
  max-width: 820px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 0 38px;
  color: #41534e;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.footer-links a {
  color: var(--jade);
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  padding: 10px 14px;
  color: #fff;
  background: var(--jade);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(15, 43, 38, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

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

@media (max-width: 1020px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav,
  .header-action {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  body.nav-open .main-nav {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: grid;
    gap: 0;
    padding: 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  body.nav-open .main-nav a {
    padding: 14px;
    border-bottom: 1px solid var(--faint);
  }

  body.nav-open .main-nav a:last-child {
    border-bottom: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 46px;
  }

  .hero h1 {
    max-width: 900px;
  }

  .hero-visual {
    min-height: 0;
  }

  .hero-visual img {
    aspect-ratio: 16 / 9;
  }

  .skills-grid,
  .connector-layout,
  .quickstart {
    grid-template-columns: 1fr;
  }

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

  .workflow-track li {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-track li:last-child {
    border-bottom: 0;
  }

  .workflow-track li::after {
    top: auto;
    right: auto;
    bottom: -8px;
    left: 32px;
    transform: rotate(135deg);
  }

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

  .table-row span + span {
    border-left: 0;
    border-top: 1px solid var(--faint);
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 66px;
    padding: 11px 16px;
  }

  body.nav-open .main-nav {
    inset: 66px 12px auto 12px;
  }

  .brand small {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero {
    padding: 36px 18px 34px;
  }

  .hero h1 {
    font-size: 32px;
    line-height: 1.12;
  }

  .hero h1 span {
    display: inline;
  }

  .hero-copy > p {
    font-size: 15px;
    line-height: 1.68;
  }

  .hero-actions,
  .safety,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-proof {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 22px;
  }

  .hero-proof div {
    padding: 11px 8px;
  }

  .hero-proof dt {
    font-size: 22px;
  }

  .hero-proof dd {
    font-size: 11px;
    line-height: 1.35;
  }

  .hero-visual img {
    aspect-ratio: 2.1 / 1;
  }

  .visual-rail {
    display: none;
  }

  .skills-section,
  .connectors,
  .quickstart,
  .safety,
  .site-footer,
  .section-heading.compact,
  .workflow-track,
  .rules .section-heading,
  .rules-table {
    width: min(100% - 32px, var(--max));
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .skill-search {
    width: 100%;
  }

  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .skill-card {
    padding: 16px;
  }

  .skill-top,
  .command-row {
    grid-template-columns: 1fr;
  }

  .skill-top {
    display: grid;
  }

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

  .tag {
    width: max-content;
  }

  .copy-command {
    width: 100%;
  }

  .quickstart {
    padding: 56px 0;
  }

  .code-card pre {
    font-size: 12px;
  }
}

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