/* Etch 官网 V2 原型 · 样式
   颜色 token 1:1 取自 etch/src/renderer/styles/app.css 的深色侧取值。
   字体：--font-app 取自 app.css --font-nib；--font-body 取自 website/index.html。
   刻意不使用渐变、玻璃卡片、大圆角与 Inter。 */

:root {
  /* --- 取自 app.css 深色侧 --- */
  --bg: #0b0d10;
  --shell: #0e1115;
  --surface: #111419;
  --surface-raised: #171b21;
  --surface-sunken: #0d1014;
  --surface-inset: #11151a;
  --surface-hover: #151a21;
  --surface-active: #1a1f26;
  --line: #252b33;
  --line-strong: #343c46;
  --line-shell: #1c2128;
  --fg: #e8eaed;
  --fg-strong: #f2f4f7;
  --fg-soft: #c5cad1;
  --muted: #88919d;
  --faint: #69727e;
  --placeholder: #59616c;
  --blue: #6ba6ff;
  --blue-strong: #438cf5;
  --blue-hover: #4f96f8;
  --blue-ink: #9fc4ff;
  --focus: #94bdff;
  --accent-wash: rgb(67 140 245 / 10%);
  --accent-ring: rgb(67 140 245 / 16%);
  --accent-line: #3d6697;
  --on-accent: #fff;
  --ok: #6cc79a;
  --ok-line: #3e6c55;
  --ok-bg: #101c16;
  --run: #7fb2ff;
  --run-line: #365f8f;
  --run-bg: #0f1b2a;
  --warn: #e0b872;
  --warn-line: #6e5838;
  --warn-bg: #19150f;
  --danger: #e49a9a;
  --danger-line: #704247;
  --danger-bg: #1b1113;
  --idle: #8b93a0;
  --idle-line: #343c46;
  --control-bg: #202630;
  --control-bg-hover: #262d38;
  --control-line: #343c46;
  --control-line-hover: #414a56;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* app.css --font-nib：真实 App 现在整体是等宽 */
  --font-app: Menlo, "PingFang SC", monospace;
  /* website/index.html 的正文栈，用于落地页叙述文本 */
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", system-ui, sans-serif;

  --maxw: 1180px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 var(--font-body);
  overflow-x: hidden;
}

::selection {
  background: rgb(67 140 245 / 28%);
  color: #fff;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 9px 13px;
  border-radius: 7px;
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  transform: translateY(-180%);
  transition: transform 160ms var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.mono {
  font-family: var(--font-app);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sec-head {
  max-width: 660px;
  margin: 0 0 40px;
}

.sec-head h2 {
  margin-top: 12px;
  font-size: clamp(27px, 3.3vw, 38px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.12;
  text-wrap: balance;
}

.sec-head p {
  margin-top: 13px;
  color: var(--muted);
  font-size: 16px;
  text-wrap: pretty;
}

.band {
  padding: 88px 0;
}

.band.alt {
  background: var(--surface-sunken);
  border-top: 1px solid var(--line-shell);
  border-bottom: 1px solid var(--line-shell);
}

/* ---------------- buttons ---------------- */

.btn,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 8px;
  font-size: 14.5px;
  white-space: nowrap;
  transition: transform 130ms var(--ease-out), background-color 130ms ease,
    border-color 130ms ease, color 130ms ease;
}

.btn {
  background: var(--blue-strong);
  border: 1px solid var(--accent-line);
  color: var(--on-accent);
  font-weight: 580;
}

.ghost {
  border: 1px solid var(--control-line);
  background: var(--control-bg);
  color: var(--fg-soft);
}

.btn svg,
.ghost svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:active,
.ghost:active {
  transform: scale(.975);
}

/* ---------------- nav ---------------- */

.nav {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgb(11 13 16 / 96%);
  border-bottom: 1px solid var(--line-shell);
}

.nav-in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.brand img {
  width: 27px;
  height: 27px;
  flex: none;
}

.brand .ipa {
  color: var(--muted);
  font: 12px/1 var(--font-app);
}

.nav-links {
  display: flex;
  gap: 2px;
  margin-left: 10px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  transition: color 150ms ease, background-color 150ms ease;
}

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

/* ---------------- hero ---------------- */

.hero {
  padding: 92px 0 52px;
}

.hero h1 {
  max-width: 900px;
  margin: 16px 0 0;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -.032em;
  line-height: 1.04;
  text-wrap: balance;
}

.hero h1 span {
  display: block;
}

.hero .lede {
  max-width: 740px;
  margin-top: 22px;
  color: var(--fg-soft);
  font-size: 18.5px;
  text-wrap: pretty;
}

.hero .lede b {
  color: var(--fg);
  font-weight: 580;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-cta .btn {
  padding: 12px 22px;
  font-size: 15.5px;
}

/* ---------------- 交互原型 ---------------- */

.proto-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.proto-head h2 {
  margin-top: 11px;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.14;
  text-wrap: balance;
}

.proto-note {
  max-width: 330px;
  color: var(--faint);
  font: 11.5px/1.6 var(--font-app);
  text-wrap: pretty;
}

.proto-note strong {
  color: var(--warn);
  font-weight: 600;
}

/* 任务类型切换 */
.kind-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kind-tab {
  display: grid;
  gap: 6px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  text-align: left;
  transition: transform 130ms var(--ease-out), border-color 130ms ease,
    background-color 130ms ease;
}

.kind-tab .kt-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kind-tab .kt-mark {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border: 1px solid var(--idle-line);
  border-radius: 5px;
  color: var(--faint);
  font: 600 11px/1 var(--font-app);
  transition: border-color 130ms ease, color 130ms ease, background-color 130ms ease;
}

.kind-tab strong {
  color: var(--fg-soft);
  font-size: 14px;
  font-weight: 600;
}

.kind-tab small {
  color: var(--faint);
  font: 11px/1.5 var(--font-app);
}

.kind-tab[aria-selected="true"] {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}

.kind-tab[aria-selected="true"] .kt-mark {
  border-color: var(--accent-line);
  background: var(--run-bg);
  color: var(--blue);
}

.kind-tab[aria-selected="true"] strong {
  color: var(--fg-strong);
}

.kind-tab:active {
  transform: scale(.99);
}

/* App 外壳 */
.app-shell {
  overflow: hidden;
  border: 1px solid var(--line-shell);
  border-radius: 11px;
  background: var(--shell);
  box-shadow: 0 30px 72px -42px rgb(0 0 0 / 88%);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line-shell);
  background: var(--surface-sunken);
}

.lights {
  display: flex;
  gap: 6px;
}

.lights i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.titlebar span {
  color: var(--faint);
  font: 11px/1 var(--font-app);
}

.app-body {
  display: grid;
  gap: 12px;
  padding: 14px;
  font-family: var(--font-app);
}

.prototype-notice {
  padding: 9px 12px;
  border: 1px solid var(--run-line);
  border-radius: 7px;
  background: var(--run-bg);
  color: var(--fg-soft);
  font-size: 11.5px;
  line-height: 1.55;
}

/* 任务头部 */
.wb-header {
  display: grid;
  gap: 10px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: start;
  padding: 4px 7px 4px 3px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  transition: color 130ms ease, background-color 130ms ease;
}

.back-link svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wb-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.provider-tag {
  display: block;
  color: var(--blue);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wb-title-row h3 {
  margin-top: 4px;
  color: var(--fg-strong);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.task-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 6px;
  color: var(--muted);
  font: 11.5px/1.5 var(--font-app);
}

.task-source svg {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-source span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* App 内的按钮：尺寸 1:1 参考 app.css */
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  font-size: 13px;
  transition: transform 130ms var(--ease-out), background-color 130ms ease,
    border-color 130ms ease, color 130ms ease;
}

.primary-button {
  padding: 0 15px;
  border-radius: 7px;
  background: var(--blue-strong);
  color: var(--on-accent);
  font-weight: 580;
}

.secondary-button {
  min-width: 84px;
  padding: 0 13px;
  border: 1px solid var(--control-line);
  border-radius: 6px;
  background: var(--control-bg);
  color: var(--fg-soft);
}

.primary-button svg,
.secondary-button svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: .42;
}

.primary-button:not(:disabled):active,
.secondary-button:not(:disabled):active {
  transform: scale(.975);
}

/* 成果切换 tabs */
.output-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.output-tabs button {
  display: grid;
  gap: 2px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  text-align: left;
  transition: transform 130ms var(--ease-out), border-color 130ms ease,
    background-color 130ms ease;
}

.output-tabs button > span {
  color: var(--muted);
  font-size: 12px;
}

.output-tabs button > small {
  color: var(--faint);
  font-size: 10px;
}

.output-tabs button.is-active {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}

.output-tabs button.is-active > span {
  color: var(--fg-soft);
}

.output-tabs button:not(:disabled):active {
  transform: scale(.98);
}

/* checkpoint / banner */
.review-checkpoint-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid var(--run-line);
  border-radius: 8px;
  background: var(--run-bg);
}

.review-checkpoint-copy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.review-checkpoint-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border: 1px solid var(--run-line);
  border-radius: 5px;
  color: var(--run);
}

