:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --line: #ebebeb;
  --text: #171717;
  --muted: #4d4d4d;
  --soft: #888888;
  --accent: #0070f3;
  --radius: 6px;
  --card-shadow: 0px 2px 1px rgba(0, 0, 0, 0.04), 0px 1px 0.5px rgba(0, 0, 0, 0.02);
  --hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  width: min(1256px, calc(100% - 224px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 200ms;
}

.backlink:hover {
  box-shadow: var(--hover-shadow);
}

.backmark {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.status {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.55px;
  color: var(--soft);
}

.hero {
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fafafa;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.55px;
  color: var(--soft);
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.6px;
  font-weight: 600;
}

.hero p {
  margin: 0;
  max-width: 720px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

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

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--text);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 200ms;
}

.hero-link:hover {
  opacity: 0.88;
}

.hero-link.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.hero-link.secondary:hover {
  opacity: 1;
  box-shadow: var(--hover-shadow);
}

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

.grid.no-aside .panel.wide {
  grid-column: span 12;
}

.panel {
  grid-column: span 12;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.panel.wide {
  grid-column: span 8;
}

.panel.side {
  grid-column: span 4;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.55px;
  color: var(--soft);
  text-transform: uppercase;
}

.prose {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.prose p {
  margin: 0 0 12px;
}

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

.prose a {
  color: var(--accent);
  text-decoration: underline;
}

.prose ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

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

.prose code {
  background: #f5f5f5;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.9em;
  font-family: var(--mono);
}

/* ═══════════════════════════════════════════════════════
   Geometric Pipeline Cards — 方案一：几何管道风格
   ═══════════════════════════════════════════════════════ */

.stack {
  counter-reset: pipeline-step;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 24px;
  overflow: visible;
}

/* ── Phase label row ── */
.phase-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  margin-top: 8px;
}

.phase-label:first-child {
  margin-top: 0;
}

.phase-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.phase-name {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
}

/* ── Pipeline row ── */
.pipeline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  position: relative;
  margin-bottom: 12px;
  overflow: visible;
}

/* ── Card surface ── */
.pipeline-row .item {
  display: block;
  position: relative;
  flex: 1 1 0;
  min-width: 220px;
  counter-increment: pipeline-step;

  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  border-left: 3px solid var(--pipe-color, #e5e7eb);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);

  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.pipeline-row .item.clickable {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.pipeline-row .item.clickable:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ── Number badge (01 / 02 / 03 …) ── */
.pipeline-row .item::before {
  content: counter(pipeline-step, decimal-leading-zero);
  position: absolute;
  top: -10px;
  left: -10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  z-index: 2;
  line-height: 1;
}

/* ── Connector: → arrow between cards ── */
.pipeline-row .item:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 300;
  color: #d1d5db;
  z-index: 0;
  pointer-events: none;
}

/* ── Card head: title + tag ── */
.pipeline-row .item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pipeline-row .item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

/* ── Tag ── */
.pipeline-row .item-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Description ── */
.pipeline-row .item-desc {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #6b7280;
}

/* ──  Responsive: stack vertically, arrow ↓ ── */
@media (max-width: 800px) {
  .pipeline-row {
    flex-direction: column;
    gap: 24px;
  }

  .pipeline-row .item {
    flex: none;
  }

  .pipeline-row .item:not(:last-child)::after {
    content: "↓";
    position: absolute;
    left: 50%;
    bottom: -20px;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 300;
    color: #d1d5db;
    z-index: 0;
    pointer-events: none;
  }
}

.tip {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fafafa;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.side-section {
  margin-bottom: 24px;
}

.side-section:last-child {
  margin-bottom: 0;
}

.side-stack {
  display: grid;
  gap: 10px;
}

.side-item {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.side-item.clickable {
  text-decoration: none;
  color: inherit;
  box-shadow: var(--card-shadow);
  transition: box-shadow 200ms;
}

.side-item.clickable:hover {
  box-shadow: var(--hover-shadow);
}

.side-item-date {
  font-size: 12px;
  color: var(--soft);
  font-family: var(--mono);
  margin-bottom: 4px;
}

.side-item-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.side-item-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text);
}

.side-item-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.side-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.side-tag {
  padding: 2px 7px;
  border-radius: 999px;
  background: #f5f5f5;
  border: 1px solid var(--line);
  color: var(--soft);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 920px) {
  .panel.wide,
  .panel.side {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding-top: 20px;
  }

  .hero {
    padding: 24px 18px;
  }

  .hero p {
    font-size: 15px;
  }

  .panel {
    padding: 18px;
  }
}
