@import url("./workflow-runner.css?v=20260812-v1");

:root {
  --page-bg: #f6f7fb;
  --paper: #ffffff;
  --ink: #111432;
  --muted: #666c83;
  --line: #d9dce8;
  --accent: #6858ef;
  --accent-deep: #2a246f;
  --accent-soft: #efedff;
  --teal: #16796f;
  --teal-soft: #e5f5f1;
  --lavender: #d8def6;
  --lavender-strong: #becaf1;
  --library-width: 1320px;
  --detail-width: 1180px;
  --shadow: 0 18px 48px rgba(58, 63, 126, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 88px;
}

.no-js .workflow-enhancement {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page-bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
section:focus-visible,
summary:focus-visible,
pre[data-prompt-text]:focus-visible {
  outline: 3px solid rgba(102, 91, 213, 0.28);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: relative;
  top: auto;
  left: auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  min-height: 62px;
  margin: 10px auto 0;
  padding: 7px 12px 7px 18px;
  transform: none;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 #fff, 0 16px 38px rgba(57, 65, 131, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.brand-mark {
  display: flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 38px;
  height: 38px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.92), transparent 27%),
    linear-gradient(145deg, #7467f3, #91d7ed);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.5);
}

.brand-mark span {
  width: 4px;
  height: 13px;
  background: #fff;
  border-radius: 999px;
}

.brand-copy {
  line-height: 1.35;
}

.brand-copy strong,
.brand-tagline {
  display: block;
}

.brand-tagline {
  color: var(--muted);
  font-size: .625em;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
  color: var(--muted);
}

.topbar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
}

.topbar a:hover {
  color: var(--accent-deep);
}

.nav-action {
  display: none;
  margin-left: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--accent-deep);
  border: 1px solid var(--accent-deep);
  border-radius: 999px;
}

.topbar .nav-action { display: none; }

.workflow-library-page main {
  width: min(var(--library-width), calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 80px;
}

.workflow-library-home-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 52px;
}

.workflow-home-return {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-bottom: 24px;
  padding: 0 18px;
  color: var(--accent-deep);
  background: rgba(95, 91, 255, 0.07);
  border: 1px solid rgba(95, 91, 255, 0.2);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(44, 42, 116, 0.06);
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.workflow-home-return::before,
.workflow-home-return::after,
.workflow-library-return::before,
.workflow-library-return::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 91, 255, 0.46));
  transform: translateY(-50%);
}

.workflow-home-return::before,
.workflow-library-return::before { left: -52px; }

.workflow-home-return::after,
.workflow-library-return::after {
  right: -52px;
  transform: translateY(-50%) rotate(180deg);
}

.workflow-home-return:hover,
.workflow-home-return:focus-visible {
  color: #fff;
  background: #292d70;
  border-color: #292d70;
}

.workflow-library-hero {
  position: relative;
  max-width: none;
  padding: 30px 0 54px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-weight: 800;
}

h1,
h2,
h3 {
  font-family: "DengXian", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-synthesis: none;
}

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

.workflow-library-hero h1,
.workflow-hero h1,
.workflow-card h2,
.section-heading h2 {
  font-family: "DengXian", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 700;
  font-synthesis: none;
}

.workflow-library-hero h1 {
  margin-bottom: 18px;
  max-width: 1120px;
  font-size: 64px;
  line-height: 1.1;
}

.workflow-library-hero h1 span {
  display: block;
}

.workflow-library-hero h1 span:last-child {
  white-space: nowrap;
}

.workflow-library-hero > p:last-child,
.workflow-hero .lead {
  color: var(--muted);
  font-size: 20px;
}