.review-checkpoint-icon svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.review-checkpoint-copy strong {
  display: block;
  color: var(--fg-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.review-checkpoint-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  text-wrap: pretty;
}

.review-checkpoint-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.review-checkpoint-steps button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--control-line);
  border-radius: 6px;
  background: var(--control-bg);
  color: var(--muted);
  font-size: 11.5px;
  transition: transform 130ms var(--ease-out), border-color 130ms ease,
    color 130ms ease, background-color 130ms ease;
}

.review-checkpoint-steps button > span {
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 4px;
  background: var(--line);
  color: var(--faint);
  font-size: 10px;
}

.review-checkpoint-steps button.is-active {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--fg-soft);
}

.review-checkpoint-steps button.is-active > span {
  background: var(--blue-strong);
  color: var(--on-accent);
}

.review-checkpoint-steps button:active {
  transform: scale(.97);
}

.review-checkpoint-status {
  color: var(--muted);
  font-size: 11px;
}

.permission-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  background: var(--warn-bg);
}

.permission-banner > svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  fill: none;
  stroke: var(--warn);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.permission-banner strong {
  display: block;
  color: var(--warn);
  font-size: 12px;
  font-weight: 600;
}

.permission-banner span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* 流水线折叠 */
.pipeline-collapse {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.pipeline-collapse > summary {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 9px 14px;
  list-style: none;
  transition: background-color 130ms ease;
}

.pipeline-collapse > summary::-webkit-details-marker {
  display: none;
}

.pipeline-chevron {
  display: grid;
  width: 14px;
  height: 14px;
  flex: none;
  place-items: center;
  color: var(--faint);
  transition: transform 150ms var(--ease-out);
}

.pipeline-chevron svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pipeline-collapse[open] .pipeline-chevron {
  transform: rotate(90deg);
}

.pc-title {
  color: var(--fg-soft);
  font-size: 13px;
  font-weight: 600;
}

.pc-mini {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: var(--muted);
  font: 11px/1 var(--font-app);
}

.pc-mini > .pc-msg {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-bar {
  width: 120px;
  height: 3px;
  flex: none;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.mini-bar i {
  display: block;
  height: 100%;
  background: var(--run);
  transition: width 220ms var(--ease-out);
}

.pc-mini .warn {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  color: var(--warn);
}

.pc-mini .warn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pc-body {
  padding: 4px 14px 14px;
  border-top: 1px solid var(--line);
}

/* 视频任务：共享底稿只交代来源，当前成果承担视觉重心 */
.pipeline-map {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(250px, .78fr) 34px minmax(420px, 1.22fr);
  gap: 0;
  align-items: center;
  padding-top: 14px;
}

.pipeline-shared-card {
  min-width: 0;
  padding: 12px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-inset);
}

.pipeline-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 3px 12px;
}

.pipeline-group-head > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.pipeline-group-head strong {
  color: var(--fg-soft);
  font-size: 11px;
  font-weight: 620;
}

.pipeline-group-head small {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.4;
}

.pipeline-group-head em {
  flex: none;
  color: var(--ok);
  font: 9px/1 var(--font-app);
  font-style: normal;
  white-space: nowrap;
}

.pipeline-handoff {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 80px;
  place-items: center;
}

.pipeline-handoff::before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line-strong);
}

