/* ============================================================
   Trae 智能体学习手账 · 小清新文艺风
   全局样式
   ============================================================ */

:root {
  --paper: #fbfaf5;
  --paper-2: #f5f1e6;
  --card: #ffffff;
  --ink: #33372f;
  --ink-soft: #5e665b;
  --muted: #8b9389;
  --sage: #7ba58c;
  --sage-deep: #4f7a64;
  --mint: #d9e8dc;
  --mint-soft: #eef4ee;
  --blush: #f2d9d3;
  --blush-soft: #f9eeeb;
  --butter: #f7ecc9;
  --sky: #dce9ef;
  --line: rgba(51, 55, 47, 0.1);
  --shadow: 0 18px 44px -28px rgba(63, 82, 64, 0.5);
  --shadow-soft: 0 10px 30px -22px rgba(63, 82, 64, 0.45);
  --radius: 22px;
  --radius-sm: 14px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(217, 232, 220, 0.55), transparent 34%),
    radial-gradient(circle at 88% 2%, rgba(247, 236, 201, 0.5), transparent 30%),
    radial-gradient(circle at 96% 62%, rgba(242, 217, 211, 0.35), transparent 32%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--sage-deep);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

::selection {
  background: var(--butter);
  color: var(--ink);
}

/* ---------- 布局 ---------- */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 68px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 38px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 14px;
}

.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--sage);
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---------- 顶部导航 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--sage), var(--blush), var(--butter));
  z-index: 100;
  transition: width 0.1s linear;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 250, 245, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 13px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--mint-soft), var(--butter));
  border: 1px solid rgba(123, 165, 140, 0.35);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.logo-mark svg {
  width: 19px;
  height: 19px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding: 7px 15px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14.5px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover {
  color: var(--sage-deep);
  background: var(--mint-soft);
}

.nav-links a.is-active {
  color: var(--sage-deep);
  background: var(--mint);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 9px 10px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  line-height: 1.4;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--sage-deep);
  color: #fdfcf7;
  box-shadow: 0 12px 26px -14px rgba(79, 122, 100, 0.85);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -16px rgba(79, 122, 100, 0.9);
  background: #456e59;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(51, 55, 47, 0.16);
  color: var(--ink);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--sage);
  color: var(--sage-deep);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13.5px;
}

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  padding: 66px 0 34px;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 54px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--mint-soft);
  border: 1px solid rgba(123, 165, 140, 0.28);
  color: var(--sage-deep);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(123, 165, 140, 0.18);
}

.hero h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.28;
  letter-spacing: 0.015em;
}

.hero h1 .soft {
  position: relative;
  color: var(--sage-deep);
  white-space: nowrap;
}

.hero h1 .soft::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 4px;
  height: 10px;
  background: linear-gradient(90deg, rgba(247, 236, 201, 0.9), rgba(242, 217, 211, 0.7));
  border-radius: 6px;
  z-index: -1;
  transform: rotate(-0.6deg);
}

.hero .lede {
  margin-top: 20px;
  max-width: 33em;
  color: var(--ink-soft);
  font-size: 16.5px;
}

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

.hero-meta {
  display: flex;
  gap: 34px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px dashed rgba(51, 55, 47, 0.16);
}

.hero-meta strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.hero-meta span {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* Hero 视觉：代码窗口 + 对话气泡 */
.hero-visual {
  position: relative;
  padding-bottom: 34px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -26px -18px auto auto;
  width: 170px;
  height: 170px;
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background: linear-gradient(140deg, rgba(217, 232, 220, 0.9), rgba(247, 236, 201, 0.65));
  filter: blur(2px);
  z-index: 0;
}

.studio-card {
  position: relative;
  z-index: 1;
  background: #fdfcf8;
  border: 1px solid rgba(51, 55, 47, 0.12);
  border-radius: 20px;
  box-shadow: 0 30px 60px -34px rgba(63, 82, 64, 0.55);
  overflow: hidden;
  transform: rotate(-0.8deg);
}

.studio-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: #f4f1e7;
  border-bottom: 1px solid rgba(51, 55, 47, 0.08);
}

.studio-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d8d3c4;
}

