:root {
  --ink: #132b27;
  --text: #24443d;
  --muted: #62736f;
  --subtle: #82918c;
  --line: #d7e1dd;
  --line-strong: #bbc9c3;
  --paper: #ffffff;
  --canvas: #f4f7f6;
  --panel: #f8faf9;
  --brand: #0c6a54;
  --brand-hover: #075340;
  --brand-soft: #e6f1ed;
  --warning: #8c5d18;
  --warning-soft: #fff8e8;
  --danger: #a6443d;
  --radius: 8px;
  --radius-large: 12px;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--canvas); }
body.welcome-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, fluent-button[disabled] { cursor: wait; opacity: .7; }
[hidden] { display: none !important; }

.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #071d1a;
  color: #f4fcf9;
  transition: opacity .55s ease, visibility .55s ease;
}
.welcome-screen::after { position: absolute; inset: 0; z-index: 1; content: ""; background: linear-gradient(180deg, rgba(4, 15, 19, .48) 0%, rgba(4, 17, 20, .18) 42%, rgba(2, 16, 17, .76) 100%); }
.welcome-screen.leaving { visibility: hidden; opacity: 0; }
.welcome-header { position: absolute; left: clamp(22px, 4vw, 62px); right: clamp(22px, 4vw, 62px); top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; min-height: 76px; border-bottom: 1px solid rgba(230, 243, 240, .22); }
.welcome-header > p { margin: 0; color: rgba(231, 242, 239, .72); font: 600 9px ui-monospace, "Cascadia Mono", monospace; letter-spacing: .16em; }
.welcome-brand { display: flex; align-items: center; gap: 10px; }
.welcome-brand span { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(239, 249, 246, .7); color: #fff; font: 700 15px Georgia, serif; }
.welcome-brand strong { color: #fff; font-size: 14px; letter-spacing: .08em; }
.welcome-content { position: relative; z-index: 3; width: min(860px, calc(100vw - 42px)); text-align: center; animation: welcomeContentIn 1.1s .35s cubic-bezier(.2,.75,.2,1) both; }
.welcome-kicker { margin: 0 0 18px; color: rgba(235, 247, 244, .78); font: 700 10px/1.4 ui-monospace, "Cascadia Mono", monospace; letter-spacing: .24em; }
.welcome-content h1 { margin: 0; color: #fff; font: 650 clamp(44px, 6.8vw, 88px)/1.08 "Microsoft YaHei UI", sans-serif; letter-spacing: -.045em; text-shadow: 0 2px 18px rgba(0, 15, 17, .22); }
.welcome-lead { max-width: 650px; margin: 22px auto 24px; color: rgba(241, 249, 247, .86); font-size: clamp(13px, 1.55vw, 16px); line-height: 1.8; }
.welcome-capabilities { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; }
.welcome-capabilities span { padding: 0 11px; border-right: 1px solid rgba(224, 240, 235, .38); color: rgba(230, 242, 238, .76); font-size: 11px; letter-spacing: .05em; }
.welcome-capabilities span:last-child { border-right: 0; }
.welcome-loading { display: flex; justify-content: center; align-items: center; gap: 9px; min-height: 28px; margin: 24px 0 5px; color: rgba(221, 238, 233, .68); font-size: 10px; }
.welcome-loading i { width: 86px; height: 1px; overflow: hidden; background: rgba(226, 242, 237, .22); }
.welcome-loading i::after { display: block; width: 40%; height: 100%; content: ""; background: #f3faf8; animation: welcomeScan 1.2s ease-in-out infinite; }
.welcome-start { min-width: 176px; min-height: 48px; margin-top: 7px; border: 1px solid rgba(255, 255, 255, .92); border-radius: 999px; background: #f7fbfa; color: #112c29; font-size: 13px; font-weight: 800; letter-spacing: .08em; opacity: 0; transform: translateY(8px); transition: background .15s ease, color .15s ease, opacity .4s ease, transform .4s ease; }
.welcome-screen.ready .welcome-start { opacity: 1; transform: translateY(0); }
.welcome-start:hover { background: transparent; color: #fff; }
.welcome-start:disabled { cursor: wait; opacity: 0; }
.welcome-start span { margin-left: 12px; font-size: 17px; }
.welcome-scene-index { position: absolute; left: clamp(22px, 4vw, 62px); bottom: 25px; z-index: 4; display: flex; align-items: center; gap: 11px; color: rgba(232, 244, 240, .72); }
.welcome-scene-index strong { color: #fff; font: 600 18px ui-monospace, "Cascadia Mono", monospace; }
.welcome-scene-index span { font: 600 9px ui-monospace, "Cascadia Mono", monospace; letter-spacing: .13em; }
.welcome-footnote { position: absolute; right: clamp(22px, 4vw, 62px); bottom: 26px; z-index: 4; margin: 0; color: rgba(219, 235, 230, .62); font-size: 10px; letter-spacing: .04em; }
.welcome-visual { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #071d1a; }
.welcome-film { position: absolute; inset: -5%; }
.welcome-film-a { background: url('/assets/wastewater-cinematic-entrance-v1.png') 50% 58% / cover no-repeat; animation: welcomeSceneA 24s ease-in-out infinite; }
.welcome-film-b { background: url('/assets/water-process-ambient-v1.png') 52% 50% / cover no-repeat; opacity: 0; animation: welcomeSceneB 24s ease-in-out infinite; }
.welcome-film-c { inset: 0; background: linear-gradient(90deg, rgba(2, 15, 18, .26), transparent 45%, rgba(3, 15, 17, .16)); }
.welcome-sweep { position: absolute; left: clamp(22px, 4vw, 62px); right: clamp(22px, 4vw, 62px); bottom: 0; height: 2px; transform-origin: left; background: rgba(244, 251, 249, .7); animation: welcomeTimeline 8s linear infinite; }
@keyframes welcomeScan { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }
@keyframes welcomeSceneA { 0%, 40% { opacity: 1; transform: scale(1.04) translate3d(-1%, 0, 0); } 50%, 90% { opacity: 0; transform: scale(1.11) translate3d(1.5%, -1%, 0); } 100% { opacity: 1; transform: scale(1.04) translate3d(-1%, 0, 0); } }
@keyframes welcomeSceneB { 0%, 40% { opacity: 0; transform: scale(1.08) translate3d(1%, 0, 0); } 50%, 90% { opacity: 1; transform: scale(1.03) translate3d(-1%, -1%, 0); } 100% { opacity: 0; transform: scale(1.08) translate3d(1%, 0, 0); } }
@keyframes welcomeTimeline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes welcomeContentIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1480px) / 2));
  border-bottom: 1px solid #1f443a;
  background: #102c25;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: #f5fbf8; text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid #4c8b76;
  background: #174f40;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
}
.brand strong { display: block; font-size: 16px; letter-spacing: .06em; }
.brand small { display: block; margin-top: 1px; color: #a9c4ba; font-size: 11px; letter-spacing: .02em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.quiet-button,
.license-chip,
.command-button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}
.topbar .quiet-button,
.topbar .license-chip,
.topbar .command-button { border-color: #496960; background: #173a31; color: #eff8f4; }
.topbar .quiet-button:hover,
.topbar .license-chip:hover,
.topbar .command-button:hover { border-color: #79a998; background: #21493e; color: #fff; }
.quiet-button { padding: 0 13px; }
.quiet-button:hover { border-color: var(--brand); color: var(--brand-hover); }
.license-chip { display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #95a39e; }
.license-chip.active .status-dot { background: #1c936c; }
fluent-button.command-button,
fluent-button.license-chip,
.result-actions fluent-button { font: inherit; }

.workspace {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  width: min(1480px, 100%);
  min-height: calc(100dvh - 68px);
  margin: 0 auto;
}
.sidebar {
  position: sticky;
  top: 68px;
  align-self: start;
  min-height: calc(100dvh - 68px);
  padding: 30px 18px 26px;
  border-right: 1px solid var(--line);
  background: #f8faf9;
}
.sidebar-caption { margin: 0 8px 14px; color: var(--muted); font-size: 12px; font-weight: 700; }
.step-nav { display: grid; gap: 3px; }
.step-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid transparent;
  color: #4d625b;
  text-decoration: none;
  font-size: 13px;
}
.step-link span { min-width: 18px; color: #83928c; font: 11px ui-monospace, "Cascadia Mono", monospace; }
.step-link:hover { color: var(--brand-hover); background: #f1f6f4; }
.step-link.active { border-color: #b9d7cb; background: var(--brand-soft); color: var(--brand-hover); font-weight: 750; }
.step-link.active span { color: var(--brand); }
.sidebar-card { margin-top: 28px; padding: 14px 12px; border: 1px solid #c8ddd3; border-radius: var(--radius); background: #eef5f1; }
.eyebrow { margin: 0; color: var(--brand); font-size: 11px; font-weight: 750; letter-spacing: .06em; }
.sidebar-card p { margin: 8px 0 0; color: #4c645b; font-size: 12px; line-height: 1.65; }
.sidebar-note { margin: 20px 7px 0; color: var(--subtle); font-size: 11px; line-height: 1.65; }

.content { width: min(1180px, 100%); padding: 34px clamp(22px, 4vw, 60px) 76px; }
.hero { position: relative; isolation: isolate; display: flex; min-height: 224px; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 20px; padding: 32px; overflow: hidden; border-radius: var(--radius-large); background: #0e3029; color: #f6fbf9; }
.hero::after { position: absolute; inset: 0; z-index: -1; content: ""; background: linear-gradient(90deg, rgba(8, 35, 29, .96) 0%, rgba(8, 35, 29, .82) 44%, rgba(8, 35, 29, .2) 100%); }
.hero-ambient { position: absolute; inset: 0; z-index: -2; background: url('/assets/water-process-ambient-v1.png') 57% 48% / cover no-repeat; }
.hero h1 { max-width: 720px; margin: 8px 0 9px; color: #fff; font-size: 38px; line-height: 1.24; letter-spacing: -.025em; text-wrap: balance; }
.hero .eyebrow { color: #7ed1b6; }
.hero p:not(.eyebrow) { max-width: 650px; margin: 0; color: #c6dbd4; font-size: 14px; line-height: 1.75; }
.hero-badge { min-width: 176px; padding: 13px 14px; border: 1px solid rgba(150, 219, 195, .42); border-radius: var(--radius); background: rgba(7, 39, 32, .72); }
.hero-badge span { display: block; margin-bottom: 4px; color: #a9c7bd; font-size: 11px; }
.hero-badge strong { display: block; color: #e6fff6; font-size: 12px; line-height: 1.45; }

.workspace-status {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(180px, .9fr) minmax(280px, 1.7fr);
  align-items: stretch;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.status-summary { display: grid; gap: 5px; padding: 13px 16px; border-right: 1px solid var(--line); }
.status-summary span { color: var(--muted); font-size: 11px; }
.status-summary strong { color: var(--text); font-size: 13px; }
.workspace-status > p { align-self: center; margin: 0; padding: 13px 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  overflow: hidden;
  background: var(--paper);
  scroll-margin-top: 80px;
}
.wizard-progress button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 54px;
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
}
.wizard-progress button:last-child { border-right: 0; }
.wizard-progress button:hover:not(:disabled) { background: #f1f6f4; color: var(--brand-hover); }
.wizard-progress button.active { background: var(--brand-soft); color: var(--brand-hover); }
.wizard-progress button.complete { color: var(--text); }
.wizard-progress button:disabled { cursor: default; opacity: .55; }
.wizard-progress button span {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #aabbb4;
  border-radius: 50%;
  font: 700 11px ui-monospace, "Cascadia Mono", monospace;
}
.wizard-progress button.active span { border-color: var(--brand); background: var(--brand); color: #fff; }
.wizard-progress button.complete span { border-color: #78a895; background: #edf6f2; color: var(--brand); }
.wizard-progress button strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.form-card,
.result-section { border: 1px solid var(--line); border-radius: var(--radius-large); background: var(--paper); }
.form-card { min-height: 430px; margin: 16px 0; padding: clamp(22px, 3vw, 30px); scroll-margin-top: 86px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-number { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #b8d3c7; border-radius: 6px; color: var(--brand); background: #f1f7f4; font: 700 11px ui-monospace, "Cascadia Mono", monospace; }
.section-heading h2,
.result-heading h2 { margin: 0; color: var(--ink); font-size: 19px; letter-spacing: -.01em; text-wrap: balance; }
.section-heading p { max-width: 310px; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: right; }

.form-grid,
.quality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.quality-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; color: var(--text); font-size: 13px; font-weight: 650; }
.field-wide { grid-column: span 2; }
.field em { margin-left: 3px; color: var(--danger); font-style: normal; }
input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder,
textarea::placeholder { color: #8a9893; }
input:focus,
select:focus,
textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(12, 106, 84, .14); }
textarea { min-height: 92px; resize: vertical; line-height: 1.6; }

.choice-group { margin: 24px 0 0; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 10px; color: var(--text); font-size: 13px; font-weight: 700; }
.choice-list { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-list label { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 6px; color: #4d635b; cursor: pointer; font-size: 12px; }
.choice-list label:has(input:checked) { border-color: #7bb69f; background: var(--brand-soft); color: var(--brand-hover); }
.choice-list input { width: auto; min-height: 0; accent-color: var(--brand); }
.industry-insight { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.5fr); gap: 18px; align-items: center; margin-top: 22px; padding: 14px 16px; border-left: 3px solid var(--brand); background: #f2f7f5; }
.industry-insight div { display: grid; gap: 4px; }
.industry-insight span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.industry-insight strong { color: var(--brand-hover); font-size: 13px; line-height: 1.45; }
.industry-insight p { margin: 0; color: #4e665d; font-size: 12px; line-height: 1.65; }
.inline-tip { margin-top: 21px; padding: 10px 12px; border: 1px solid #cfe2d8; border-radius: var(--radius); background: #f3f8f6; color: #52675f; font-size: 12px; line-height: 1.6; }
.inline-tip span { display: inline-grid; width: 16px; height: 16px; place-items: center; margin-right: 5px; border-radius: 50%; background: #d8ece3; color: var(--brand-hover); font-size: 10px; font-weight: 800; }

.decision-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding: 13px 15px; border-left: 3px solid var(--brand); background: #f3f7f5; }
.decision-intro div { display: grid; gap: 3px; }
.decision-intro strong { color: var(--ink); font-size: 13px; }
.decision-intro span { color: var(--brand); font-size: 11px; font-weight: 700; }
.decision-intro p { max-width: 520px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: right; }
.decision-grid { gap: 14px 18px; }
.existing-project-details { margin-top: 18px; padding: 16px; border: 1px dashed var(--line-strong); background: var(--panel); }
.process-designer { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius-large); overflow: hidden; background: #fbfdfc; }
.process-designer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 20px 21px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.process-kicker { color: var(--brand); font: 700 9px ui-monospace, "Cascadia Mono", monospace; letter-spacing: .14em; }
.process-designer-heading h3 { display: inline-block; margin: 5px 0 4px; color: var(--ink); font-size: 17px; }
.process-designer-heading p { max-width: 620px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.process-heading-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.process-editable-badge { padding: 4px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-hover); font-size: 10px; font-weight: 750; }
.process-flow-viewport { overflow-x: auto; padding: 28px 22px 25px; background-image: linear-gradient(rgba(45, 93, 78, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(45, 93, 78, .035) 1px, transparent 1px); background-size: 28px 28px; scrollbar-color: #b9cbc4 transparent; scrollbar-width: thin; animation: processGridDrift 18s linear infinite; }
.process-flow-canvas { display: flex; align-items: center; min-width: max-content; }
.process-step { display: flex; align-items: center; }
.process-node { position: relative; display: grid; flex: 0 0 96px; width: 96px; min-height: 104px; justify-items: center; align-content: start; padding: 7px 5px 5px; border: 1px solid #cad8d3; border-radius: 10px; background: #fff; }
.process-node-icon { position: relative; display: grid; width: 50px; height: 50px; place-items: center; margin-bottom: 7px; overflow: hidden; border-radius: 9px; background: #e8efec; color: #536b63; font: 750 13px/1 "Microsoft YaHei UI", sans-serif; }
.process-node-icon::after { position: absolute; left: 5px; right: 5px; bottom: 4px; height: 2px; content: ""; background: currentColor; opacity: .38; transform-origin: left; animation: equipmentDutyCycle 2.8s ease-in-out infinite; }
.process-node-core { border-color: #9fcbbc; background: #f5fbf8; }
.process-node-core .process-node-icon { background: var(--brand); color: #fff; }
.process-node-terminal { border-color: #97b8d2; background: #f4f9fc; }
.process-node-terminal .process-node-icon { background: #2877a7; color: #fff; }
.process-node-custom { border-color: #cdbb8b; background: #fffbf2; }
.process-node-custom .process-node-icon { background: #9a6a1c; color: #fff; }
.process-node strong { max-width: 86px; color: var(--text); font-size: 11px; line-height: 1.35; text-align: center; }
.process-node small { position: absolute; left: 7px; top: 6px; color: #8ca098; font: 700 8px ui-monospace, "Cascadia Mono", monospace; }
.process-connector { display: flex; width: 31px; align-items: center; color: #7ba797; }
.process-connector i { position: relative; display: block; flex: 1; height: 2px; overflow: hidden; background: #bdd0c9; }
.process-connector i::after { position: absolute; inset: 0; content: ""; background: repeating-linear-gradient(90deg, transparent 0 7px, #2d8d70 7px 13px, transparent 13px 20px); background-size: 40px 2px; animation: pipelineFlow 1.15s linear infinite; }
.process-connector b { margin-left: -1px; font-size: 18px; line-height: 1; }
.process-node-controls { position: absolute; top: -24px; left: 50%; display: none; gap: 3px; transform: translateX(-50%); }
.process-flow-canvas.editing .process-node-controls { display: flex; }
.process-node-controls button { width: 22px; height: 20px; padding: 0; border: 1px solid #afc3bb; border-radius: 4px; background: #fff; color: #36584d; font-size: 11px; line-height: 1; }
.process-node-controls button:hover { border-color: var(--brand); color: var(--brand); }
.process-node-controls button:disabled { cursor: not-allowed; opacity: .28; }
.process-editor { display: flex; align-items: end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: #f1f6f4; }
.process-editor label { display: grid; flex: 1; gap: 5px; color: var(--muted); font-size: 10px; }
.process-editor select { min-height: 36px; }
.process-confirm-button { min-height: 36px; padding: 0 14px; border: 1px solid var(--brand); border-radius: 6px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 750; }
.process-confirm-button:hover { background: var(--brand-hover); }
.process-legend { display: flex; align-items: center; gap: 17px; padding: 11px 20px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 10px; }
.process-legend span { display: inline-flex; align-items: center; gap: 5px; }
.process-legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend-core { background: var(--brand); }.legend-support { border: 1px solid #b7c6c1; background: #e8efec; }
.process-legend b { color: #7ba797; font-size: 15px; }
.process-legend strong { margin-left: auto; padding: 4px 8px; border-radius: 999px; background: #fff5df; color: #8a5a13; font-size: 10px; }
.process-legend strong.confirmed { background: #e8f5ef; color: #12634c; }
.optional-notes { margin-top: 22px; }
@keyframes pipelineFlow { to { background-position: 40px 0; } }
@keyframes equipmentDutyCycle { 0%, 100% { transform: scaleX(.18); opacity: .25; } 50% { transform: scaleX(1); opacity: .62; } }
@keyframes processGridDrift { to { background-position: 28px 0, 28px 0; } }
.process-designer.process-paused .process-flow-viewport,
.process-designer.process-paused .process-connector i::after,
.process-designer.process-paused .process-node-icon::after { animation-play-state: paused; }

.wizard-actions {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 14px;
  margin: 18px 0 34px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--paper);
}
.wizard-actions #wizardPrevious { justify-self: start; }
.wizard-actions #wizardNext { justify-self: end; }
.wizard-actions > span { color: var(--muted); font-size: 12px; font-weight: 650; }
.primary-nav-button {
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
.primary-nav-button:hover { border-color: var(--brand-hover); background: var(--brand-hover); }
.primary-nav-button:active { transform: translateY(1px); }

.review-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .8fr); gap: 28px; }
.review-layout h3 { margin: 0 0 13px; color: var(--ink); font-size: 14px; }
.review-summary { border-top: 1px solid var(--line); }
.review-summary > div { display: grid; grid-template-columns: minmax(110px, .45fr) minmax(0, 1fr); gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.review-summary span { color: var(--muted); font-size: 12px; }
.review-summary strong { color: var(--text); font-size: 13px; text-align: right; overflow-wrap: anywhere; }
.review-layout aside { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.template-choice { display: grid; gap: 6px; margin-bottom: 12px; color: var(--text); font-size: 11px; font-weight: 700; }
.template-choice select { min-height: 37px; background: #fff; }
.review-layout aside ul { margin: 16px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.delivery-profile { display: grid; gap: 4px; margin-bottom: 13px; padding: 12px; border: 1px solid #bdd9cd; border-radius: 6px; background: #edf6f2; }
.delivery-profile strong { color: var(--brand-hover); font-size: 14px; }
.delivery-profile span { color: var(--text); font-size: 12px; font-weight: 700; }
.delivery-profile small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.review-readiness { margin: 0; padding: 10px 11px; border-radius: 6px; font-size: 12px; line-height: 1.6; }
.review-readiness.ready { background: #e8f5ef; color: #125e49; }
.review-readiness.warning { background: var(--warning-soft); color: var(--warning); }

.generate-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 22px 0 42px; padding: 18px 20px; border-radius: var(--radius-large); background: #17463a; color: #fff; }
.generate-bar strong { display: block; font-size: 14px; }
.generate-bar span { display: block; margin-top: 4px; color: #cae0d7; font-size: 12px; }
.primary-button { min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 6px; background: #fff; color: #0b5d49; font-size: 13px; font-weight: 800; white-space: nowrap; }
.primary-button:hover { background: #eaf5f0; }
.primary-button:active { transform: translateY(1px); }
.button-icon { margin-right: 5px; font-size: 15px; }
.spinner { display: inline-block; width: 14px; height: 14px; margin-right: 6px; border: 2px solid rgba(12, 106, 84, .25); border-top-color: var(--brand); border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-section { padding: clamp(22px, 3vw, 30px); scroll-margin-top: 86px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.result-actions { display: flex; gap: 8px; }
.empty-result { padding: 52px 20px 42px; color: var(--muted); text-align: center; }
.empty-orbit { display: grid; width: 42px; height: 42px; place-items: center; margin: 0 auto 13px; border: 1px solid #b9d8ca; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 18px; }
.empty-result h3 { margin: 0 0 7px; color: var(--ink); font-size: 15px; }
.empty-result p { max-width: 460px; margin: 0 auto; font-size: 12px; line-height: 1.65; }
.result-meta { display: flex; flex-wrap: wrap; gap: 11px; padding: 17px 0 10px; color: var(--subtle); font-size: 11px; }
.result-meta span:first-child { color: var(--brand); font-weight: 700; }
.warning-box { margin: 8px 0 16px; padding: 10px 12px; border: 1px solid #edd8a8; border-radius: var(--radius); background: var(--warning-soft); color: #745a2d; font-size: 12px; line-height: 1.6; }
.process-strip { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 22px; }
.process-strip span { padding: 5px 9px; border: 1px solid #bbd9ca; border-radius: 999px; background: #f2f8f5; color: var(--brand-hover); font-size: 11px; font-weight: 700; }
.scheme-document { color: #314940; font-family: "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.9; }
.scheme-document h2 { margin: 32px 0 13px; padding-bottom: 9px; border-bottom: 1px solid var(--line); color: #194d3e; font-size: 20px; line-height: 1.4; }
.scheme-document h3 { margin: 22px 0 8px; color: #24664f; font-size: 16px; }
.scheme-document h4 { margin: 18px 0 8px; font-size: 15px; }
.scheme-document p { margin: 8px 0; }
.scheme-document ol { padding-left: 24px; margin: 8px 0; }
.scheme-document blockquote { margin: 16px 0; padding: 9px 13px; border: 1px solid #cbe0d5; border-radius: var(--radius); background: #f4faf7; color: #4c675c; }
.table-wrap { overflow-x: auto; margin: 13px 0; }
.scheme-document table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 12px; }
.scheme-document th { background: #edf6f1; color: #315b4c; }
.scheme-document th,
.scheme-document td { padding: 7px 9px; border: 1px solid #d8e4de; text-align: left; vertical-align: top; }

.license-dialog { width: min(580px, calc(100vw - 30px)); max-height: min(780px, calc(100dvh - 30px)); padding: 0; border: 0; border-radius: var(--radius-large); box-shadow: 0 18px 48px rgba(19, 43, 39, .22); color: var(--ink); }
.license-dialog::backdrop { background: rgba(17, 42, 35, .4); }
.license-dialog form { position: relative; max-height: min(780px, calc(100dvh - 30px)); padding: 29px; overflow-y: auto; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font-size: 19px; }
.dialog-close:hover { border-color: var(--brand); color: var(--brand); }
.license-dialog h2 { margin: 7px 0 9px; font-size: 23px; }
.dialog-copy { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.legal-consent { margin-top: 18px; padding: 15px 0 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.legal-consent-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.legal-consent-heading strong { color: var(--ink); font-size: 13px; }
.legal-consent-heading span { color: var(--subtle); font-size: 10px; }
.legal-ai-notice { margin: 9px 0 12px; color: #465f56; font-size: 12px; line-height: 1.65; }
.legal-consent details { border-top: 1px solid #e3ebe7; }
.legal-consent summary { padding: 10px 2px; color: var(--brand-hover); font-size: 12px; font-weight: 700; cursor: pointer; }
.legal-consent ul { margin: 0 0 12px; padding-left: 22px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.legal-consent li + li { margin-top: 5px; }
.legal-retention { margin: 10px 2px; color: var(--subtle); font-size: 10px; line-height: 1.55; }
.consent-check { display: flex; align-items: flex-start; gap: 9px; margin: 12px 0; color: var(--text); font-size: 12px; font-weight: 650; line-height: 1.55; cursor: pointer; }
.consent-check input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); }
.full-button { width: 100%; margin-top: 17px; background: var(--brand); color: #fff; }
.full-button:hover { background: var(--brand-hover); }
.form-message { min-height: 20px; margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--brand); }
.license-detail { margin-top: 17px; padding: 11px 13px; border: 1px solid #d5e8de; border-radius: 6px; background: #f5faf7; }
.license-detail div { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: 12px; }
.license-detail span { color: var(--muted); }
.license-detail strong { color: var(--ink); text-align: right; }
.fine-print { margin: 17px 0 0; color: #778782; font-size: 11px; line-height: 1.55; }
.ai-disclosure { margin: 7px 0 10px; padding: 9px 11px; background: var(--brand-soft); color: #315c4d; font-size: 11px; line-height: 1.55; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 1020px) {
  .workspace { grid-template-columns: 208px minmax(0, 1fr); }
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .workspace-status { grid-template-columns: 1fr 1fr; }
  .workspace-status > p { grid-column: 1 / -1; border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .workspace { display: block; }
  .sidebar { display: none; }
  .content { width: 100%; }
  .quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard-progress button { justify-content: center; }
  .wizard-progress button strong { display: none; }
  .review-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .welcome-visual { width: 100vw; }
  .welcome-content h1 { font-size: 42px; }
  .welcome-capabilities span { padding: 5px 8px; }
  .topbar { height: 62px; padding: 0 14px; }
  .brand small,
  .topbar-actions .command-button { display: none; }
  .topbar-actions { gap: 0; }
  .content { padding: 25px 14px 54px; }
  .hero { display: block; padding-bottom: 19px; }
  .hero h1 { font-size: 27px; }
  .hero-badge { display: inline-block; margin-top: 17px; }
  .industry-insight { grid-template-columns: 1fr; gap: 8px; }
  .workspace-status { grid-template-columns: 1fr; }
  .status-summary { border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-status > p { grid-column: auto; }
  .wizard-progress { position: sticky; top: 62px; z-index: 4; }
  .wizard-progress button { min-height: 46px; padding: 7px 4px; }
  .wizard-progress button span { width: 22px; height: 22px; flex-basis: 22px; }
  .form-card,
  .result-section { padding: 20px 16px; }
  .section-heading { display: block; }
  .section-heading p { max-width: none; margin: 9px 0 0 38px; text-align: left; }
  .decision-intro { display: block; }
  .decision-intro p { margin-top: 8px; text-align: left; }
  .process-designer-heading { display: block; }
  .process-heading-actions { justify-content: flex-start; margin-top: 13px; }
  .process-flow-viewport { padding: 30px 15px 22px; }
  .process-editor { align-items: stretch; flex-direction: column; }
  .process-editor .quiet-button,
  .process-confirm-button { width: 100%; }
  .process-legend { flex-wrap: wrap; gap: 9px 13px; }
  .process-legend strong { width: 100%; margin-left: 0; text-align: center; }
  .form-grid,
  .quality-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .generate-bar { display: block; }
  .generate-bar .primary-button { width: 100%; margin-top: 15px; }
  .wizard-actions { grid-template-columns: 1fr 1fr; }
  .wizard-actions > span { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .wizard-actions #wizardPrevious { grid-column: 1; grid-row: 2; width: 100%; }
  .wizard-actions #wizardNext { grid-column: 2; grid-row: 2; width: 100%; }
  .review-summary > div { grid-template-columns: 1fr; gap: 4px; }
  .review-summary strong { text-align: left; }
  .result-heading { align-items: flex-start; }
  .result-actions { display: grid; gap: 6px; }
  .license-dialog form { padding: 24px 18px; }
  .legal-consent-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}