.pipeline-handoff::after {
  content: "";
  position: absolute;
  right: 1px;
  width: 5px;
  height: 5px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: rotate(45deg);
}

.pipeline-handoff span {
  position: relative;
  z-index: 1;
  padding: 2px 4px;
  background: var(--surface);
  color: var(--faint);
  font: 8px/1 var(--font-app);
  letter-spacing: .04em;
  white-space: nowrap;
}

.pipeline-outcome-stack {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.outcome-lane {
  display: grid;
  min-width: 0;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--run-line);
  border-radius: 7px;
  background: var(--run-bg);
}

.outcome-lane-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.outcome-mark,
.companion-plus {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font: 650 11px/1 var(--font-app);
}

.outcome-mark[data-kind="subtitle"] {
  border-color: var(--run-line);
  color: var(--run);
}

.outcome-mark[data-kind="summary"] {
  border-color: var(--warn-line);
  color: var(--warn);
}

.outcome-lane-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.outcome-lane-copy strong {
  color: var(--fg-strong);
  font-size: 11px;
  font-weight: 620;
}

.outcome-lane-copy small {
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font: 8.5px/1.35 var(--font-app);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outcome-lane-copy small i {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--warn);
}

.outcome-lane-head > em {
  flex: none;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--blue-ink);
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.companion-lane {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: transform 120ms var(--ease-out), border-color 130ms ease, background-color 130ms ease;
}

.companion-lane > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.companion-lane strong {
  color: var(--fg-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.companion-lane small {
  overflow: hidden;
  color: var(--faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.companion-lane > em {
  flex: none;
  margin-left: auto;
  color: var(--faint);
  font: 8.5px/1 var(--font-app);
  font-style: normal;
  white-space: nowrap;
}

.companion-plus {
  width: 24px;
  height: 24px;
  border-style: dashed;
}

.companion-plus svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.companion-lane:active {
  transform: scale(.99);
}

.pipeline-map .rail {
  grid-template-columns: repeat(var(--rail-columns, 6), minmax(48px, 1fr));
}

.pipeline-map .rail-node {
  gap: 5px;
  padding-inline: 2px;
}

.pipeline-map .rail-node::before {
  top: 11px;
  height: 1px;
}

.pipeline-map .rail-dot {
  width: 23px;
  height: 23px;
  font-size: 9px;
}

.pipeline-map .rail-label {
  font-size: 9.5px;
}

.pipeline-map .rail-sub {
  font-size: 8.5px;
}

.pc-focus {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  color: var(--run);
  font-size: 10px;
  white-space: nowrap;
}

.pc-focus.is-warn {
  color: var(--warn);
}

.pc-focus svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

/* 阶段轨道 */
.rail-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.rail {
  display: grid;
  grid-template-columns: repeat(var(--rail-columns, 10), minmax(74px, 1fr));
  min-width: 100%;
}

.rail-node {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 0 3px;
  text-align: center;
}

.rail-node::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 13px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.rail-node:first-child::before {
  display: none;
}

.rail-node[data-done="true"]::before {
  background: var(--ok-line);
}

.rail-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  justify-self: center;
  place-items: center;
  border: 1.5px solid var(--idle-line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--faint);
  font: 600 11px/1 var(--font-app);
  transition: transform 130ms var(--ease-out), border-color 130ms ease;
}

.rail-dot svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-label {
  color: var(--muted);
  font-size: 11px;
}

.rail-sub {
  min-height: 11px;
  color: var(--faint);
  font: 10px/1.2 var(--font-app);
  overflow-wrap: anywhere;
}

.rail-node[data-status="completed"] .rail-dot {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}

.rail-node[data-status="running"] .rail-dot {
  border-color: var(--run);
  background: var(--run-bg);
  color: var(--run);
  box-shadow: 0 0 0 4px rgb(127 178 255 / 10%);
}

.rail-node[data-status="failed"] .rail-dot {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.rail-node[data-status="checkpoint"] .rail-dot,
.rail-node[data-status="paused"] .rail-dot,
.rail-node[data-status="stale"] .rail-dot {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
}

.rail-node[data-status="ready"] .rail-dot {
  border-color: var(--run-line);
  color: var(--run);
}

.rail-node[data-status="skipped"] .rail-dot {
  border-style: dashed;
  color: var(--idle);
}

.rail-node[data-status="running"] .rail-label,
.rail-node[data-status="completed"] .rail-label {
  color: var(--fg-soft);
}

.rail-node[data-status="running"] .rail-sub {
  color: var(--run);
}

/* 可点阶段节点 */
button.rail-node {
  border: 0;
  background: none;
  border-radius: 6px;
  transition: background-color 130ms ease;
}

button.rail-node[aria-pressed="true"] {
  background: var(--surface-hover);
}

button.rail-node[aria-pressed="true"] .rail-dot {
  transform: scale(1.06);
}

button.rail-node[aria-pressed="true"] .rail-label {
  color: var(--fg-strong);
}

button.rail-node:active .rail-dot {
  transform: scale(.94);
}

/* 阶段详情 */
.stage-detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-inset);
}

.stage-detail dt {
  color: var(--muted);
  font-size: 11px;
}

.stage-detail dd {
  color: var(--fg-soft);
  font: 11px/1.5 var(--font-app);
  overflow-wrap: anywhere;
}

/* 并发池 */
.pipeline-pools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.pool-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font: 11px/1.4 var(--font-app);
}

.pool-tag .dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--idle);
}

.pool-tag .dot[data-status="completed"] {
  background: var(--ok);
}

.pool-tag .dot[data-status="running"] {
  background: var(--run);
}

.pool-tag .dot[data-status="checkpoint"] {
  background: var(--warn);
}

.pool-tag b {
  color: var(--fg-soft);
  font-weight: 600;
}

/* 工作区 */
.transcript-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tp-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  padding: 7px 9px 0;
  border-bottom: 1px solid var(--line);
}