.studio-bar i:nth-child(1) { background: #e6b6ab; }
.studio-bar i:nth-child(2) { background: #e8d9a4; }
.studio-bar i:nth-child(3) { background: #b6ceb9; }

.studio-bar em {
  margin-left: 8px;
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.studio-body {
  padding: 20px 22px 24px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.95;
  color: #4a554a;
}

.studio-body .c {
  color: #93a08f;
}

.studio-body .k {
  color: #4f7a64;
}

.studio-body .s {
  color: #b57b62;
}

.studio-body .dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--sage);
  animation: blink 1.4s infinite ease-in-out;
}

.studio-body .dots span:nth-child(2) { animation-delay: 0.2s; }
.studio-body .dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.chat-float {
  position: absolute;
  z-index: 2;
  right: -6px;
  bottom: -26px;
  width: min(300px, 82%);
  padding: 15px 17px;
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(123, 165, 140, 0.35);
  box-shadow: 0 18px 36px -22px rgba(63, 82, 64, 0.6);
  backdrop-filter: blur(6px);
  transform: rotate(1deg);
  animation: floaty 6s ease-in-out infinite;
}

.chat-float .who {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--sage-deep);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.chat-float .who i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
}

.chat-float p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.chat-float .mini-tag {
  display: inline-block;
  margin-top: 9px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--sage-deep);
  font-size: 11px;
  letter-spacing: 0.04em;
}

@keyframes floaty {
  0%, 100% { transform: rotate(1deg) translateY(0); }
  50% { transform: rotate(1deg) translateY(-7px); }
}

/* ---------- 卡片与网格 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

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

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

.card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(123, 165, 140, 0.38);
}

.card h3 {
  font-size: 18.5px;
  margin-bottom: 9px;
}

.card p {
  color: var(--ink-soft);
  font-size: 14.5px;
}

.icon-badge {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 16px;
  background: var(--mint-soft);
  border: 1px solid rgba(123, 165, 140, 0.22);
}

.icon-badge svg {
  width: 22px;
  height: 22px;
  stroke: var(--sage-deep);
}

.icon-badge.blush { background: var(--blush-soft); border-color: rgba(181, 123, 98, 0.2); }
.icon-badge.blush svg { stroke: #a8755f; }
.icon-badge.butter { background: #fbf6e4; border-color: rgba(190, 168, 103, 0.25); }
.icon-badge.butter svg { stroke: #9a8550; }
.icon-badge.sky { background: #eef5f8; border-color: rgba(120, 156, 172, 0.25); }
.icon-badge.sky svg { stroke: #5f8797; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--sage-deep);
  border-bottom: 1px solid rgba(79, 122, 100, 0.3);
  padding-bottom: 2px;
}

.card-link::after {
  content: "→";
  transition: transform 0.25s ease;
}

.card-link:hover::after {
  transform: translateX(4px);
}

/* ---------- 路线图 ---------- */
.path-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: path;
}

.path-item {
  position: relative;
  padding: 24px 22px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(51, 55, 47, 0.18);
  color: var(--ink);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.path-item:hover {
  transform: translateY(-3px);
  border-color: rgba(123, 165, 140, 0.5);
  background: rgba(255, 255, 255, 0.92);
}

.path-item::after {
  content: "→";
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sage);
  font-size: 15px;
  background: var(--paper);
  padding: 2px;
}

.path-item:last-child::after {
  display: none;
}

.path-item .step-no {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--sage-deep);
  display: block;
  margin-bottom: 10px;
}