.workflow-filters {
  margin-top: 34px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(190, 202, 241, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.workflow-search {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.workflow-search input {
  min-height: 60px;
  width: 100%;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--lavender-strong);
  border-radius: 7px;
}

.workflow-filter-panels {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.workflow-parent-filters {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.workflow-parent-filters > span {
  padding-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.workflow-filter-group {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  padding: 0;
  border: 0;
}

.workflow-filter-group summary {
  padding-top: 8px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.workflow-filter-group summary::-webkit-details-marker {
  display: none;
}

.workflow-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-filter-group button,
.workflow-parent-filters button,
.workflow-clear,
.workflow-empty button,
.copy-prompt-button {
  min-height: 42px;
  padding: 7px 13px;
  color: var(--muted);
  background: #f7f8fc;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.workflow-filter-group button:hover,
.workflow-filter-group button.is-active,
.workflow-parent-filters button:hover,
.workflow-parent-filters button.is-active {
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-color: #bdb7ef;
}

.workflow-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 18px;
}

#workflowResultCount {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.workflow-clear {
  color: var(--accent-deep);
  background: transparent;
}

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

.workflow-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 30px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d8dbef;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(55, 61, 122, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.workflow-card:hover {
  transform: translateY(-4px);
  border-color: #afa8ee;
  box-shadow: var(--shadow);
}

.workflow-card-meta,
.workflow-updated {
  margin-bottom: 10px;
  color: var(--teal);
  font-weight: 700;
}

.workflow-rewrite-note {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
}

.workflow-card h2 {
  margin-bottom: 12px;
  font-size: 27px;
  line-height: 1.35;
}

.workflow-card-subtitle {
  margin: -4px 0 12px;
  color: var(--teal);
  font-size: 16px;
  font-weight: 700;
}

.workflow-card > p:not(.workflow-card-meta):not(.workflow-card-tools) {
  color: var(--muted);
}

.workflow-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 4px 0 18px;
}

.workflow-card-tags span {
  padding: 3px 9px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 6px;
}

.workflow-card-tools {
  margin-bottom: 22px;
}

.workflow-card-link {
  align-self: flex-start;
  margin-top: auto;
  color: var(--accent-deep);
  font-weight: 800;
  min-height: 44px;
  padding: 9px 16px;
  color: #fff;
  background: var(--accent-deep);
  border-radius: 999px;
  text-decoration: none;
}

.workflow-empty {
  padding: 56px 24px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workflow-empty button {
  display: block;
  margin: 18px auto 0;
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.workflow-detail-page main {
  width: min(var(--detail-width), calc(100% - 48px));
  margin: 0 auto;
}

.workflow-return-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 54px;
}

.workflow-library-return {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 17px;
  color: var(--accent-deep);
  background: rgba(95, 91, 255, 0.07);
  border: 1px solid rgba(95, 91, 255, 0.2);
  border-radius: 999px;
  font-weight: 800;
}

.workflow-hero {
  position: relative;
  max-width: none;
  padding: 64px 0 72px;
}

.workflow-hero h1 {
  max-width: calc(100% - 220px);
  margin-bottom: 20px;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.14;
  text-wrap: balance;
}

.workflow-article-label {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.workflow-article-title {
  max-width: calc(100% - 190px);
  margin: 0 0 18px;
  color: var(--accent-deep);
  font-family: "DengXian", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 30px;
  line-height: 1.4;
}

.workflow-hero .lead {
  max-width: calc(100% - 190px);
}

.workflow-hero-orb {
  position: absolute;
  top: 54px;
  right: 2%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 148px;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 38% 25%, rgba(255, 255, 255, 0.9), transparent 24%),
    radial-gradient(circle at 33% 55%, rgba(79, 78, 237, 0.72), transparent 38%),
    radial-gradient(circle at 68% 65%, rgba(99, 213, 231, 0.56), transparent 37%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(188, 181, 245, 0.46));
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow:
    inset -16px -18px 36px rgba(94, 82, 211, 0.25),
    inset 12px 12px 30px rgba(255, 255, 255, 0.72),
    0 26px 54px rgba(55, 68, 150, 0.18);
  pointer-events: none;
}

.workflow-hero-orb span {
  width: 14px;
  height: 45px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
  animation: workflow-eye-look 6.8s ease-in-out infinite;
}

.workflow-hero-orb span:nth-child(2) {
  animation-delay: 40ms;
}

@keyframes workflow-eye-look {
  0%,
  12%,
  44%,
  100% {
    transform: translateX(0);
  }

  18%,
  27% {
    transform: translateX(-8px);
  }

  33%,
  40% {
    transform: translateX(8px);
  }
}

.workflow-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 32px 0 14px;
  overflow: hidden;
  max-width: 930px;
  background: #d8dbef;
  border: 1px solid #d8dbef;
  border-radius: 8px;
}

.workflow-facts span {
  padding: 20px;
  background: rgba(255, 255, 255, 0.88);
}

.workflow-facts strong {
  display: block;
  color: var(--muted);
}

.workflow-detail-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.workflow-toc {
  position: sticky;
  top: 96px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid #dde0ef;
  border-radius: 8px;
  backdrop-filter: blur(14px);
}

.workflow-toc strong {
  display: block;
  margin-bottom: 10px;
}

.workflow-toc nav {
  display: grid;
}

.workflow-toc a {
  padding: 7px 0;
  color: var(--muted);
}

.workflow-toc a:hover {
  color: var(--accent-deep);
}

.workflow-mobile-toc {
  display: none;
}

.workflow-detail-content {
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d8dbef;
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.workflow-section {
  scroll-margin-top: 96px;
  padding: 54px 48px;
  border-bottom: 1px solid var(--line);
}

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

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 36px;
  line-height: 1.25;
}

.overview-grid,
.sample-grid,
.stack-grid,
.note-grid,
.plan-grid,
.related-grid,
.guide-role-grid,
.guide-prompt-grid,
.guide-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.overview-grid article,
.sample-grid article,
.stack-grid article,
.note-grid article,
.plan-grid article,
.risk-list article,
.guide-role-card,
.guide-prompt-card,
.guide-tool-card,
.case-summary {
  padding: 22px;
  background: #fafaff;
  border: 1px solid #e0e2ef;
  border-radius: 8px;
}

.problem-statement,
.flow-intro {
  max-width: 820px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.guide-focus-box,
.guide-case-box,
.guide-profile-prompt,
.guide-tool-note {
  padding: 22px;
  background: linear-gradient(135deg, #f3f1ff, #f8fbff);
  border: 1px solid #d9d5f6;
  border-radius: 8px;
}

.guide-focus-box,
.guide-case-box {
  margin-bottom: 24px;
}

.guide-focus-box p,
.guide-case-box p,
.guide-tool-note {
  overflow-wrap: anywhere;
}

.guide-focus-box p:last-child,
.guide-case-box p:last-child {
  margin-bottom: 0;
}

.guide-tool-note {
  margin-bottom: 24px;
  color: var(--muted);
}

.overview-grid + .guide-tool-note {
  margin-top: 24px;
}

.guide-action-grid,
.guide-profile-faq-list {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.guide-action-card,
.guide-profile-faq {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  background: #fff;
  border: 1px solid #dfe2ef;
  border-radius: 8px;
}

.guide-action-card p,
.guide-profile-faq p {
  margin: 0;
  overflow-wrap: anywhere;
}

.guide-profile-faq h3 {
  margin-bottom: 8px;
}

.guide-profile-prompt {
  margin-bottom: 24px;
}

.guide-profile-prompt p {
  overflow-wrap: anywhere;
}

.guide-subheading {
  margin: 34px 0 12px;
  color: var(--accent-deep);
  font-size: 24px;
}

.guide-card-index {
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-role-card,
.guide-prompt-card,
.guide-tool-card,
.case-summary,
.guide-faq-row {
  min-width: 0;
}

.guide-role-card h3,
.guide-prompt-card h3,
.guide-tool-card h3,
.case-summary h3,
.guide-faq-row h3 {
  margin-bottom: 12px;
}

.guide-role-card p,
.guide-tool-card p,
.guide-prompt-card p,
.case-summary p,
.guide-faq-row p {
  overflow-wrap: anywhere;
}

.guide-role-card p:last-child,
.guide-tool-card p:last-child,
.guide-prompt-card p:last-child,
.case-summary p:last-child,
.guide-faq-row p:last-child {
  margin-bottom: 0;
}

.guide-prompt-grid,
.guide-tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legacy-workflow-reference {
  display: none !important;
}

.article-step-grid,
.article-tool-grid,
.article-procedure-grid,
.article-prompt-grid {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}

.article-step-card,
.article-tool-card,
.article-prompt-card {
  min-width: 0;
  padding: 22px;
  background: #fff;
  border: 1px solid #dfe2ef;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(38, 40, 96, 0.05);
}

.article-step-card h3,
.article-tool-card h3,
.article-prompt-card h3 {
  margin-bottom: 12px;
  color: var(--accent-deep);
  font-size: 22px;
  line-height: 1.45;
}

.article-step-card p,
.article-tool-card p,
.article-prompt-card p {
  margin-bottom: 12px;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.8;
}

.article-step-card p:last-child,
.article-tool-card p:last-child,
.article-prompt-card p:last-child {
  margin-bottom: 0;
}

.article-step-card pre,
.article-prompt-card pre {
  margin-top: 16px;
}

.beginner-output-example {
  margin: 12px 0 18px;
  padding: 16px 18px;
  color: var(--ink);
  background: #f0f7f4;
  border: 1px solid #cfe5dc;
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.article-case-list {
  margin: 18px 0;
  padding-left: 28px;
  font-size: 18px;
  line-height: 1.85;
}

.article-case-list li + li {
  margin-top: 10px;
}

.guide-prompt-card pre {
  margin-top: 8px;
}

.guide-faq-list,
.flow-output-list {
  display: grid;
  gap: 14px;
}

.guide-faq-row,
.flow-output-list article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  background: #fafaff;
  border: 1px solid #e0e2ef;
  border-radius: 8px;
}

.guide-faq-row .guide-card-index,
.flow-output-list article > span {
  color: var(--accent);
  font-weight: 800;
}

.flow-output-list {
  margin-top: 24px;
}

.flow-output-list article strong,
.flow-output-list article p {
  overflow-wrap: anywhere;
}

.flow-output-list article p {
  margin: 6px 0 0;
  color: var(--muted);
}

.workflow-section h3 {
  font-size: 21px;
  line-height: 1.4;
}

.plain-summary {
  max-width: 760px;
  margin-bottom: 24px;
}

.start-checklist {
  margin-bottom: 28px;
  padding: 20px 24px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}

.file-flow {
  max-width: 100%;
  margin: 24px 0 0;
  padding: 18px 20px;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: #f4f5ff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chain-list {
  display: grid;
  gap: 16px;
}

.chain-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  padding: 24px;
  background: #fafaff;
  border: 1px solid #e0e2ef;
  border-radius: 8px;
}

.chain-order {
  color: var(--accent-deep);
  font-weight: 800;
}

.chain-row h3,
.chain-row p {
  overflow-wrap: anywhere;
}

.chain-row h3 {
  margin-top: 0;
}

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

ul {
  padding-left: 22px;
}

li + li {
  margin-top: 7px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 16px 12px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

th {
  color: var(--accent-deep);
  background: #f0efff;
  font-weight: 800;
}

th:nth-child(1),
td:nth-child(1) {
  width: 16%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 14%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 29%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 27%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 14%;
}

.workflow-step {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 24px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.workflow-step-number {
  color: var(--accent);
  font-size: 24px;
  font-weight: 800;
}

.workflow-step dl {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  margin: 20px 0 0;
}

.workflow-step dt,
.workflow-step dd {
  padding: 10px 0;
  border-top: 1px solid #edf0f6;
}

.workflow-step dt {
  color: var(--muted);
  font-weight: 800;
}

.workflow-step dd {
  min-width: 0;
  margin: 0;
}

.workflow-step-body {
  min-width: 0;
}

.workflow-step-kicker {
  margin-top: 0;
  color: var(--accent-deep);
  font-weight: 800;
}

.workflow-step h4 {
  margin: 26px 0 10px;
}

.workflow-step pre {
  user-select: text;
}

.step-file,
.step-handoff {
  overflow-wrap: anywhere;
}

.step-file {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.handoff-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.handoff-list article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  background: #fafaff;
  border: 1px solid #e0e2ef;
  border-radius: 8px;
}

.handoff-list article > span {
  color: var(--accent);
  font-weight: 800;
}

.handoff-list h3,
.handoff-list p {
  overflow-wrap: anywhere;
}

.handoff-list h3 {
  margin: 0;
}

.handoff-list p {
  margin-bottom: 0;
}

.prompt-card {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.copy-prompt-button {
  width: 144px;
  margin-bottom: 12px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-weight: 800;
}

.copy-status {
  display: block;
  min-height: 28px;
  margin-bottom: 10px;
  color: var(--muted);
}

.copy-prompt-button.is-success {
  color: var(--teal);
  background: var(--teal-soft);
}

.copy-prompt-button.is-manual {
  color: #8a4a25;
  background: #fff2e8;
}

pre {
  max-width: 100%;
  margin: 0;
  padding: 20px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: #eef1ff;
  background: #191b42;
  border-radius: 7px;
}

code {
  font: inherit;
}

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

.checklist,
.risk-list {
  display: grid;
  gap: 14px;
}

.review-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px;
  background: #fafaff;
  border: 1px solid #e0e2ef;
  border-radius: 8px;
}

.review-index {
  display: grid;
  width: 42px;
  height: 42px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 50%;
  font-weight: 800;
  place-items: center;
}

.review-item {
  min-width: 0;
}

.review-method,
.review-item,
.review-item strong {
  display: block;
}

.related-workflow {
  display: block;
  padding-top: 18px;
  border-top: 2px solid var(--teal);
}

.related-workflow span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.site-footer {
  margin-top: 80px;
  padding: 40px max(24px, calc((100% - var(--library-width)) / 2));
  color: var(--muted);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.footer-top,
.footer-bottom,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: space-between;
}

.footer-bottom {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .workflow-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .workflow-toc {
    display: none;
  }

  .workflow-mobile-toc {
    display: block;
    padding: 14px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .workflow-mobile-toc summary {
    color: var(--accent-deep);
    cursor: pointer;
    font-weight: 800;
  }

  .workflow-mobile-toc nav {
    display: grid;
    padding-top: 12px;
  }

  .workflow-mobile-toc a {
    padding: 5px 0;
  }

  .overview-grid,
  .stack-grid,
  .note-grid,
  .plan-grid,
  .related-grid,
  .guide-role-grid,
  .guide-prompt-grid,
  .guide-tool-grid,
  .article-step-grid,
  .article-tool-grid,
  .article-procedure-grid,
  .article-prompt-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .chain-row,
  .workflow-step,
  .handoff-list article,
  .guide-faq-row,
  .flow-output-list article,
  .guide-action-card,
  .guide-profile-faq,
  .article-step-card,
  .article-tool-card,
  .article-prompt-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .chain-row,
  .workflow-step-body,
  .file-flow,
  .step-file,
  .step-handoff {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .workflow-step pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
  }

  .workflow-step .copy-prompt-button {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .workflow-home-return::before,
  .workflow-home-return::after,
  .workflow-library-return::before,
  .workflow-library-return::after {
    width: 24px;
  }

  .workflow-home-return::before,
  .workflow-library-return::before { left: -38px; }

  .workflow-home-return::after,
  .workflow-library-return::after { right: -38px; }

  html {
    scroll-padding-top: 156px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    padding: 10px 20px;
  }

  .brand {
    grid-column: 1 / -1;
  }

  .nav-links {
    grid-column: 1;
    min-width: 0;
    gap: 18px;
    margin-left: 0;
    overflow-x: auto;
  }

  .nav-action {
    grid-column: 2;
    margin: 0;
  }

  .workflow-library-page main,
  .workflow-detail-page main {
    width: min(100% - 28px, var(--library-width));
  }

  .workflow-library-hero h1 {
    font-size: 40px;
  }

  .workflow-library-hero h1 span:last-child {
    white-space: normal;
  }

  .workflow-hero h1 {
    max-width: 100%;
    padding-right: 0;
    font-size: 42px;
  }

  .workflow-hero .lead {
    max-width: 100%;
  }

  .workflow-hero-orb {
    position: relative;
    top: auto;
    right: auto;
    width: 104px;
    margin: 0 0 28px auto;
    gap: 20px;
  }

  .workflow-hero-orb span {
    width: 10px;
    height: 32px;
  }

  .workflow-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-parent-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-parent-filters > span {
    padding-top: 0;
  }

  .workflow-filter-group {
    display: block;
    padding: 2px 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-filter-group summary {
    min-height: 44px;
    padding: 8px 0;
  }

  .workflow-filter-options {
    padding: 4px 0 14px;
  }

  .workflow-section {
    scroll-margin-top: 156px;
  }

  .workflow-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-section {
    padding: 36px 20px;
  }

  .workflow-step,
  .workflow-step dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-step dd {
    padding-top: 0;
    border-top: 0;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tr {
    padding: 18px 0;
    border-top: 1px solid var(--line);
  }

  td {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding: 7px 0;
    border: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
  }

  .workflow-table-wrap {
    overflow: visible;
  }

  .workflow-table td {
    width: 100% !important;
    grid-template-columns: 112px minmax(0, 1fr);
    text-align: left;
    overflow-wrap: normal;
    word-break: normal;
  }

  .workflow-table td:nth-child(1)::before { content: "任务"; }
  .workflow-table td:nth-child(2)::before { content: "主工具"; }
  .workflow-table td:nth-child(3)::before { content: "免费或国产替代"; }
}

@media (max-width: 390px) {
  .workflow-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-card,
  .workflow-filters {
    padding: 20px;
  }

  .workflow-results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  td {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

a.tool-name-link,
a.tool-name-link:visited {
  color: #5961b8;
  text-decoration: none;
}

a.tool-name-link:hover,
a.tool-name-link:focus-visible {
  color: #343b8f;
  text-decoration: none;
}

.download-confirm-dialog { width: min(520px, calc(100% - 32px)); padding: 0; background: transparent; border: 0; }
.download-confirm-dialog::backdrop { background: rgba(17, 20, 50, .48); backdrop-filter: blur(4px); }
.download-confirm-card { display: grid; gap: 10px; padding: 26px; color: #171936; background: #fff; border: 1px solid #d9dce8; border-radius: 22px; box-shadow: 0 24px 70px rgba(17, 20, 50, .25); }
.download-confirm-card h2, .download-confirm-card p { margin: 0; }
.download-confirm-card p { line-height: 1.75; }
.download-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.download-confirm-actions button { min-height: 42px; padding: 0 16px; border: 1px solid #d9dce8; border-radius: 999px; cursor: pointer; font-weight: 800; }
.download-confirm-actions button.primary { color: #fff; background: #25215f; border-color: #25215f; }

.workflow-recommendations { margin-top: 8px; }
.workflow-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.workflow-recommendation-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 18px;
  color: var(--ink);
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.workflow-recommendation-card:hover,
.workflow-recommendation-card:focus-visible {
  border-color: #aeb5da;
  box-shadow: 0 12px 28px rgba(67,76,137,.1);
  outline: 0;
  transform: translateY(-2px);
}
.workflow-recommendation-card:focus-visible { box-shadow: 0 0 0 3px rgba(104,88,239,.18); }
.workflow-recommendation-card span { color: var(--accent); font-size: 16px; font-weight: 800; }
.workflow-recommendation-card strong { color: var(--ink); font-size: 16px; line-height: 1.45; }
.workflow-recommendation-card p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }

@media (max-width: 720px) {
  .workflow-recommendation-grid { grid-template-columns: 1fr; }
}