.tp-tab {
  padding: 7px 11px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color 130ms ease, border-color 130ms ease;
}

.tp-tab .n {
  margin-left: 5px;
  color: var(--faint);
  font: 10px/1 var(--font-app);
}

.tp-tab.is-active {
  border-bottom-color: var(--blue-strong);
  color: var(--fg);
}

.transcript-statebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-sunken);
  color: var(--muted);
  font-size: 11px;
}

.tp-colhead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  background: var(--surface-sunken);
}

.tp-colhead span {
  padding: 8px 12px;
  color: var(--muted);
  font: 10px/1.3 var(--font-app);
  font-weight: 600;
  letter-spacing: .03em;
}

.tp-colhead span + span {
  border-left: 1px solid var(--line);
}

.panel-scroll {
  max-height: 372px;
  overflow-y: auto;
}

/* cue 列表 */
.cue-row {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
  text-align: left;
  transition: background-color 130ms ease, border-color 130ms ease;
}

.cue-row.is-current {
  border-left-color: var(--blue-strong);
  background: var(--run-bg);
}

.cue-col {
  display: grid;
  gap: 5px;
  padding: 9px 12px;
  min-width: 0;
}

.cue-en-col {
  border-right: 1px solid var(--line);
}

.cue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font: 10px/1 var(--font-app);
}

.stamp b {
  color: var(--muted);
  font-weight: 600;
}

.cue-play {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 4px;
  color: var(--faint);
  transition: color 130ms ease, background-color 130ms ease;
}

.cue-play svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.cue-row.is-current .cue-play {
  color: var(--blue);
}

.cue-en {
  color: var(--fg-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

.cue-zh {
  color: var(--fg);
  font-size: 12.5px;
  line-height: 1.7;
}

.edit-hint {
  color: var(--faint);
  font: 10px/1 var(--font-app);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.pagination > div {
  display: flex;
  gap: 7px;
}

/* 任务信息 */
.info-body {
  padding: 13px;
}

.task-info-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.task-info-heading .kind {
  color: var(--blue);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.task-info-heading p {
  color: var(--muted);
  font-size: 11.5px;
}

.inspector-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.inspector-grid > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 11px;
  background: var(--surface-inset);
}

.inspector-grid dt {
  color: var(--muted);
  font-size: 11px;
}

.inspector-grid dd {
  color: var(--fg-soft);
  font: 11px/1.4 var(--font-app);
  overflow-wrap: anywhere;
}

.inspector-grid dd.ok {
  color: var(--ok);
}

/* 长文预览 */
.summary-body {
  padding: 16px 18px;
}

.summary-body h4 {
  color: var(--fg-strong);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.summary-body h5 {
  margin-top: 18px;
  color: var(--fg-soft);
  font-size: 13px;
  font-weight: 600;
}

.summary-body p {
  margin-top: 9px;
  color: var(--fg-soft);
  font-size: 12.5px;
  line-height: 1.85;
  text-wrap: pretty;
}

.summary-image-placeholder {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 18px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: var(--surface-inset);
  text-align: center;
}

.summary-image-placeholder span {
  color: var(--muted);
  font-size: 11.5px;
}

.summary-image-placeholder small {
  color: var(--faint);
  font: 10px/1 var(--font-app);
}

/* 三稿记录 */
.drafts-body {
  display: grid;
  gap: 11px;
  padding: 13px;
}

.draft-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-inset);
}

.draft-card[data-base="true"] {
  border-color: var(--accent-line);
}

.draft-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
}

.draft-id {
  display: grid;
  width: 21px;
  height: 21px;
  flex: none;
  place-items: center;
  border: 1px solid var(--idle-line);
  border-radius: 5px;
  color: var(--muted);
  font: 600 11px/1 var(--font-app);
}

.draft-card[data-base="true"] .draft-id {
  border-color: var(--accent-line);
  background: var(--run-bg);
  color: var(--blue);
}

.draft-head strong {
  color: var(--fg-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.draft-head em {
  margin-left: auto;
  padding: 1px 6px;
  border: 1px solid var(--accent-line);
  border-radius: 5px;
  color: var(--blue);
  font-size: 10px;
  font-style: normal;
}

.draft-head .total {
  margin-left: auto;
  color: var(--faint);
  font: 11px/1 var(--font-app);
}

.draft-card[data-base="true"] .draft-head .total {
  margin-left: 0;
}

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

.score-row {
  display: grid;
  grid-template-columns: 62px 1fr 26px;
  gap: 8px;
  align-items: center;
}

.score-row span {
  color: var(--muted);
  font-size: 10.5px;
}

.score-row i {
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.score-row i b {
  display: block;
  height: 100%;
  background: var(--run);
}

.score-row code {
  color: var(--fg-soft);
  font: 10.5px/1 var(--font-app);
  text-align: right;
}

.omissions {
  padding: 0 11px 11px;
}

.omissions strong {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.omissions ul {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-left: 15px;
}

.omissions li {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.55;
}

/* 文档对照 */
.doc-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: 372px;
}

.doc-pane {
  overflow-y: auto;
  padding: 12px;
  color: var(--fg-soft);
  font: 11.5px/1.75 var(--font-app);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.doc-pane + .doc-pane {
  border-left: 1px solid var(--line);
}

/* 发布为网页 */
.html-publication {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.html-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.html-heading h4 {
  margin-top: 4px;
  color: var(--fg-strong);
  font-size: 14px;
  font-weight: 600;
}

.html-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  text-wrap: pretty;
}

.html-status {
  flex: none;
  padding: 3px 9px;
  border: 1px solid var(--warn-line);
  border-radius: 6px;
  background: var(--warn-bg);
  color: var(--warn);
  font: 11px/1.5 var(--font-app);
}

.html-status[data-status="completed"] {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}

.html-selection {
  padding: 13px 14px;
}

.html-selection-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.html-selection-head strong {
  display: block;
  color: var(--fg-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.html-selection-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  text-wrap: pretty;
}

.html-selection-head code {
  flex: none;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--blue-ink);
  font: 11px/1.5 var(--font-app);
}

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

.html-direction {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-inset);
  text-align: left;
  transition: transform 130ms var(--ease-out), border-color 130ms ease,
    background-color 130ms ease;
}

.html-direction-letter {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--idle-line);
  border-radius: 5px;
  color: var(--muted);
  font: 600 11px/1 var(--font-app);
  transition: border-color 130ms ease, color 130ms ease, background-color 130ms ease;
}

.html-direction strong {
  display: block;
  color: var(--fg-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.html-direction small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
}

.html-dials {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.html-dials > span {
  display: grid;
  grid-template-columns: 30px 1fr 22px;
  gap: 7px;
  align-items: center;
}

.html-dials small {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.html-dials i {
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.html-dials i b {
  display: block;
  height: 100%;
  background: var(--run);
}

.html-dials code {
  color: var(--faint);
  font: 10px/1 var(--font-app);
  text-align: right;
}

.html-direction[data-selected="true"] {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}

.html-direction[data-selected="true"] .html-direction-letter {
  border-color: var(--accent-line);
  background: var(--run-bg);
  color: var(--blue);
}

.html-direction[data-selected="true"] strong {
  color: var(--fg-strong);
}

.html-direction:active {
  transform: scale(.99);
}

.html-generate {
  width: 100%;
  margin-top: 11px;
}

.html-complete {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 11px;
  padding: 10px 11px;
  border: 1px solid var(--ok-line);
  border-radius: 7px;
  background: var(--ok-bg);
}

.html-complete strong,
.html-complete span {
  display: block;
}

.html-complete strong {
  color: var(--fg-soft);
  font-size: 12px;
  font-weight: 600;
}

.html-complete span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

/* ---------------- 真实截图 ---------------- */

.shot-frame {
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 10%),
    0 30px 76px -46px rgb(0 0 0 / 92%);
}

.shot figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-wrap: pretty;
}

.shot figcaption strong {
  color: var(--fg-soft);
  font-weight: 600;
}

/* ---------------- 三类任务 ---------------- */

.workflow-grid {
  border-top: 1px solid var(--line);
}

.workflow-card {
  display: grid;
  grid-template-columns: 42px minmax(170px, .7fr) minmax(260px, 1.2fr) minmax(160px, .7fr);
  gap: 26px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-shell);
}

.workflow-id {
  color: var(--blue);
  font: 12px/1.5 var(--font-app);
}

.workflow-card h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.workflow-copy p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-wrap: pretty;
}

.proof-list {
  display: grid;
  gap: 7px;
  list-style: none;
}

.proof-list li {
  position: relative;
  padding-left: 15px;
  color: var(--fg-soft);
  font-size: 13px;
  line-height: 1.6;
  text-wrap: pretty;
}

.proof-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--faint);
}

.workflow-foot {
  color: var(--muted);
  font: 11.5px/1.7 var(--font-app);
}

.workflow-foot strong {
  display: block;
  margin-bottom: 4px;
  color: var(--fg-soft);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------------- B站投稿 ---------------- */

.publish-grid {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: 50px;
  align-items: center;
}

.publish-copy h2 {
  max-width: 500px;
  margin-top: 14px;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.08;
  text-wrap: balance;
}

.publish-copy > p {
  max-width: 510px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 16px;
  text-wrap: pretty;
}

.publish-facts {
  display: grid;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  list-style: none;
}

.publish-fact {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-shell);
}

.publish-fact .num {
  color: var(--faint);
  font: 10px/1.9 var(--font-app);
}

.publish-fact strong {
  display: block;
  color: var(--fg-soft);
  font-size: 14px;
  font-weight: 600;
}

.publish-fact span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------------- 运行环境 ---------------- */

.runtime-lines {
  border-top: 1px solid var(--line);
}

.runtime-line {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 22px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line-shell);
}