.path-item h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.path-item p {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ---------- 引用 / 提示块 ---------- */
.note {
  position: relative;
  padding: 36px 40px;
  border-radius: 26px;
  background: linear-gradient(130deg, #f7f2e4 0%, #eef4ee 100%);
  border: 1px solid rgba(123, 165, 140, 0.24);
  overflow: hidden;
}

.note::before {
  content: "“";
  position: absolute;
  left: 18px;
  top: -6px;
  font-family: var(--serif);
  font-size: 96px;
  color: rgba(123, 165, 140, 0.28);
  line-height: 1;
}

.note blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.65;
  color: #3d4b40;
  position: relative;
}

.note .note-src {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.tip {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: #fbf6e4;
  border: 1px solid rgba(190, 168, 103, 0.28);
  font-size: 14px;
  color: #6d6342;
}

.tip strong {
  color: #8a7540;
  white-space: nowrap;
}

.tip.mint {
  background: var(--mint-soft);
  border-color: rgba(123, 165, 140, 0.3);
  color: #4c6553;
}

.tip.mint strong { color: var(--sage-deep); }

.tip.blush {
  background: var(--blush-soft);
  border-color: rgba(181, 123, 98, 0.24);
  color: #7d5b4c;
}

.tip.blush strong { color: #a8755f; }

/* ---------- 子页页头 ---------- */
.page-head {
  padding: 54px 0 18px;
}

.breadcrumb {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--sage-deep);
}

.breadcrumb span {
  margin: 0 8px;
  opacity: 0.6;
}

.page-head h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 16px;
}

.page-head .lede {
  max-width: 44em;
  color: var(--ink-soft);
  font-size: 16.5px;
}

.page-head .head-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  margin-bottom: 30px;
  position: sticky;
  top: 74px;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.tab-btn {
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  transition: all 0.22s ease;
}

.tab-btn:hover {
  background: var(--mint-soft);
  color: var(--sage-deep);
}

.tab-btn.is-active {
  background: var(--sage-deep);
  color: #fbfaf5;
  box-shadow: 0 8px 18px -12px rgba(79, 122, 100, 0.9);
}

.tab-panel {
  display: none;
  animation: fadeUp 0.45s ease both;
}

.tab-panel.is-active {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 文章内容 ---------- */
.prose {
  max-width: 780px;
}

.prose h2 {
  font-size: 26px;
  margin: 44px 0 14px;
}

.prose h3 {
  font-size: 19px;
  margin: 30px 0 10px;
}

.prose p {
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.prose p:last-child {
  margin-bottom: 0;
}

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

ul.bullets {
  margin: 10px 0 18px;
  padding-left: 2px;
}

ul.bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 15px;
}

ul.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  opacity: 0.75;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

mark {
  background: linear-gradient(transparent 55%, rgba(247, 236, 201, 0.9) 55%);
  color: inherit;
  padding: 0 2px;
}

/* ---------- 智能体循环图 ---------- */
.loop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  margin: 22px 0 10px;
}

.loop-node {
  position: relative;
  padding: 16px 14px;
  border-radius: 14px;
  background: var(--mint-soft);
  border: 1px solid rgba(123, 165, 140, 0.25);
  text-align: center;
}

.loop-node:nth-child(2) { background: #fbf6e4; border-color: rgba(190, 168, 103, 0.28); }
.loop-node:nth-child(3) { background: var(--blush-soft); border-color: rgba(181, 123, 98, 0.22); }
.loop-node:nth-child(4) { background: #eef5f8; border-color: rgba(120, 156, 172, 0.25); }

.loop-node b {
  display: block;
  font-family: var(--serif);
  font-size: 15.5px;
  margin-bottom: 4px;
}

.loop-node small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}

.loop-node::after {
  content: "→";
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sage);
  font-size: 13px;
}

.loop-node:last-child::after {
  content: "↺";
  right: -12px;
}

.loop-caption {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ---------- 对比条 / 金字塔 ---------- */
.stack-bars {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.stack-bars div {
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  border: 1px solid transparent;
}

.stack-bars div span:last-child {
  font-size: 12px;
  color: var(--muted);
}

.stack-bars .b1 { width: 100%; background: var(--mint-soft); border-color: rgba(123, 165, 140, 0.3); }
.stack-bars .b2 { width: 84%; background: #fbf6e4; border-color: rgba(190, 168, 103, 0.3); }
.stack-bars .b3 { width: 68%; background: var(--blush-soft); border-color: rgba(181, 123, 98, 0.25); }

/* ---------- 代码块 ---------- */
.code {
  position: relative;
  margin: 18px 0;
  background: #303b34;
  color: #e4ece4;
  border-radius: 16px;
  padding: 18px 20px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.85;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.code pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.code .cmt { color: #93a795; }
.code .key { color: #cfe3a6; }
.code .str { color: #e6c1a8; }
.code .fn { color: #a8cfe0; }

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 11px;
  font-size: 11.5px;
  color: #cddbcd;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.copy-btn.is-done {
  background: #7ba58c;
  border-color: #7ba58c;
  color: #fff;
}

.inline-code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--mint-soft);
  color: var(--sage-deep);
  border: 1px solid rgba(123, 165, 140, 0.2);
}

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 14px;
}

thead th {
  text-align: left;
  padding: 14px 18px;
  background: var(--mint-soft);
  color: var(--sage-deep);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid rgba(123, 165, 140, 0.25);
  white-space: nowrap;
}

tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(51, 55, 47, 0.07);
  color: var(--ink-soft);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(238, 244, 238, 0.5);
}

/* ---------- 实操步骤 ---------- */
.step-list {
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 22px;
  padding: 30px 0;
  border-bottom: 1px dashed rgba(51, 55, 47, 0.15);
}

.step:last-child {
  border-bottom: none;
}

.step-no {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(123, 165, 140, 0.4);
  font-family: var(--serif);
  font-size: 18px;
  color: var(--sage-deep);
  box-shadow: 0 8px 18px -14px rgba(63, 82, 64, 0.6);
  position: relative;
}

.step-no::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px dashed rgba(123, 165, 140, 0.28);
}

.step-body h3 {
  font-size: 21px;
  margin-bottom: 8px;
}

.step-body > p {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 12px;
}

.step-body .step-goal {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.step-body .step-goal b {
  color: var(--sage-deep);
  font-weight: 600;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 16px 0;
}

.mini-card {
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.mini-card h4 {
  font-size: 15.5px;
  margin-bottom: 6px;
}

.mini-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
}

.mini-card.bad {
  background: var(--blush-soft);
  border-color: rgba(181, 123, 98, 0.24);
}

.mini-card.good {
  background: var(--mint-soft);
  border-color: rgba(123, 165, 140, 0.3);
}

.mini-card .verdict {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.mini-card.bad .verdict {
  background: rgba(181, 123, 98, 0.16);
  color: #a8755f;
}

.mini-card.good .verdict {
  background: rgba(123, 165, 140, 0.2);
  color: var(--sage-deep);
}

/* ---------- 提示词生成器 ---------- */
.generator {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 26px;
  padding: 30px;
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(238, 244, 238, 0.75));
  border: 1px solid rgba(123, 165, 140, 0.28);
  box-shadow: var(--shadow-soft);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  color: var(--sage-deep);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid rgba(51, 55, 47, 0.16);
  background: rgba(255, 255, 255, 0.9);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 62px;
  line-height: 1.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(123, 165, 140, 0.16);
}

.generator-output {
  display: flex;
  flex-direction: column;
}

.generator-output .out-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--sage-deep);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.generator-output pre {
  flex: 1;
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  background: #fdfcf7;
  border: 1px dashed rgba(123, 165, 140, 0.4);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: #46524a;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 230px;
}

.generator-output .hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 清单 ---------- */
.checklist {
  display: grid;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.check-item:hover {
  border-color: rgba(123, 165, 140, 0.4);
}

.check-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 6px;
  border: 1.5px solid rgba(123, 165, 140, 0.6);
  background: #fff;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.check-box::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0.6);
  opacity: 0;
  transition: all 0.2s ease;
  margin-top: -2px;
}

.check-item input:checked + .check-box {
  background: var(--sage);
  border-color: var(--sage);
}

.check-item input:checked + .check-box::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.check-item input:checked ~ .check-text {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(139, 147, 137, 0.6);
}

.check-text {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

/* ---------- 自测 ---------- */
.quiz {
  display: grid;
  gap: 18px;
}

.quiz-item {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
}

.quiz-item h4 {
  font-size: 16.5px;
  margin-bottom: 14px;
}

.quiz-opts {
  display: grid;
  gap: 8px;
}

.quiz-opt {
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(51, 55, 47, 0.14);
  background: #fdfcf8;
  color: var(--ink-soft);
  font-size: 14px;
  transition: all 0.2s ease;
}

.quiz-opt:hover {
  border-color: var(--sage);
  background: var(--mint-soft);
}

.quiz-opt.is-right {
  border-color: var(--sage);
  background: var(--mint);
  color: #3d5b48;
}

.quiz-opt.is-wrong {
  border-color: rgba(181, 123, 98, 0.55);
  background: var(--blush-soft);
  color: #8b5f4d;
}

.quiz-feedback {
  margin-top: 10px;
  font-size: 13px;
  color: var(--sage-deep);
  min-height: 20px;
}

.quiz-feedback.bad {
  color: #a8755f;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 10px;
}

details.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0 20px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

details.faq-item[open] {
  border-color: rgba(123, 165, 140, 0.38);
  background: rgba(255, 255, 255, 0.95);
}

details.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 30px 16px 0;
  font-size: 15px;
  color: var(--ink);
  position: relative;
  font-weight: 500;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--sage);
  font-weight: 300;
  transition: transform 0.25s ease;
}

details.faq-item[open] summary::after {
  content: "−";
}

details.faq-item .faq-body {
  padding: 0 30px 18px 0;
  font-size: 14px;
  color: var(--ink-soft);
  border-top: 1px dashed rgba(51, 55, 47, 0.12);
  padding-top: 14px;
}

details.faq-item .faq-body p {
  margin-bottom: 8px;
}

details.faq-item .faq-body p:last-child {
  margin-bottom: 0;
}

/* ---------- 模板卡片 ---------- */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.tpl {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.tpl .tpl-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.tpl h3 {
  font-size: 17px;
}

.tpl .tpl-tag {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--sage-deep);
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.tpl p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.tpl .tpl-prompt {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.85;
  color: #4c554b;
  background: #faf8f1;
  border: 1px dashed rgba(123, 165, 140, 0.32);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.tpl .copy-btn {
  position: static;
  align-self: flex-start;
  background: var(--mint-soft);
  border-color: rgba(123, 165, 140, 0.3);
  color: var(--sage-deep);
}

.tpl .copy-btn:hover {
  background: var(--mint);
  color: var(--sage-deep);
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: 46px 44px;
  border-radius: 30px;
  background: linear-gradient(135deg, #e8f1e9 0%, #f8f3e3 55%, #f8eae6 100%);
  border: 1px solid rgba(123, 165, 140, 0.28);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.cta::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 1px dashed rgba(123, 165, 140, 0.35);
}

.cta h2 {
  font-size: clamp(23px, 2.6vw, 30px);
  margin-bottom: 8px;
}

.cta p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 40em;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(247, 246, 240, 0.6), rgba(238, 243, 236, 0.9));
  padding: 46px 0 30px;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 34px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px dashed rgba(51, 55, 47, 0.14);
}

.footer-brand {
  max-width: 330px;
}

.footer-brand p {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--sage-deep);
  margin-bottom: 10px;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 3px 0;
}

.footer-col a:hover {
  color: var(--sage-deep);
}

.footer-bottom {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(123, 165, 140, 0.45);
  background: rgba(255, 255, 255, 0.9);
  color: var(--sage-deep);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s ease;
  z-index: 40;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--mint);
}

/* ---------- 出现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* 保证出现动画结束后，悬停位移仍然生效 */
.card.reveal.in:hover {
  transform: translateY(-4px);
}

.path-item.reveal.in:hover {
  transform: translateY(-3px);
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero-visual {
    max-width: 520px;
  }

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

  .path-item::after {
    display: none;
  }

  .split,
  .generator,
  .tpl-grid {
    grid-template-columns: 1fr;
  }

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

  .loop-node:nth-child(2)::after {
    content: "↺";
  }

  .tabs {
    position: static;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 52px 0;
  }

  .nav {
    padding: 11px 18px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 14px;
    right: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(252, 251, 246, 0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    padding: 10px 14px;
    font-size: 15px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .path-grid,
  .loop {
    grid-template-columns: 1fr;
  }

  .loop-node::after {
    content: "↓";
    right: 50%;
    top: auto;
    bottom: -13px;
    transform: translateX(50%);
  }

  .loop-node:nth-child(2)::after {
    content: "↓";
  }

  .hero-meta {
    gap: 22px;
    flex-wrap: wrap;
  }

  .hero-meta strong {
    font-size: 22px;
  }

  .step {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .step-no {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .note {
    padding: 28px 24px;
  }

  .cta {
    padding: 34px 26px;
  }

  .tabs {
    padding: 6px;
  }

  .tab-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .generator {
    padding: 22px;
  }

  .footer-cols {
    gap: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
