:root {
  --bg: #f8f8f6;
  --surface: #ffffff;
  --surface-soft: #f4f5f8;
  --text: #17181b;
  --muted: #646977;
  --brand: #1f4fd1;
  --line: #e4e6ea;
  --line-strong: #d2d6de;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.72;
  background: var(--bg);
}

.shell {
  width: min(1180px, calc(100% - 2.6rem));
  margin-inline: auto;
}

header.shell {
  padding: 38px 0 22px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 14px 0 0;
  font-size: clamp(2.15rem, 4vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: none;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-bottom: 56px;
}

.toc {
  position: sticky;
  top: 28px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.toc-title {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toc a {
  display: block;
  text-decoration: none;
  color: #2e3745;
  padding: 12px 0;
  font-weight: 700;
}

.toc a + a {
  border-top: 1px solid var(--line);
}

.posts {
  display: grid;
  gap: 24px;
}

.post {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  max-width: 78ch;
  --post-accent: #1f4fd1;
}

.post-workflow { --post-accent: #1f4fd1; }
.post-avrise { --post-accent: #a65e2e; }
.post-agent { --post-accent: #2b7a74; }
.post-models { --post-accent: #6252b4; }

.post-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.post-meta span {
  padding: 0;
  font-size: 0.76rem;
  color: color-mix(in oklab, var(--post-accent) 68%, #5c6371);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 2.8vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.post p { margin: 0 0 14px; }

.lede {
  margin: 0 0 18px;
  color: color-mix(in oklab, var(--post-accent) 42%, #1d2430);
  font-weight: 600;
  max-width: 72ch;
  text-wrap: pretty;
  border-left: 3px solid color-mix(in oklab, var(--post-accent) 40%, white);
  padding-left: 12px;
}

.post h3 {
  margin: 24px 0 10px;
  font-size: 1.02rem;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
  color: #202733;
  font-weight: 700;
}

.post ul {
  margin: 0;
  padding-left: 20px;
  color: #2d3440;
}

.post li {
  margin-bottom: 8px;
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 0 0 10px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .toc-title {
    width: 100%;
    margin-bottom: 4px;
  }

  .toc a {
    padding: 4px 0;
    border-top: 0 !important;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(1180px, calc(100% - 1.4rem));
  }

  header.shell {
    max-width: none;
  }

  .post {
    padding: 18px 18px 20px;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3rem);
  }

  .intro,
  .page-note {
    max-width: none;
  }
}