.runtime-line span {
  color: var(--muted);
  font: 12px/1.6 var(--font-app);
}

.runtime-line strong {
  color: var(--fg-soft);
  font-size: 14px;
  font-weight: 500;
  text-wrap: pretty;
}

/* ---------------- 底部 CTA ---------------- */

.closing {
  padding: 84px 0;
  text-align: center;
}

.closing h2 {
  max-width: 720px;
  margin: 12px auto 0;
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  text-wrap: balance;
}

.closing p {
  max-width: 560px;
  margin: 15px auto 0;
  color: var(--muted);
  font-size: 16px;
  text-wrap: pretty;
}

.closing .hero-cta {
  justify-content: center;
  margin-top: 26px;
}

/* ---------------- footer ---------------- */

footer {
  padding: 26px 0 34px;
  border-top: 1px solid var(--line-shell);
  color: var(--muted);
  font-size: 11.5px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner strong {
  color: var(--fg-soft);
  font-weight: 600;
}

/* ---------------- hover（仅精确指针） ---------------- */

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    background: var(--surface-raised);
    color: var(--fg-soft);
  }

  .btn:hover {
    background: var(--blue-hover);
  }

  .ghost:hover {
    border-color: var(--control-line-hover);
    background: var(--control-bg-hover);
    color: var(--fg);
  }

  .kind-tab:hover {
    border-color: var(--line-strong);
    background: var(--surface-hover);
  }

  .primary-button:not(:disabled):hover {
    background: var(--blue-hover);
  }

  .secondary-button:not(:disabled):hover {
    border-color: var(--control-line-hover);
    background: var(--control-bg-hover);
  }

  .pipeline-collapse > summary:hover {
    background: var(--surface-hover);
  }

  .back-link:hover {
    background: var(--surface-hover);
    color: var(--fg-soft);
  }

  .tp-tab:not(.is-active):hover {
    color: var(--fg-soft);
  }

  .cue-row:not(.is-current):hover {
    background: var(--surface-hover);
  }

  .cue-row:hover .cue-play {
    color: var(--blue);
    background: var(--accent-wash);
  }

  button.rail-node:not([aria-pressed="true"]):hover {
    background: var(--surface-hover);
  }

  .companion-lane:hover {
    border-color: var(--accent-line);
    background: var(--accent-wash);
  }

  .companion-lane:hover .companion-plus,
  .companion-lane:hover strong {
    color: var(--blue-ink);
  }

  .html-direction:not([data-selected="true"]):hover {
    border-color: var(--line-strong);
    background: var(--surface-hover);
  }

  .output-tabs button:not(.is-active):not(:disabled):hover {
    border-color: var(--line-strong);
    background: var(--surface-hover);
  }

  .review-checkpoint-steps button:not(.is-active):hover {
    border-color: var(--control-line-hover);
    color: var(--fg-soft);
  }
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .publish-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .publish-copy h2,
  .publish-copy > p {
    max-width: 680px;
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .workflow-card {
    grid-template-columns: 42px 1fr;
    gap: 14px 18px;
  }

  .workflow-copy,
  .proof-list,
  .workflow-foot {
    grid-column: 2;
  }

  .kind-switch {
    grid-template-columns: 1fr;
  }

  .doc-columns {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .doc-pane + .doc-pane {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .doc-pane {
    max-height: 250px;
  }

  .html-directions {
    grid-template-columns: 1fr;
  }

  .pipeline-map {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pipeline-handoff {
    min-height: 25px;
  }

  .pipeline-handoff::before {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    height: auto;
  }

  .pipeline-handoff::after {
    right: auto;
    bottom: 1px;
    left: calc(50% - 3px);
    transform: rotate(135deg);
  }

  .pipeline-handoff span {
    padding-block: 3px;
  }
}

@media (max-width: 620px) {
  .wrap {
    padding: 0 18px;
  }

  .hero {
    padding: 62px 0 40px;
  }

  .hero h1 {
    font-size: 38px;
    line-height: 1.08;
  }

  .hero .lede {
    font-size: 16.5px;
  }

  .hero-cta .btn,
  .closing .hero-cta .btn {
    width: 100%;
  }

  .band {
    padding: 60px 0;
  }

  .closing {
    padding: 62px 0;
  }

  .sec-head {
    margin-bottom: 28px;
  }

  .outcome-lane {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pipeline-map .rail {
    min-width: 390px;
  }

  .pc-focus {
    display: none;
  }

  .nav-in {
    gap: 10px;
  }

  .nav-right .ghost span {
    display: none;
  }

  .nav-right .ghost {
    width: 42px;
    padding: 8px;
  }

  .app-body {
    padding: 10px;
    gap: 10px;
  }

  .wb-title-row,
  .html-heading,
  .review-checkpoint-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .wb-actions .primary-button,
  .wb-actions .secondary-button {
    flex: 1 1 auto;
  }

  .tp-colhead {
    grid-template-columns: 1fr;
  }

  .pipeline-collapse > summary {
    flex-wrap: wrap;
  }

  .pc-title {
    white-space: nowrap;
  }

  .pc-mini {
    width: 100%;
    margin-left: 25px;
  }

  .mini-bar {
    flex: 1 1 auto;
    width: auto;
  }

  .tp-colhead span + span {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .cue-en-col {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .score-grid {
    grid-template-columns: 1fr;
  }

  .inspector-grid > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .runtime-line {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
  }

  .shot figcaption {
    display: grid;
    gap: 4px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .proto-note {
    max-width: none;
  }

  .pagination {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 400px) {
  .wrap {
    padding: 0 14px;
  }

  .brand .ipa {
    display: none;
  }

  .nav-right .btn {
    padding: 9px 11px;
    font-size: 13px;
  }

  .hero h1 {
    font-size: 33px;
  }

  .kind-tab {
    padding: 11px 12px;
  }
}

/* ---------------- reduced motion ---------------- */

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

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

/* ---------------- V2 · 按当前 Etch v0.2.18 实机重构 ---------------- */

.hero-product {
  padding: 72px 0 78px;
  background: var(--bg);
}

.hero-copy {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  align-items: end;
  gap: clamp(38px, 6vw, 80px);
}

.hero-product h1 {
  max-width: 820px;
  font-size: clamp(40px, 4.5vw, 58px);
}

@media (min-width: 981px) {
  .hero-product h1 span { white-space: nowrap; }
}

.hero-product .lede {
  max-width: none;
  margin-top: 0;
  font-size: 16.5px;
}

.hero-support .hero-cta {
  margin-top: 20px;
}

.prototype-intro {
  margin: 46px 0 18px;
}

.prototype-intro h2 {
  margin-top: 9px;
  color: var(--fg-strong);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.12;
}

.etch-window {
  width: 100%;
  aspect-ratio: 1214 / 768;
  overflow: hidden;
  border: 1px solid var(--line-shell);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 32px 90px -46px rgb(0 0 0 / 92%);
  font-family: var(--font-app);
}

.etch-titlebar {
  position: relative;
  display: flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line-shell);
  background: var(--shell);
  color: var(--faint);
  font-size: 10px;
}

.etch-titlebar .lights {
  position: absolute;
  left: 14px;
  gap: 7px;
}

.etch-titlebar .lights i {
  width: 10px;
  height: 10px;
}

.etch-titlebar .lights i:nth-child(1) { background: #ff5f57; }
.etch-titlebar .lights i:nth-child(2) { background: #febc2e; }
.etch-titlebar .lights i:nth-child(3) { background: #28c840; }

.etch-app-grid {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  height: calc(100% - 32px);
  min-height: 0;
}

.etch-sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 16px 11px 12px;
  border-right: 1px solid var(--line-shell);
  background: var(--shell);
}

.etch-brand {
  padding: 0 9px 17px;
  color: var(--fg-strong);
  font-size: 14px;
  font-weight: 650;
}

.etch-nav {
  display: grid;
  gap: 3px;
}

.etch-nav-item {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms var(--ease-out);
}

.etch-nav-item > span,
.etch-nav-item > svg {
  color: var(--faint);
  font-size: 13px;
  line-height: 1;
}

.etch-nav-item > svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.etch-nav-item b {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.etch-nav-item em {
  min-width: 21px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--chip-bg, #20262e);
  color: var(--muted);
  font: 600 9px/1.6 var(--font-app);
  text-align: center;
}

.etch-nav-item.is-active {
  background: var(--surface-active);
  color: var(--fg-strong);
}

.etch-nav-item.is-active > span,
.etch-nav-item.is-active > svg,
.etch-nav-item.is-active em {
  color: var(--blue);
}

.etch-nav-item.is-active em {
  background: #223049;
}

.etch-nav-item:active {
  transform: scale(.98);
}

.etch-runtime {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 11px 9px 3px;
  border-top: 1px solid var(--line-shell);
}

.etch-runtime > i {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgb(108 199 154 / 14%);
}

.etch-runtime > span {
  display: grid;
  gap: 3px;
}

.etch-runtime b {
  color: var(--fg-soft);
  font-size: 10px;
  font-weight: 550;
}

.etch-runtime small {
  color: var(--faint);
  font-size: 9px;
}

.etch-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--bg);
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.etch-main .app-body {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 9px;
  padding: 16px 18px;
}

.etch-main .wb-header {
  gap: 6px;
}

.etch-main .back-link {
  padding: 1px 0;
  font-size: 10px;
}

.etch-main .wb-title-row {
  align-items: end;
  gap: 18px;
}

.etch-main .wb-title-row h3 {
  max-width: 760px;
  margin-top: 3px;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.etch-main .provider-tag,
.etch-main .task-source {
  font-size: 9px;
}

.etch-main .primary-button,
.etch-main .secondary-button {
  min-height: 30px;
  font-size: 10px;
}

.etch-main .output-tabs button {
  min-width: 120px;
  padding: 6px 9px;
}

.etch-main .review-checkpoint-banner {
  padding: 8px 10px;
}

.etch-main .review-checkpoint-copy strong,
.etch-main .review-checkpoint-steps button,
.etch-main .review-checkpoint-copy span {
  font-size: 9px;
}

.etch-main .pipeline-collapse > summary {
  min-height: 34px;
  padding: 0 11px;
}

.etch-main .pipeline-collapse > summary,
.etch-main .rail-label,
.etch-main .rail-sub,
.etch-main .pool-tag {
  font-size: 9px;
}

.etch-main .pc-body {
  padding: 11px;
}

.etch-main .rail-dot {
  width: 24px;
  height: 24px;
  font-size: 8px;
}

.media-workspace {
  display: grid;
  min-height: 390px;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 9px;
}

.video-preview-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050607;
}

.video-well {
  position: relative;
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  place-items: center;
  overflow: hidden;
  background: #050607;
}

.video-synthetic-frame {
  position: absolute;
  display: grid;
  width: 72%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  place-content: center;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 8%);
  background: #0a0d11;
  color: #667182;
  text-align: center;
}

.video-synthetic-frame span {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 7px;
  letter-spacing: .12em;
}

.video-synthetic-frame strong {
  position: relative;
  z-index: 2;
  color: #dce2ea;
  font-size: clamp(16px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.02;
}

.video-synthetic-frame i {
  position: absolute;
  right: 9%;
  width: 1px;
  height: 140%;
  background: #1d2632;
  transform: rotate(34deg);
}

.video-synthetic-frame i:nth-of-type(2) { right: 28%; }
.video-synthetic-frame i:nth-of-type(3) { right: 47%; }

.subtitle-overlay {
  position: absolute;
  bottom: 22px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 5px 8px;
  color: #fff;
  font: 9px/1.45 var(--font-app);
  text-align: center;
  text-shadow: 0 1px 2px #000, 0 0 5px #000;
}

.subtitle-overlay b {
  color: #ffe9a8;
  font-weight: 500;
}

.video-controls {
  display: flex;
  min-height: 40px;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-top: 1px solid rgb(255 255 255 / 8%);
  color: #818b99;
}

.video-controls button {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  padding: 0 6px;
  border: 1px solid #232a33;
  border-radius: 5px;
  color: #9aa5b4;
  font-size: 8px;
}

.video-controls button:active { transform: scale(.96); }
.video-controls .video-play { border-color: var(--blue-strong); background: var(--blue-strong); color: #fff; }
.video-controls svg { width: 10px; height: 10px; fill: currentColor; }
.video-controls code { font: 8px/1 var(--font-app); white-space: nowrap; }
.video-controls .video-scrub { height: 3px; flex: 1 1 auto; overflow: hidden; border-radius: 999px; background: #20262f; }
.video-controls .video-scrub i { display: block; height: 100%; background: var(--blue-strong); }
.video-controls .video-mode { min-width: 64px; }

.media-workspace .transcript-panel {
  height: 100%;
  min-height: 0;
}

.etch-main .tp-tabs {
  padding: 5px 8px 0;
}

.etch-main .tp-tab,
.etch-main .transcript-statebar,
.etch-main .tp-colhead,
.etch-main .cue-row,
.etch-main .doc-pane {
  font-size: 9px;
}

.etch-main .task-info-heading {
  padding: 10px 11px;
}

.etch-main .task-info-heading p,
.etch-main .inspector-grid {
  font-size: 9px;
}

.document-app-body .transcript-panel {
  min-height: 250px;
  flex: 1 1 auto;
}

.document-app-body .doc-columns {
  min-height: 180px;
  max-height: none;
  flex: 1 1 auto;
}

.document-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--warn-line);
  border-radius: 7px;
  background: var(--warn-bg);
}

.document-warning > svg {
  width: 13px;
  flex: none;
  fill: none;
  stroke: var(--warn);
  stroke-width: 1.7;
}

.document-warning strong,
.document-warning span {
  display: block;
  font-size: 9px;
}

.document-warning strong { color: var(--warn); }
.document-warning span { margin-top: 2px; color: var(--muted); }

.document-review-bar {
  display: grid;
  z-index: 3;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  flex: none;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--run-line);
  border-radius: 7px;
  background: #0f1b2a;
}

.document-review-bar strong,
.document-review-bar small {
  display: block;
  font-size: 9px;
}

.document-review-bar small { margin-top: 2px; color: var(--muted); }
.document-review-bar.is-complete { border-color: var(--ok-line); background: var(--ok-bg); }
.document-review-bar.is-complete .review-checkpoint-icon { border-color: var(--ok-line); color: var(--ok); }

.html-publication.is-gated {
  flex: none;
}

.html-gated-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 11px;
  border-top: 1px solid var(--line);
}

.html-gated-copy strong,
.html-gated-copy span {
  display: block;
  font-size: 9px;
}

.html-gated-copy span { margin-top: 2px; color: var(--faint); }
.html-status[data-status="pending"] { color: var(--faint); }

.queue-view {
  min-height: 100%;
  padding: 28px 28px 36px;
}

.queue-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.queue-header > div > span {
  color: var(--faint);
  font-size: 9px;
}

.queue-header h3 {
  margin-top: 4px;
  color: var(--fg-strong);
  font-size: 24px;
  font-weight: 650;
}

.queue-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 9px;
}

.queue-toolbar > span {
  padding: 6px 8px;
  border-radius: 6px;
}

.queue-toolbar > span.is-active {
  background: var(--surface-active);
  color: var(--fg-strong);
}

.queue-toolbar b {
  margin-left: 3px;
  color: var(--blue);
  font-weight: 500;
}

.queue-toolbar em {
  margin-left: auto;
  color: var(--faint);
}

.demo-task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.demo-task-card {
  display: flex;
  min-width: 0;
  min-height: 360px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #2b323b;
  border-radius: 8px;
  background: #11151a;
  text-align: left;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms var(--ease-out);
}

.demo-task-card:active { transform: scale(.99); }

.task-cover {
  position: relative;
  display: grid;
  min-height: 148px;
  place-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #090c10;
  color: #d9e0e8;
  text-align: center;
}

.task-cover::before,
.task-cover::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 180%;
  background: #1d2632;
  transform: rotate(39deg);
}

.task-cover::before { left: 30%; }
.task-cover::after { right: 25%; }
.task-cover small { position: absolute; top: 10px; left: 11px; color: var(--blue); font-size: 8px; }
.task-cover strong { position: relative; z-index: 2; font-size: 21px; letter-spacing: -.05em; line-height: 1.05; }
.task-cover em { position: absolute; right: 9px; bottom: 8px; padding: 2px 5px; border-radius: 4px; background: #11161d; color: #a9b2bf; font-size: 8px; }
.task-cover-summary { background: #0c1117; }
.task-cover-document { background: #10100d; }

.demo-task-copy {
  display: grid;
  gap: 7px;
  padding: 13px 13px 8px;
}

.demo-task-copy .task-card-overline { font-size: 8px; }
.demo-task-copy > b { display: -webkit-box; overflow: hidden; color: var(--fg-strong); font-size: 13px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.demo-task-copy > span:not(.task-card-overline) { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.demo-task-copy code { overflow: hidden; color: var(--faint); font: 8px/1.5 var(--font-app); text-overflow: ellipsis; white-space: nowrap; }
.demo-task-copy > small { color: var(--faint); font-size: 8px; }

.task-card-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 8px 13px 12px;
}

.task-card-progress > span {
  height: 2px;
  flex: 1 1 auto;
  overflow: hidden;
  background: var(--line);
}

.task-card-progress > span b { display: block; height: 100%; background: var(--blue); }
.task-card-progress em { color: var(--faint); font-size: 8px; }

.glossary-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.glossary-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.glossary-panel-head strong { color: var(--blue); font-size: 10px; }
.glossary-panel-head span { color: var(--muted); font-size: 9px; }
.glossary-table { display: grid; grid-template-columns: 1fr 1fr; }
.glossary-table > * { min-height: 38px; padding: 10px 13px; border-bottom: 1px solid var(--line); font-size: 10px; }
.glossary-table > :nth-child(even) { border-left: 1px solid var(--line); }
.glossary-table > span { color: var(--faint); font-size: 8px; }
.glossary-table b { color: var(--fg-soft); font-weight: 500; }
.glossary-table em { color: var(--ok); }

.publish-grid.publish-grid-single {
  grid-template-columns: minmax(0, 760px);
}

@media (hover: hover) and (pointer: fine) {
  .etch-nav-item:hover { background: var(--surface-hover); color: var(--fg-soft); }
  .demo-task-card:hover { border-color: #3a4654; background: #151a21; }
  .video-controls button:hover { border-color: #384452; color: #d0d6de; }
}

@media (max-width: 980px) {
  .hero-copy { grid-template-columns: 1fr; align-items: start; gap: 24px; }
  .hero-product .lede { max-width: 760px; }
  .etch-window { aspect-ratio: auto; min-height: 720px; }
  .etch-app-grid { grid-template-columns: 164px minmax(0, 1fr); }
  .media-workspace { grid-template-columns: 1fr; }
  .video-preview-panel { min-height: 360px; }
  .demo-task-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hero-product { padding: 48px 0 58px; }
  .prototype-intro { margin-top: 54px; }
  .etch-window { min-height: 820px; }
  .etch-app-grid { grid-template-columns: 58px minmax(0, 1fr); }
  .etch-sidebar { padding-inline: 6px; }
  .etch-brand { overflow: hidden; padding-inline: 5px; font-size: 11px; }
  .etch-nav-item { display: grid; grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .etch-nav-item b, .etch-nav-item em { display: none; }
  .etch-runtime { justify-content: center; padding-inline: 0; }
  .etch-runtime > span { display: none; }
  .queue-view { padding: 20px 14px 28px; }
  .demo-task-grid { grid-template-columns: 1fr; }
  .demo-task-card { min-height: 330px; }
  .etch-main .app-body { padding: 12px; }
  .etch-main .wb-title-row { align-items: stretch; flex-direction: column; }
  .etch-main .wb-actions { width: 100%; }
  .etch-main .wb-actions > * { flex: 1 1 auto; }
  .media-workspace { min-height: 620px; }
  .video-preview-panel { min-height: 300px; }
  .document-review-bar { grid-template-columns: 24px minmax(0, 1fr); }
  .document-review-bar .primary-button { grid-column: 1 / -1; }
  .html-gated-copy { align-items: stretch; flex-direction: column; }
  .queue-header h3 { font-size: 20px; }
  .queue-toolbar em { display: none; }
}
