:root {
  --ink: #f4f7f2;
  --muted: #9aa5a1;
  --paper: #070909;
  --paper-soft: #101617;
  --paper-warm: #18201e;
  --line: rgba(232, 241, 236, 0.14);
  --accent: #ffb234;
  --accent-deep: #ff6a22;
  --accent-soft: rgba(255, 178, 52, 0.13);
  --button-metal: rgba(244, 247, 242, 0.075);
  --button-metal-strong: rgba(244, 247, 242, 0.115);
  --green: #20392a;
  --red: #ff6b55;
  --panel: rgba(15, 21, 22, 0.86);
  --panel-strong: rgba(20, 27, 28, 0.96);
  --panel-soft: rgba(244, 247, 242, 0.045);
  --shadow: 0 32px 110px rgba(0, 0, 0, 0.46);
  --soft-shadow: 0 16px 44px rgba(0, 0, 0, 0.32);
  --fs-h1: 22px;
  --fs-h2: 14px;
  --fs-body: 13px;
  --fs-meta: 11px;
  --lh-ui: 1.56;
  font-family: Inter, "Arial", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.recipe-decomposition-card {
  margin: 18px 0;
}

.starch-handling-card {
  margin: 0 0 18px;
  border-color: rgba(221, 94, 28, 0.38) !important;
  background: #fffaf5 !important;
}

.starch-handling-card .block-title span,
.starch-handling-card .small-note {
  color: #c64e16 !important;
}

.starch-pump-warning {
  border-color: rgba(221, 94, 28, 0.34) !important;
  background: #fff4ea !important;
}

.recipe-decomposition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.recipe-decomposition-grid article {
  min-width: 0;
  border: 1px solid var(--line, #e5ddd3);
  border-radius: 10px;
  background: var(--panel-soft, #faf8f5);
  padding: 14px;
}

.recipe-decomposition-grid strong {
  display: block;
  margin-bottom: 8px;
}

.recipe-decomposition-grid ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.recipe-decomposition-grid li,
.recipe-decomposition-grid span {
  color: var(--muted, #716b65);
  font-size: var(--fs-body);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .recipe-decomposition-grid {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  background-color: #070909;
  background-image:
    linear-gradient(116deg, rgba(255, 178, 52, 0.12) 0%, rgba(255, 178, 52, 0.04) 21%, transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
    repeating-linear-gradient(90deg, rgba(232, 241, 236, 0.045) 0 1px, transparent 1px 112px),
    repeating-linear-gradient(0deg, rgba(232, 241, 236, 0.035) 0 1px, transparent 1px 112px),
    linear-gradient(135deg, #050606 0%, #0b1011 42%, #121818 100%);
  background-attachment: fixed;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

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

.app-shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 14px;
  backdrop-filter: blur(18px);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 4px -8px 8px;
  z-index: -1;
  border: 1px solid rgba(232, 241, 236, 0.08);
  border-radius: 16px;
  background: rgba(7, 9, 9, 0.64);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 178, 52, 0.46);
  background:
    linear-gradient(145deg, rgba(255, 178, 52, 0.2), rgba(244, 247, 242, 0.035) 42%),
    rgba(7, 9, 9, 0.72);
  display: grid;
  place-items: center;
  color: #ffd28a;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 12px 26px rgba(0, 0, 0, 0.28);
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: var(--fs-h1);
  font-weight: 950;
  line-height: 1.1;
}

.brand small {
  margin-top: 2px;
  color: rgba(244, 247, 242, 0.58);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.ghost-button,
.primary-button,
.dark-button,
.stage-button,
.quick-row button {
  min-height: 38px;
  border: 1px solid rgba(244, 247, 242, 0.18);
  border-radius: 10px;
  padding: 0 14px;
  background:
    linear-gradient(180deg, var(--button-metal-strong), rgba(244, 247, 242, 0.045));
  color: var(--ink);
  font-size: var(--fs-body);
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.ghost-button:hover,
.primary-button:hover,
.dark-button:hover,
.stage-button:hover,
.quick-row button:hover {
  border-color: rgba(255, 178, 52, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 178, 52, 0.13), rgba(244, 247, 242, 0.06));
}

.primary-button,
.stage-button {
  background:
    linear-gradient(180deg, rgba(255, 178, 52, 0.18) 0%, rgba(244, 247, 242, 0.065) 100%),
    rgba(7, 9, 9, 0.74);
  color: #fff4dc;
  border-color: rgba(255, 178, 52, 0.38);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.075) inset;
}

.ghost-button {
  background:
    linear-gradient(180deg, var(--button-metal), rgba(244, 247, 242, 0.035));
  color: rgba(244, 247, 242, 0.86);
}

.dark-button {
  width: 100%;
  margin-top: 14px;
  background:
    linear-gradient(180deg, rgba(255, 178, 52, 0.17), rgba(244, 247, 242, 0.06)),
    rgba(7, 9, 9, 0.8);
  color: #fff4dc;
  border-color: rgba(255, 178, 52, 0.34);
}

body[data-step="intro"] .step-back,
body:not([data-step="program"]) #exportBtn {
  display: none;
}

.flow-main {
  min-height: calc(100vh - 74px);
}

.flow-stage {
  position: relative;
  isolation: isolate;
  display: none;
  min-height: calc(100vh - 86px);
  animation: stageIn 160ms ease both;
}

.command-stage::before,
.fit-stage::before,
.choose-stage::before,
.recipe-stage::before,
.program-stage::before,
.trial-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(232, 241, 236, 0.08);
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  filter: saturate(0.74) contrast(1.08);
  opacity: 0.14;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.34);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 78%, transparent 100%);
}

.command-stage::before {
  top: 11vh;
  right: 0;
  width: min(54vw, 760px);
  height: min(68vh, 620px);
  background-image:
    linear-gradient(90deg, rgba(7, 9, 9, 0.82), rgba(7, 9, 9, 0.18) 46%, rgba(7, 9, 9, 0.82)),
    url("./assets/product-kitchen-line.jpg");
}

.fit-stage::before,
.choose-stage::before {
  top: 7vh;
  left: 0;
  width: min(52vw, 760px);
  height: min(66vh, 600px);
  background-image:
    linear-gradient(90deg, rgba(7, 9, 9, 0.72), rgba(7, 9, 9, 0.28) 56%, rgba(7, 9, 9, 0.88)),
    url("./assets/product-kitchen-line.jpg");
  opacity: 0.1;
}

.recipe-stage::before,
.program-stage::before,
.trial-stage::before {
  top: 4vh;
  right: 0;
  width: min(56vw, 780px);
  height: min(54vh, 520px);
  background-image:
    linear-gradient(90deg, rgba(7, 9, 9, 0.9), rgba(7, 9, 9, 0.2) 52%, rgba(7, 9, 9, 0.92)),
    url("./assets/product-ai-workflow.jpg");
  opacity: 0.12;
}

body[data-step="intro"] [data-stage="intro"],
body[data-step="command"] [data-stage="command"],
body[data-step="fit"] [data-stage="fit"],
body[data-step="choose"] [data-stage="choose"],
body[data-step="recipe"] [data-stage="recipe"],
body[data-step="program"] [data-stage="program"],
body[data-step="trial"] [data-stage="trial"] {
  display: block;
}

@keyframes stageIn {
  from {
    opacity: 0.92;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-stage {
  position: relative;
  overflow: hidden;
  display: none;
  border: 1px solid rgba(232, 241, 236, 0.11);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(244, 247, 242, 0.09), rgba(244, 247, 242, 0.035)),
    linear-gradient(135deg, rgba(20, 28, 29, 0.96), rgba(8, 11, 11, 0.9));
  box-shadow: var(--shadow);
}

.intro-stage::before {
  content: "";
  position: absolute;
  inset: 58px 26px 26px;
  border: 1px solid rgba(232, 241, 236, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(255, 178, 52, 0.2), transparent 28%, transparent 70%, rgba(255, 178, 52, 0.08)),
    repeating-linear-gradient(90deg, rgba(232, 241, 236, 0.035) 0 1px, transparent 1px 82px);
  pointer-events: none;
}

.intro-stage::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 13%;
  width: 48%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 178, 52, 0.84), transparent);
  box-shadow: 0 0 34px rgba(255, 178, 52, 0.56);
  pointer-events: none;
}

body[data-step="intro"] .intro-stage {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: 10px;
  padding: clamp(28px, 4.2vw, 64px);
}

.intro-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 12px;
  color: rgba(255, 178, 52, 0.86);
  font-size: var(--fs-meta);
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 120px);
  line-height: 0.86;
  font-weight: 950;
}

h2 {
  margin: 0;
  font-size: var(--fs-h1);
  line-height: 1.18;
  font-weight: 950;
}

h3 {
  margin: 0;
  font-size: var(--fs-h2);
  line-height: 1.25;
  font-weight: 950;
}

.hero-text,
.stage-copy p {
  max-width: 680px;
  color: rgba(244, 247, 242, 0.72);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 430;
}

.hero-text {
  margin: 24px 0 0;
}

.intro-button {
  min-height: 48px;
  margin-top: 26px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: 12px;
}

.machine-figure {
  position: relative;
  z-index: 1;
  width: min(60vw, 780px);
  aspect-ratio: 1.333 / 1;
  margin: 0 -2% 0 0;
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(85, 129, 184, 0.28);
  border-radius: 22px;
  background: #041026;
  box-shadow: 0 42px 88px rgba(0, 0, 0, 0.58);
}

.machine-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 7, 7, 0.06), transparent 42%, rgba(17, 93, 180, 0.08));
  pointer-events: none;
}

.machine-figure::after {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 8%;
  z-index: 2;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 178, 52, 0.88), transparent);
  box-shadow: 0 0 26px rgba(49, 151, 255, 0.42);
  opacity: 0.46;
  pointer-events: none;
}

.machine-figure img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.02) contrast(1.04) brightness(0.94);
}

.stage-shell {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 86px);
  display: grid;
  grid-template-columns: minmax(240px, 0.58fr) minmax(430px, 0.95fr);
  gap: clamp(20px, 3.5vw, 48px);
  align-items: center;
  padding: clamp(20px, 3.4vw, 44px);
}

.narrow-shell {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.center-copy {
  text-align: center;
}

.command-panel,
.judgement-board,
.match-panel,
.result-panel,
.program-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.command-panel {
  max-width: 760px;
  padding: clamp(22px, 2.8vw, 32px);
}

.command-field {
  display: block;
  text-align: left;
}

.command-field span,
.field span {
  display: block;
  margin-bottom: 8px;
  color: rgba(244, 247, 242, 0.62);
  font-size: var(--fs-meta);
  font-weight: 950;
}

.command-field span {
  color: rgba(244, 247, 242, 0.46);
  font-weight: 760;
}

textarea,
select,
input[type="number"] {
  width: 100%;
  border: 1px solid rgba(232, 241, 236, 0.16);
  border-radius: 12px;
  background: rgba(5, 7, 7, 0.7);
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 132px;
  padding: 15px;
  resize: vertical;
  font-size: var(--fs-body);
  line-height: 1.55;
  font-weight: 680;
}

textarea::placeholder {
  color: rgba(244, 247, 242, 0.32);
  font-weight: 620;
}

select,
input[type="number"] {
  min-height: 48px;
  padding: 0 14px;
  font-size: var(--fs-body);
  font-weight: 850;
}

textarea:focus,
select:focus,
input[type="number"]:focus {
  border-color: rgba(255, 178, 52, 0.82);
  box-shadow: 0 0 0 4px rgba(255, 178, 52, 0.14), 0 0 32px rgba(255, 178, 52, 0.12);
}

.custom-serving-input {
  margin-top: 8px;
}

.quick-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 12px;
}

.quick-row button {
  min-height: 34px;
  padding: 0 12px;
  border-color: rgba(232, 241, 236, 0.18);
  background: transparent;
  color: rgba(244, 247, 242, 0.66);
  font-size: var(--fs-body);
  border-radius: 8px;
}

.more-options {
  margin: 8px 0 16px;
  text-align: left;
}

.more-options summary {
  width: fit-content;
  padding: 8px 0;
  color: rgba(244, 247, 242, 0.72);
  font-weight: 950;
  cursor: pointer;
}

.always-open-options {
  margin-top: 22px;
}

.options-title {
  margin: 0;
  padding: 8px 0;
  color: var(--workspace-text, #1f2428);
  font-size: 14px;
  font-weight: 700;
}

.light-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.serving-option {
  width: min(280px, 100%);
  margin-top: 22px;
  text-align: left;
}

.generate-button {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
}

.command-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: rgba(255, 178, 52, 0.88);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 760;
  text-align: left;
}

.judgement-board,
.match-panel,
.result-panel,
.program-card {
  padding: clamp(22px, 2.8vw, 34px);
}

.judgement-head,
.match-summary,
.block-title,
.match-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.fit-summary {
  margin: 14px 0;
  color: rgba(244, 247, 242, 0.72);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 520;
}

.thinking-console {
  display: none;
  margin: 16px 0;
  border: 1px solid rgba(255, 178, 52, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 178, 52, 0.08), rgba(244, 247, 242, 0.035)),
    rgba(5, 7, 7, 0.44);
  padding: 14px;
}

.thinking-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 13px;
  margin-bottom: 12px;
}

.thinking-core {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 178, 52, 0.38);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 178, 52, 0.28), rgba(255, 178, 52, 0.05) 46%, rgba(6, 10, 10, 0.86) 72%),
    rgba(5, 7, 7, 0.76);
  box-shadow: 0 0 32px rgba(255, 178, 52, 0.14);
}

.thinking-core::before,
.thinking-core::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(255, 178, 52, 0.18);
  border-radius: 18px;
  opacity: 0.64;
}

.thinking-core::after {
  inset: -14px;
  border-color: rgba(49, 151, 255, 0.12);
  opacity: 0.4;
}

.thinking-console.active .thinking-core {
  animation: corePulse 1.25s ease-in-out infinite;
}

.thinking-core span {
  position: relative;
  z-index: 1;
  color: #ffd28a;
  font-size: var(--fs-meta);
  font-weight: 950;
}

.thinking-copy strong,
.thinking-copy span {
  display: block;
}

.thinking-copy strong {
  color: rgba(244, 247, 242, 0.92);
  font-size: var(--fs-h2);
  line-height: 1.3;
  font-weight: 950;
}

.thinking-copy span {
  margin-top: 3px;
  color: rgba(244, 247, 242, 0.48);
  font-size: var(--fs-meta);
  line-height: 1.5;
  font-weight: 520;
}

.thinking-console.active,
.thinking-console.complete {
  display: block;
}

.thinking-meter {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 247, 242, 0.1);
}

.thinking-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 178, 52, 0.42), rgba(255, 207, 112, 0.98));
  box-shadow: 0 0 22px rgba(255, 178, 52, 0.22);
  transition: width 260ms ease;
}

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

.thinking-step {
  border: 1px solid rgba(232, 241, 236, 0.1);
  border-radius: 8px;
  background: rgba(244, 247, 242, 0.045);
  padding: 10px;
}

.thinking-step strong,
.thinking-step span {
  display: block;
}

.thinking-step strong {
  color: rgba(244, 247, 242, 0.66);
  font-size: var(--fs-body);
  line-height: 1.35;
  font-weight: 900;
}

.thinking-step span {
  margin-top: 5px;
  color: rgba(244, 247, 242, 0.45);
  font-size: var(--fs-meta);
  line-height: 1.5;
  font-weight: 480;
}

.thinking-step.active {
  border-color: rgba(255, 178, 52, 0.34);
  background: rgba(255, 178, 52, 0.08);
}

.thinking-step.active strong {
  color: #ffd28a;
}

.thinking-step.done {
  border-color: rgba(146, 214, 122, 0.22);
}

.thinking-step.done strong {
  color: #92d67a;
}

.thinking-code-stream {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  border-top: 1px solid rgba(232, 241, 236, 0.08);
  padding-top: 11px;
  color: rgba(146, 214, 122, 0.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
}

.thinking-code-stream span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.72;
}

@keyframes corePulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 178, 52, 0.12), 0 0 0 rgba(49, 151, 255, 0);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 38px rgba(255, 178, 52, 0.26), 0 0 34px rgba(49, 151, 255, 0.12);
    transform: scale(1.018);
  }
}

.fit-chip-row,
.reason-chips,
.technique-chips,
.state-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fit-chip-row span,
.reason-chips span,
.technique-chips span,
.state-stack span,
.block-title span,
.match-head span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(232, 241, 236, 0.14);
  border-radius: 5px;
  background: rgba(244, 247, 242, 0.06);
  padding: 0 11px;
  color: rgba(244, 247, 242, 0.76);
  font-size: var(--fs-meta);
  font-weight: 850;
}

#machineFitStatus.fit-pass {
  color: #92d67a;
}

#machineFitStatus.fit-warn {
  color: #ffbd6b;
}

#machineFitStatus.fit-block {
  color: var(--red);
}

.fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 20px;
}

.fit-grid > div,
.mini-item,
.review-item,
.liquid-box,
.capability-list div,
.warning-list p,
.normalize-list p,
.command-item {
  border: 1px solid rgba(232, 241, 236, 0.12);
  border-radius: 12px;
  background: rgba(244, 247, 242, 0.055);
  padding: 16px;
}

.fit-grid strong {
  display: block;
  margin-bottom: 10px;
  font-size: var(--fs-h2);
  font-weight: 950;
}

.fit-grid p,
.warning-list p,
.normalize-list p,
.technique-reasons p {
  margin: 0 0 8px;
  color: rgba(244, 247, 242, 0.72);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 440;
}

.risk-block {
  color: var(--red) !important;
}

.risk-warn {
  color: #ffbd6b !important;
}

.match-panel {
  max-width: 1000px;
}

.match-summary {
  align-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(32, 57, 42, 0.92), rgba(18, 33, 29, 0.82));
  border: 1px solid rgba(146, 214, 122, 0.24);
  padding: 18px;
}

.match-summary h3 {
  font-size: var(--fs-h1);
  line-height: 1.22;
}

.match-summary p {
  margin: 8px 0 0;
  color: rgba(244, 247, 242, 0.72);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 430;
}

.score-ring {
  width: 112px;
  min-height: 82px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 178, 52, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 178, 52, 0.17), rgba(244, 247, 242, 0.055)),
    rgba(7, 9, 9, 0.8);
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff4dc;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26), 0 0 28px rgba(255, 178, 52, 0.08);
}

.score-ring strong,
.score-ring span {
  display: block;
}

.score-ring strong {
  padding: 0 8px;
  font-size: var(--fs-h2);
  line-height: 1.2;
  font-weight: 950;
}

.score-ring span {
  margin-top: 4px;
  font-size: var(--fs-meta);
  font-weight: 950;
  color: rgba(255, 244, 220, 0.64);
}

.match-head {
  align-items: center;
  margin: 18px 0 12px;
}

.match-head small {
  color: rgba(244, 247, 242, 0.56);
  font-size: var(--fs-meta);
  font-weight: 850;
}

.match-list {
  display: grid;
  gap: 10px;
}

.match-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid rgba(232, 241, 236, 0.12);
  border-radius: 12px;
  background: rgba(244, 247, 242, 0.055);
  padding: 16px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.match-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 178, 52, 0.7);
  box-shadow: var(--soft-shadow);
}

.match-item.featured {
  background: linear-gradient(135deg, rgba(255, 178, 52, 0.16), rgba(244, 247, 242, 0.06));
  border-color: rgba(255, 178, 52, 0.34);
}

.match-item strong,
.match-item small {
  display: block;
}

.match-item strong {
  font-size: var(--fs-body);
  font-weight: 950;
}

.match-item small {
  margin-top: 4px;
  color: rgba(244, 247, 242, 0.56);
  font-size: var(--fs-meta);
  font-weight: 800;
}

.match-item b {
  min-width: 88px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 178, 52, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 178, 52, 0.16), rgba(244, 247, 242, 0.055));
  color: #ffd28a;
  display: grid;
  place-items: center;
  font-size: var(--fs-meta);
  line-height: 1.25;
  text-align: center;
}

.reason-chips {
  grid-column: 1 / -1;
}

.candidate-supplement {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
}

.candidate-supplement small {
  margin-left: 8px;
  color: var(--success);
}

.candidate-group-label {
  display: grid;
  gap: 4px;
  margin: 20px 0 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--orange);
  background: #fffaf6;
}

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

.candidate-group-label strong {
  color: var(--ink);
  font-size: 15px;
}

.candidate-group-label small {
  color: var(--muted);
  line-height: 1.5;
}

.candidate-transformation {
  border-color: #d87824;
  background: #fff8ef;
}

.program-shell {
  display: block;
  padding-top: clamp(18px, 4vw, 44px);
}

.program-copy {
  margin-bottom: 18px;
}

.fit-stage .stage-copy,
.choose-stage .stage-copy {
  margin-bottom: 18px;
}

.fit-stage .judgement-board,
.choose-stage .match-panel {
  max-width: none;
}

.result-panel {
  margin-bottom: 16px;
}

.result-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.dish-image-frame {
  width: 150px;
  height: 116px;
  border-radius: 10px;
  border: 1px solid rgba(232, 241, 236, 0.12);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 178, 52, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(244, 247, 242, 0.08), rgba(244, 247, 242, 0.025));
}

.dish-image-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 178, 52, 0.22);
  border-radius: 8px;
  animation: imagePulse 1.7s ease-in-out infinite;
}

.dish-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-image-frame img[hidden] {
  display: none !important;
}

.dish-image-frame.has-image::before,
.dish-image-frame.has-image .dish-image-placeholder {
  display: none;
}

.dish-image-placeholder {
  position: relative;
  z-index: 1;
  color: rgba(255, 210, 138, 0.92);
  font-size: var(--fs-body);
  font-weight: 950;
  letter-spacing: 0;
}

@keyframes imagePulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.result-hero h3 {
  margin-bottom: 8px;
}

.result-hero p:last-child {
  margin-bottom: 0;
  color: rgba(244, 247, 242, 0.72);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 430;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.hero-actions .ghost-button {
  border-color: rgba(255, 178, 52, 0.28);
  background: rgba(255, 178, 52, 0.075);
  color: rgba(255, 214, 154, 0.92);
}

.hero-actions .ghost-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.hero-actions span {
  color: rgba(244, 247, 242, 0.45);
  font-size: var(--fs-meta);
  line-height: 1.3;
}

.recipe-technique-brief {
  margin-top: 18px;
  border-top: 1px solid rgba(232, 241, 236, 0.1);
  padding-top: 16px;
}

.technique-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.technique-brief-head span {
  min-width: 48px;
  border: 1px solid rgba(255, 178, 52, 0.34);
  border-radius: 7px;
  background: rgba(255, 178, 52, 0.08);
  padding: 4px 10px;
  color: #ffd28a;
  font-size: var(--fs-body);
  font-weight: 950;
  text-align: center;
}

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

.metrics div {
  border-radius: 10px;
  background: rgba(244, 247, 242, 0.06);
  border: 1px solid rgba(232, 241, 236, 0.1);
  padding: 16px;
}

.metric-label,
.metric-value,
.metric-meta {
  display: block;
}

.metric-label {
  color: rgba(244, 247, 242, 0.48);
  font-size: var(--fs-meta);
  font-weight: 950;
  line-height: 1.2;
}

.metric-value {
  margin-top: 6px;
  color: #fff6df;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.metric-value small {
  margin-left: 2px;
  color: rgba(255, 244, 220, 0.62);
  font-size: 12px;
  font-weight: 850;
}

.metric-meta {
  margin-top: 8px;
  color: rgba(244, 247, 242, 0.42);
  font-size: var(--fs-meta);
  font-style: normal;
  line-height: 1.25;
}

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

.program-code-card,
.liquid-plan-panel,
.chart-block,
.cut-spec-card,
.mobile-entry-card,
.sop-card,
.export-docs-card,
.program-detail {
  grid-column: 1 / -1;
}

.cut-spec-list {
  display: grid;
  gap: 12px;
}

.cut-spec-item {
  border: 1px solid var(--line, #e4ded5);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.cut-spec-item.is-incomplete {
  border-color: #edb493;
  background: #fffaf6;
}

.cut-spec-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.cut-spec-heading span,
.cut-spec-heading strong,
.cut-spec-heading small {
  display: block;
}

.cut-spec-heading small,
.cut-spec-item p {
  margin-top: 4px;
  color: var(--muted, #726b63);
  font-size: 12px;
}

.cut-spec-heading b {
  color: #c94f19;
  font-size: 12px;
  white-space: nowrap;
}

.cut-spec-item.is-complete .cut-spec-heading b {
  color: #2f805d;
}

.cut-spec-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.cut-spec-fields label {
  position: relative;
  display: grid;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted, #726b63);
}

.cut-spec-fields input,
.cut-spec-fields select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line, #e4ded5);
  border-radius: 8px;
  background: #fff;
  padding: 8px 30px 8px 9px;
  color: #24211e;
  font: inherit;
}

.cut-spec-fields label > small {
  position: absolute;
  right: 9px;
  bottom: 11px;
  color: #9a938b;
  font-size: 10px;
}

.cut-shape-field {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .cut-spec-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cut-shape-field {
    grid-column: 1 / -1;
  }
}

.program-detail {
  overflow: hidden;
  padding: 0;
}

.program-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
}

.program-detail summary::-webkit-details-marker {
  display: none;
}

.program-detail summary h3,
.program-detail summary small {
  display: block;
}

.program-detail summary h3 {
  color: #ffd28a;
  font-size: var(--fs-h2);
  line-height: 1.25;
  font-weight: 950;
}

.program-detail summary small {
  margin-top: 5px;
  color: rgba(244, 247, 242, 0.48);
  font-size: var(--fs-meta);
  line-height: 1.35;
  font-weight: 520;
}

.program-detail summary b {
  flex: 0 0 auto;
  border: 1px solid rgba(232, 241, 236, 0.16);
  border-radius: 7px;
  background: rgba(244, 247, 242, 0.055);
  padding: 5px 10px;
  color: rgba(244, 247, 242, 0.82);
  font-size: var(--fs-meta);
  font-weight: 950;
}

.program-detail summary::after {
  content: "展开";
  flex: 0 0 auto;
  color: rgba(255, 178, 52, 0.82);
  font-size: var(--fs-meta);
  font-weight: 950;
}

.program-detail[open] summary::after {
  content: "收起";
}

.program-detail-content {
  border-top: 1px solid rgba(232, 241, 236, 0.08);
  padding: 18px 20px 20px;
}

.block-title {
  align-items: center;
  margin-bottom: 16px;
}

.block-title h3 {
  color: #ffd28a;
  font-size: var(--fs-h2);
  line-height: 1.25;
  font-weight: 950;
}

.sop-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.sop-info-item {
  border: 1px solid rgba(232, 241, 236, 0.1);
  border-radius: 8px;
  background: rgba(244, 247, 242, 0.045);
  padding: 11px 12px;
}

.sop-info-item.wide {
  grid-column: span 2;
}

.sop-info-item strong,
.sop-info-item span {
  display: block;
}

.sop-info-item strong {
  color: rgba(244, 247, 242, 0.46);
  font-size: var(--fs-meta);
  line-height: 1.2;
  font-weight: 950;
}

.sop-info-item span {
  margin-top: 5px;
  color: rgba(244, 247, 242, 0.82);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 560;
}

.sop-table-wrap {
  border: 1px solid rgba(232, 241, 236, 0.12);
  border-radius: 10px;
  background: rgba(5, 7, 7, 0.32);
}

.sop-table {
  min-width: 760px;
}

.sop-table th,
.sop-table td {
  border-right: 1px solid rgba(232, 241, 236, 0.08);
}

.sop-lower-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 14px;
  margin-top: 14px;
}

.sop-lower-grid > div {
  border: 1px solid rgba(232, 241, 236, 0.1);
  border-radius: 10px;
  background: rgba(244, 247, 242, 0.045);
  padding: 14px;
}

.sop-lower-grid h4 {
  margin: 0 0 10px;
  color: #ffd28a;
  font-size: var(--fs-h2);
  line-height: 1.25;
}

.sop-box-standard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sop-box-standard article {
  min-height: 130px;
  border: 1px solid rgba(232, 241, 236, 0.14);
  border-radius: 8px;
  background: rgba(7, 9, 9, 0.36);
  padding: 10px;
}

.sop-box-standard strong,
.sop-box-standard span,
.sop-quality-notes p {
  display: block;
}

.sop-box-standard strong {
  color: rgba(244, 247, 242, 0.9);
  font-size: var(--fs-body);
  font-weight: 950;
}

.sop-box-standard span,
.sop-quality-notes p {
  margin: 6px 0 0;
  color: rgba(244, 247, 242, 0.68);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
}

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

.export-doc-grid article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 164px;
  border: 1px solid rgba(232, 241, 236, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 178, 52, 0.1), rgba(244, 247, 242, 0.03)),
    rgba(7, 9, 9, 0.36);
  padding: 16px;
}

.export-doc-grid strong {
  color: rgba(244, 247, 242, 0.92);
  font-size: var(--fs-h2);
  line-height: 1.25;
  font-weight: 950;
}

.export-doc-grid p {
  min-height: 54px;
  margin: 0;
  color: rgba(244, 247, 242, 0.62);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
}

.export-doc-grid .ghost-button {
  justify-self: start;
  border-color: rgba(255, 178, 52, 0.32);
  color: rgba(255, 214, 154, 0.94);
  background: rgba(255, 178, 52, 0.08);
}

.mini-list,
.review-list,
.normalize-list,
.capability-list {
  display: grid;
  gap: 12px;
}

.mini-item strong,
.mini-item span,
.mini-item small {
  display: block;
}

.mini-item strong {
  color: rgba(244, 247, 242, 0.94);
  font-size: var(--fs-body);
  line-height: 1.35;
  font-weight: 950;
}

.mini-item span,
.mini-item small {
  margin-top: 6px;
  color: rgba(244, 247, 242, 0.62);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 430;
}

.mini-item small {
  color: rgba(244, 247, 242, 0.46);
  font-size: var(--fs-meta);
}

.small-note {
  color: rgba(244, 247, 242, 0.7);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 430;
}

.technique-chips,
.state-stack {
  margin: 12px 0;
}

.liquid-box-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.liquid-box.large {
  background: rgba(32, 57, 42, 0.7);
}

.liquid-box.empty {
  opacity: 0.66;
}

.box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.box-head strong {
  font-size: var(--fs-body);
  font-weight: 950;
}

.box-head span {
  color: rgba(244, 247, 242, 0.56);
  font-size: var(--fs-meta);
  font-weight: 900;
}

.box-select {
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
}

.liquid-box p,
.liquid-box small {
  display: block;
  margin: 8px 0 0;
  color: rgba(244, 247, 242, 0.6);
  font-size: var(--fs-meta);
  line-height: 1.45;
  font-weight: 520;
}

.phase-chart {
  min-height: 160px;
  display: flex;
  align-items: end;
  gap: 10px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(244, 247, 242, 0.035), transparent),
    repeating-linear-gradient(90deg, rgba(232, 241, 236, 0.06) 0 1px, transparent 1px 68px),
    #050707;
  border: 1px solid rgba(232, 241, 236, 0.12);
  padding: 18px;
}

.bar {
  flex: 1;
  min-height: 42px;
  border-radius: 8px 8px 4px 4px;
  background: var(--accent);
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 8px 4px;
}

.bar:nth-child(2n) {
  background: var(--green);
}

.bar:nth-child(3n) {
  background: var(--accent-deep);
}

.bar span {
  color: #0b0d0c;
  font-size: var(--fs-meta);
  font-weight: 950;
}

.table-wrap {
  overflow: auto;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  border-bottom: 1px solid rgba(232, 241, 236, 0.1);
  padding: 12px 10px;
  text-align: left;
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
}

th {
  color: rgba(244, 247, 242, 0.58);
  font-size: var(--fs-meta);
  font-weight: 950;
}

td {
  color: rgba(244, 247, 242, 0.84);
  font-weight: 430;
}

.command-list {
  max-height: 420px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.command-item {
  padding: 13px 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  color: rgba(244, 247, 242, 0.88);
}

.review-item.pass {
  background: rgba(42, 78, 45, 0.36);
  border-color: rgba(146, 214, 122, 0.24);
}

.review-item.warn {
  background: rgba(128, 82, 18, 0.32);
  border-color: rgba(255, 189, 107, 0.24);
}

.review-item.error {
  background: rgba(124, 41, 32, 0.34);
  border-color: rgba(255, 107, 85, 0.28);
}

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

.review-item strong {
  color: rgba(244, 247, 242, 0.94);
  font-size: var(--fs-body);
  line-height: 1.35;
  font-weight: 950;
}

.review-item span {
  margin-top: 5px;
  color: rgba(244, 247, 242, 0.64);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 430;
}

.capability-list div {
  color: rgba(244, 247, 242, 0.72);
  line-height: var(--lh-ui);
  font-size: var(--fs-body);
  font-weight: 430;
}

.tag-line,
.capability-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tag-line strong,
.capability-item strong {
  flex: 0 0 auto;
  max-width: 108px;
  border: 1px solid rgba(255, 178, 52, 0.22);
  border-radius: 5px;
  background: rgba(255, 178, 52, 0.075);
  padding: 2px 7px;
  color: #ffd28a;
  font-size: var(--fs-meta);
  line-height: 1.35;
  font-weight: 900;
}

.tag-line span,
.capability-item span {
  min-width: 0;
  color: rgba(244, 247, 242, 0.72);
  font-size: var(--fs-body);
  line-height: var(--lh-ui);
  font-weight: 430;
}

.capability-item strong {
  min-width: 72px;
  text-align: center;
}

/* Phase 4 workbench */
.workbench-shell {
  display: none;
  min-height: calc(100vh - 82px);
  padding-bottom: 92px;
}

body:not([data-step="intro"]) .workbench-shell {
  display: block;
}

body:not([data-step="intro"]) #backBtn,
body:not([data-step="intro"]) #exportBtn {
  display: none;
}

.workflow-progress {
  position: sticky;
  top: 70px;
  z-index: 17;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 6px 0 14px;
  border: 1px solid rgba(232, 241, 236, 0.12);
  border-radius: 12px;
  background: rgba(7, 9, 9, 0.9);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

.workflow-progress-item {
  position: relative;
  min-width: 0;
  min-height: 52px;
  border: 0;
  border-right: 1px solid rgba(232, 241, 236, 0.08);
  border-radius: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(244, 247, 242, 0.025);
  color: rgba(244, 247, 242, 0.54);
  text-align: left;
}

.workflow-progress-item:last-child {
  border-right: 0;
}

.workflow-progress-item > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 241, 236, 0.16);
  border-radius: 50%;
  font-size: var(--fs-meta);
  font-weight: 900;
}

.workflow-progress-item strong,
.workflow-progress-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-progress-item strong {
  color: inherit;
  font-size: var(--fs-body);
}

.workflow-progress-item small {
  margin-top: 1px;
  color: rgba(244, 247, 242, 0.38);
  font-size: var(--fs-meta);
}

.workflow-progress-item.active {
  background: linear-gradient(180deg, rgba(255, 178, 52, 0.13), rgba(255, 178, 52, 0.05));
  color: #fff1d4;
}

.workflow-progress-item.active > span {
  border-color: rgba(255, 178, 52, 0.54);
  color: #ffd28a;
}

.workflow-progress-item.complete {
  color: rgba(191, 230, 199, 0.9);
}

.workflow-progress-item.complete > span {
  border-color: rgba(108, 197, 129, 0.36);
  background: rgba(108, 197, 129, 0.1);
}

.workflow-progress-item.error {
  color: #ff9b8b;
  background: rgba(255, 107, 85, 0.08);
}

.workbench-grid {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr) 272px;
  gap: 14px;
  align-items: start;
}

.workflow-sidebar,
.context-sidebar {
  position: sticky;
  top: 140px;
  border: 1px solid rgba(232, 241, 236, 0.12);
  border-radius: 14px;
  background: rgba(12, 17, 18, 0.9);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.workflow-sidebar {
  display: grid;
  overflow: hidden;
  padding: 5px;
}

.workflow-side-item {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid rgba(232, 241, 236, 0.07);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: transparent;
  color: rgba(244, 247, 242, 0.56);
  text-align: left;
}

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

.workflow-side-item:hover:not(:disabled),
.workflow-side-item.active {
  background: rgba(255, 178, 52, 0.09);
  color: var(--ink);
}

.workflow-side-item:disabled {
  cursor: default;
  opacity: 0.62;
}

.workflow-side-item > span {
  color: rgba(255, 178, 52, 0.76);
  font-size: var(--fs-meta);
  font-weight: 950;
}

.workflow-side-item strong,
.workflow-side-item small {
  display: block;
}

.workflow-side-item strong {
  font-size: var(--fs-body);
}

.workflow-side-item small {
  color: rgba(244, 247, 242, 0.42);
  font-size: var(--fs-meta);
}

.workflow-side-item b {
  min-width: 21px;
  min-height: 21px;
  padding: 2px 5px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: rgba(255, 107, 85, 0.14);
  color: #ff9b8b;
  font-size: var(--fs-meta);
}

.workbench-stage-area {
  min-width: 0;
}

.workbench-stage-area .flow-stage {
  min-height: 0;
}

.workbench-stage-area .stage-shell {
  min-height: 0;
  display: block;
  padding: 12px 0 28px;
}

.workbench-stage-area .stage-copy {
  margin: 0 0 14px;
  text-align: left;
}

.workbench-stage-area .stage-copy .eyebrow {
  margin-bottom: 4px;
}

.workbench-stage-area .stage-copy h2 {
  margin-bottom: 4px;
}

.workbench-stage-area .stage-copy p:last-child {
  margin-bottom: 0;
  color: rgba(244, 247, 242, 0.62);
}

.workbench-stage-area .command-stage::before,
.workbench-stage-area .fit-stage::before,
.workbench-stage-area .choose-stage::before,
.workbench-stage-area .recipe-stage::before,
.workbench-stage-area .program-stage::before,
.workbench-stage-area .trial-stage::before {
  display: none;
}

.workbench-stage-area .narrow-shell {
  justify-items: stretch;
  text-align: left;
}

.workbench-stage-area .command-panel {
  max-width: none;
}

.workbench-stage-area #generateBtn,
.workbench-stage-area #continueToChooseBtn,
.workbench-stage-area #confirmRecipeBtn,
.workbench-stage-area #handoffBtn {
  display: none;
}

.context-sidebar {
  overflow: hidden;
}

.context-toggle {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(232, 241, 236, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(244, 247, 242, 0.035);
  color: var(--ink);
  text-align: left;
}

.context-toggle span {
  font-weight: 900;
}

.context-toggle b {
  color: rgba(244, 247, 242, 0.55);
  font-size: var(--fs-meta);
}

.context-toggle.has-errors b {
  color: #ff9b8b;
}

.context-sidebar-body {
  display: grid;
}

.context-block {
  padding: 13px;
  border-bottom: 1px solid rgba(232, 241, 236, 0.075);
}

.context-block:last-child {
  border-bottom: 0;
}

.context-block .panel-kicker {
  margin-bottom: 7px;
}

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

#contextDemandSummary,
#contextDeviceSummary,
#contextSaveStatus,
#contextNetworkStatus {
  color: rgba(244, 247, 242, 0.7);
  font-size: var(--fs-meta);
  overflow-wrap: anywhere;
}

#contextDeviceSummary {
  display: grid;
  gap: 4px;
}

.context-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.context-block-head span {
  color: rgba(244, 247, 242, 0.52);
  font-size: var(--fs-meta);
}

#contextValidationList {
  display: grid;
  gap: 6px;
}

.context-validation-item {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: start;
  color: rgba(244, 247, 242, 0.65);
  font-size: var(--fs-meta);
}

.context-validation-item::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: rgba(108, 197, 129, 0.8);
}

.context-validation-item.error::before {
  background: var(--red);
}

.context-validation-item.warn::before {
  background: var(--accent);
}

.context-system-block.is-offline {
  background: rgba(255, 178, 52, 0.06);
}

.workbench-actionbar {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 12px;
  width: min(880px, calc(100vw - 28px));
  min-height: 66px;
  transform: translateX(-50%);
  border: 1px solid rgba(232, 241, 236, 0.16);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: rgba(8, 11, 11, 0.94);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(20px);
}

body[data-step="intro"] .workbench-actionbar {
  display: none;
}

.actionbar-status span,
.actionbar-status small {
  display: block;
}

.actionbar-status span {
  color: #ffd28a;
  font-size: var(--fs-meta);
  font-weight: 900;
}

.actionbar-status small {
  margin-top: 2px;
  color: rgba(244, 247, 242, 0.52);
  font-size: var(--fs-meta);
}

.actionbar-buttons {
  display: flex;
  gap: 8px;
}

.trial-status-board {
  border: 1px solid rgba(232, 241, 236, 0.14);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px;
  background: rgba(15, 21, 22, 0.88);
}

.trial-status-board h3,
.trial-status-board p:last-child {
  margin-bottom: 0;
}

.trial-status-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 178, 52, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  color: #ffd28a;
  font-size: var(--fs-meta);
  font-weight: 900;
}

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

.trial-grid .export-docs-card {
  grid-column: 1 / -1;
}

.trial-form-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.4fr) minmax(0, 1fr);
  gap: 12px;
}

.trial-confirmation-card input,
.trial-confirmation-card textarea {
  padding: 11px 12px;
}

.trial-note-field {
  grid-column: 1 / -1;
}

.dispatch-card .primary-button {
  width: 100%;
  margin-top: 16px;
}

body.mode-mobile .app-shell {
  max-width: 430px;
}

body.mode-mobile .topbar {
  position: static;
}

body.mode-mobile .top-actions {
  justify-content: flex-start;
}

body.mode-mobile .stage-shell,
body.mode-mobile .program-grid,
body.mode-mobile .fit-grid,
body.mode-mobile .metrics,
body.mode-mobile .light-options,
body.mode-mobile .liquid-box-grid,
body.mode-mobile .export-doc-grid,
body.mode-mobile .trial-grid,
body.mode-mobile .trial-form-grid,
body.mode-mobile .sop-info-grid,
body.mode-mobile .sop-lower-grid,
body.mode-mobile .sop-box-standard {
  grid-template-columns: 1fr;
}

body.mode-mobile .machine-figure {
  width: min(92vw, 560px);
  aspect-ratio: 1.58 / 1;
  margin: 24px auto 0;
  justify-self: center;
}

body.mode-mobile .result-hero {
  grid-template-columns: 1fr;
}

body.mode-mobile .dish-image-frame {
  width: 100%;
  height: 190px;
}

@media (max-width: 1100px) {
  .workbench-grid {
    grid-template-columns: 1fr;
  }

  .workflow-sidebar,
  .context-sidebar {
    position: static;
  }

  .workflow-sidebar {
    grid-template-columns: repeat(6, minmax(142px, 1fr));
    overflow-x: auto;
  }

  .workflow-side-item {
    border-right: 1px solid rgba(232, 241, 236, 0.07);
    border-bottom: 0;
  }

  .context-sidebar.is-collapsed .context-sidebar-body {
    display: none;
  }

  .workbench-actionbar {
    width: min(760px, calc(100vw - 24px));
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding: 12px;
  }

  .topbar {
    position: static;
    display: grid;
  }

  .top-actions {
    justify-content: flex-start;
  }

  body[data-step="intro"] .intro-stage,
  .stage-shell,
  .program-grid,
  .fit-grid,
  .metrics,
  .light-options,
  .liquid-box-grid,
  .export-doc-grid,
  .trial-grid,
  .trial-form-grid,
  .sop-info-grid,
  .sop-lower-grid,
  .sop-box-standard {
    grid-template-columns: 1fr;
  }

  body[data-step="intro"] .intro-stage {
    min-height: calc(100vh - 132px);
    padding: 22px;
    align-content: start;
  }

  h1 {
    font-size: clamp(52px, 17vw, 88px);
  }

  h2 {
    font-size: var(--fs-h1);
    line-height: 1.18;
  }

  .machine-figure {
    width: min(92vw, 560px);
    aspect-ratio: 1.333 / 1;
    margin: 24px auto 0;
    justify-self: center;
  }

  .command-stage::before,
  .fit-stage::before,
  .choose-stage::before,
  .recipe-stage::before,
  .program-stage::before,
  .trial-stage::before {
    inset: auto 0 8vh auto;
    width: 82vw;
    height: 36vh;
    opacity: 0.08;
    mask-image: linear-gradient(90deg, transparent 0%, #000 24%, #000 74%, transparent 100%);
  }

  .stage-shell {
    min-height: auto;
    padding: 18px 2px 28px;
  }

  .command-panel,
  .judgement-board,
  .match-panel,
  .result-panel,
  .program-card {
    border-radius: 14px;
    padding: 18px;
  }

  .result-hero {
    grid-template-columns: 1fr;
  }

  .dish-image-frame {
    width: 100%;
    height: 190px;
  }

  .score-ring {
    width: 106px;
    min-height: 78px;
  }

  .match-summary {
    display: grid;
  }

  .thinking-steps {
    grid-template-columns: 1fr;
  }

  .workflow-progress {
    top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  .workflow-progress-item {
    min-height: 48px;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 6px;
    padding: 6px 7px;
  }

  .workflow-progress-item > span {
    width: 22px;
    height: 22px;
  }

  .workflow-progress-item:nth-child(-n + 3) {
    border-bottom: 1px solid rgba(232, 241, 236, 0.08);
  }

  .workflow-progress-item:nth-child(3n) {
    border-right: 0;
  }

  .workflow-sidebar {
    display: none;
  }

  .workbench-stage-area .stage-shell {
    padding-bottom: 24px;
  }

  .trial-status-board {
    display: grid;
  }

  .actionbar-status {
    display: none;
  }

  .workbench-actionbar {
    justify-content: flex-end;
  }

  .actionbar-buttons {
    width: 100%;
  }

  .actionbar-buttons button {
    flex: 1 1 auto;
  }
}

/* Cover and workbench visual alignment. Presentation only; workflow behavior is unchanged. */
:root {
  --workspace-bg: #ffffff;
  --workspace-surface: #ffffff;
  --workspace-subtle: #faf8f5;
  --workspace-hover: #f4f1ec;
  --workspace-border: #e8e3dc;
  --workspace-border-strong: #d8d1c8;
  --workspace-text: #202123;
  --workspace-muted: #686761;
  --workspace-faint: #96938c;
  --workspace-accent: #d85d20;
  --workspace-accent-soft: #fff3ec;
  --workspace-primary: #202123;
  --accent: var(--workspace-accent);
  --accent-deep: #b94b17;
  --accent-soft: var(--workspace-accent-soft);
  --paper: var(--workspace-bg);
  --paper-soft: var(--workspace-surface);
  --paper-warm: var(--workspace-subtle);
  --line: var(--workspace-border);
}

body[data-step="intro"] {
  background: #fff;
}

body[data-step="intro"] .app-shell {
  width: min(1560px, 100%);
  padding: 0 38px;
}

body[data-step="intro"] .topbar {
  display: none;
}

body[data-step="intro"] .flow-main {
  min-height: 100svh;
}

body[data-step="intro"] .intro-stage {
  display: grid;
  grid-template-columns: minmax(520px, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 64px;
  width: 100%;
  max-width: 1460px;
  min-height: 100svh;
  margin: 0 auto;
  padding: 52px 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body[data-step="intro"] .intro-copy {
  align-self: center;
  max-width: 600px;
  padding-left: clamp(0px, 3vw, 42px);
}

body[data-step="intro"] .intro-copy h1 {
  max-width: 590px;
  margin: 0;
  color: var(--workspace-text);
  font-size: 54px;
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: 0;
}

body[data-step="intro"] .intro-copy h1 span {
  display: block;
  color: var(--workspace-accent);
}

@media (min-width: 1101px) {
  body[data-step="intro"] .intro-copy h1 span {
    font-size: 48px;
    white-space: nowrap;
  }
}

body[data-step="intro"] .intro-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
}

body[data-step="intro"] .intro-button,
body[data-step="intro"] .intro-new-button {
  min-width: 118px;
  min-height: 46px;
  margin: 0;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  box-shadow: none;
}

body[data-step="intro"] .intro-button {
  border-color: var(--workspace-primary);
  background: var(--workspace-primary);
  color: #fff;
}

body[data-step="intro"] .intro-button:hover {
  border-color: #3a3a37;
  background: #3a3a37;
}

body[data-step="intro"] .intro-new-button {
  border-color: var(--workspace-border-strong);
  background: #fff;
  color: var(--workspace-text);
}

body[data-step="intro"] .intro-new-button:hover {
  border-color: #bdb6ad;
  background: var(--workspace-subtle);
}

body[data-step="intro"] .intro-draft-hint {
  display: none !important;
}

body[data-step="intro"] .machine-figure {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 4 / 3;
  margin: 0;
  align-self: center;
  justify-self: end;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-step="intro"] .machine-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none;
}

body:not([data-step="intro"]) {
  color: var(--workspace-text);
  background: #fff;
  background-image: none !important;
}

body:not([data-step="intro"]) .app-shell {
  width: min(1500px, 100%);
  padding: 0 24px 24px;
}

body:not([data-step="intro"]) .topbar {
  padding: 12px 0;
  border-bottom: 1px solid var(--workspace-border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

body:not([data-step="intro"]) .topbar::before {
  display: none;
}

body:not([data-step="intro"]) .topbar .brand-mark {
  border-color: #f0c5aa;
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
}

body:not([data-step="intro"]) .workflow-progress {
  top: 65px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--workspace-border);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.97);
}

body:not([data-step="intro"]) .workflow-progress-item {
  min-height: 54px;
  border-right: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
}

body:not([data-step="intro"]) .workflow-progress-item.active {
  border-bottom-color: var(--workspace-accent);
  background: var(--workspace-accent-soft);
  color: var(--workspace-text);
  box-shadow: none;
}

body:not([data-step="intro"]) .workflow-progress-item.active > span,
body:not([data-step="intro"]) .workflow-progress-item.active > span:first-child {
  border-color: var(--workspace-accent);
  background: var(--workspace-accent);
  color: #fff;
}

body:not([data-step="intro"]) .workflow-progress-item.complete {
  color: #287957;
}

body:not([data-step="intro"]) .workflow-progress-item.complete > span {
  border-color: #b8d8c8;
  background: #eef8f2;
  color: #287957;
}

body:not([data-step="intro"]) .workbench-grid {
  gap: 22px;
  padding-top: 24px;
}

body:not([data-step="intro"]) .workbench-stage-area .stage-copy .eyebrow,
body:not([data-step="intro"]) .panel-kicker {
  color: var(--workspace-accent);
}

body:not([data-step="intro"]) .workbench-stage-area .stage-copy h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

body:not([data-step="intro"]) .command-stage::before,
body:not([data-step="intro"]) .fit-stage::before,
body:not([data-step="intro"]) .choose-stage::before,
body:not([data-step="intro"]) .recipe-stage::before,
body:not([data-step="intro"]) .program-stage::before,
body:not([data-step="intro"]) .trial-stage::before {
  display: none;
}

body:not([data-step="intro"]) .command-panel,
body:not([data-step="intro"]) .judgement-board,
body:not([data-step="intro"]) .match-panel,
body:not([data-step="intro"]) .result-panel,
body:not([data-step="intro"]) .program-card,
body:not([data-step="intro"]) .trial-status-board,
body:not([data-step="intro"]) .sop-card,
body:not([data-step="intro"]) .liquid-plan-panel,
body:not([data-step="intro"]) .export-docs-card,
body:not([data-step="intro"]) .context-sidebar {
  border-color: var(--workspace-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

body:not([data-step="intro"]) textarea,
body:not([data-step="intro"]) select,
body:not([data-step="intro"]) input[type="text"],
body:not([data-step="intro"]) input[type="number"],
body:not([data-step="intro"]) .box-select {
  border-color: var(--workspace-border-strong);
  border-radius: 8px;
  background: var(--workspace-subtle);
}

body:not([data-step="intro"]) textarea:focus,
body:not([data-step="intro"]) select:focus,
body:not([data-step="intro"]) input[type="text"]:focus,
body:not([data-step="intro"]) input[type="number"]:focus {
  border-color: var(--workspace-accent);
  box-shadow: 0 0 0 3px rgba(216, 93, 32, 0.12);
}

body:not([data-step="intro"]) button:focus-visible,
body:not([data-step="intro"]) textarea:focus-visible,
body:not([data-step="intro"]) select:focus-visible,
body:not([data-step="intro"]) input:focus-visible,
body:not([data-step="intro"]) summary:focus-visible {
  outline-color: rgba(216, 93, 32, 0.4);
}

body:not([data-step="intro"]) .context-toggle {
  border-bottom-color: var(--workspace-border);
  background: var(--workspace-subtle);
}

body:not([data-step="intro"]) .thinking-meter span {
  background: var(--workspace-accent);
}

body:not([data-step="intro"]) .thinking-step.active,
body:not([data-step="intro"]) .match-item.featured,
body:not([data-step="intro"]) .match-item.selected {
  border-color: #edb18f;
  background: var(--workspace-accent-soft);
}

body:not([data-step="intro"]) .match-item b,
body:not([data-step="intro"]) .technique-brief-head span,
body:not([data-step="intro"]) .tag-line strong,
body:not([data-step="intro"]) .capability-item strong {
  border-color: #f0c5aa;
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
}

body:not([data-step="intro"]) .workbench-actionbar {
  border-color: var(--workspace-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(32, 33, 35, 0.08);
}

@media (max-width: 1100px) {
  body[data-step="intro"] .intro-stage {
    grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
    gap: 36px;
  }

  body[data-step="intro"] .intro-copy h1 {
    font-size: 48px;
  }
}

@media (max-width: 900px) {
  body[data-step="intro"] .app-shell {
    padding: 0 22px;
  }

  body[data-step="intro"] .intro-stage {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding: 64px 0 44px;
  }

  body[data-step="intro"] .intro-copy {
    max-width: 680px;
    padding-left: 0;
  }

  body[data-step="intro"] .intro-copy h1 {
    max-width: 620px;
    font-size: 40px;
  }

  body[data-step="intro"] .machine-figure {
    max-width: 760px;
    justify-self: center;
  }

  body:not([data-step="intro"]) .app-shell {
    padding: 0 12px 18px;
  }

  body:not([data-step="intro"]) .workflow-progress {
    top: 64px;
  }
}

@media (max-width: 600px) {
  body[data-step="intro"] .app-shell {
    padding: 0 16px;
  }

  body[data-step="intro"] .intro-stage {
    gap: 28px;
    padding: 46px 0 32px;
  }

  body[data-step="intro"] .intro-copy h1 {
    font-size: 34px;
  }

  body[data-step="intro"] .intro-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 26px;
  }

  body[data-step="intro"] .intro-button,
  body[data-step="intro"] .intro-new-button {
    width: 100%;
  }
}

/* Software recipe draft: mirrors the fixed fields in the existing recipe App. */
.software-recipe-draft {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  padding: 24px;
  border: 1px solid #e5ded7;
  border-radius: 16px;
  background: #fff;
}

.software-draft-heading,
.software-section-title,
.software-box-heading,
.software-media-preview,
.software-media-state,
.software-seasoning-list article,
.software-program-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.software-draft-heading h3,
.software-section-title b,
.software-box-heading strong {
  margin: 0;
}

.software-draft-heading > div > p:last-child {
  margin: 7px 0 0;
  color: #6b6763;
}

.software-draft-heading > span,
.software-section-title > span,
.software-box-heading b {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f7f3ef;
  color: #6b6763;
  font-size: 12px;
}

.software-draft-heading > span.is-ready,
.software-box-heading b {
  background: #edf8f1;
  color: #1d7b4c;
}

.software-draft-heading > span.is-blocked {
  background: #fff1ea;
  color: #c7521f;
}

.software-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.software-form-grid:first-of-type {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.software-form-section {
  padding: 18px;
  border: 1px solid #ece5de;
  border-radius: 14px;
  background: #fff;
}

.software-section-title {
  margin-bottom: 14px;
}

.software-section-title b {
  font-size: 17px;
}

.software-readonly-grid {
  display: grid;
  gap: 10px;
}

.software-readonly-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #e7e1db;
  border-radius: 10px;
  background: #fbfaf9;
}

.software-readonly-field small,
.software-readonly-field span,
.software-ingredient-name span,
.software-ingredient-row dt,
.software-media-preview small,
.software-media-state span,
.software-seasoning-list small,
.software-program-lock span {
  color: #77716c;
  font-size: 12px;
}

.software-readonly-field strong {
  overflow-wrap: anywhere;
}

.software-media-preview {
  justify-content: flex-start;
  padding: 14px;
  border: 1px solid #ece5de;
  border-radius: 12px;
  background: #fbfaf9;
}

.software-media-preview img,
.software-media-preview > span {
  width: 132px;
  height: 96px;
  border-radius: 10px;
  object-fit: contain;
  background: #f3f0ed;
}

.software-media-preview > span {
  display: grid;
  place-items: center;
  background: #fff4ed;
  color: #d65f22;
  font-size: 12px;
  text-align: center;
}

.software-media-preview > div {
  display: grid;
  gap: 5px;
}

.software-media-state {
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px solid #ece5de;
  border-radius: 10px;
}

.software-ingredient-boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.software-ingredient-box {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e7e1db;
  border-radius: 12px;
  background: #fff;
}

.software-ingredient-box.is-empty {
  background: #fbfaf9;
}

.software-box-heading {
  padding: 13px 14px;
  border-bottom: 1px solid #eee8e2;
}

.software-box-heading span {
  display: grid;
  gap: 3px;
}

.software-box-heading small {
  color: #77716c;
}

.software-box-ingredients {
  display: grid;
}

.software-ingredient-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #f0ebe6;
}

.software-ingredient-row:first-child {
  border-top: 0;
}

.software-ingredient-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.software-ingredient-row dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.software-ingredient-row dl > div {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f8f6f4;
}

.software-ingredient-row dl > div.wide {
  grid-column: 1 / -1;
}

.software-ingredient-row dd {
  margin: 0;
  font-weight: 650;
}

.software-ingredient-row dd small {
  margin-left: 4px;
  color: #d65f22;
  font-weight: 500;
}

.software-ingredient-row > p,
.software-empty-box {
  margin: 0;
  color: #6f6964;
  font-size: 13px;
  line-height: 1.65;
}

.software-empty-box {
  padding: 18px 14px;
}

.software-seasoning-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.software-seasoning-list article {
  padding: 13px 14px;
  border: 1px solid #e7e1db;
  border-radius: 10px;
  background: #fbfaf9;
}

.software-seasoning-list article span {
  display: grid;
  gap: 3px;
}

.standard-stock-note {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.standard-stock-note p {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fff7f1;
  color: #5f5954;
  font-size: 13px;
}

.software-program-lock {
  align-items: flex-start;
  padding: 15px;
  border: 1px dashed #d8cfc7;
  border-radius: 10px;
  background: #fbfaf9;
}

.software-program-lock strong {
  color: #d65f22;
}

.software-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.software-copy-grid article {
  padding: 14px;
  border: 1px solid #e7e1db;
  border-radius: 10px;
  background: #fbfaf9;
}

.software-copy-grid p {
  margin: 8px 0 0;
  color: #5f5954;
  line-height: 1.7;
}

.software-draft-validation {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
}

.software-draft-validation.is-ready {
  border: 1px solid #b9dfc8;
  background: #f0faf4;
  color: #17683f;
}

.software-draft-validation.is-blocked {
  border: 1px solid #f0c6b2;
  background: #fff4ed;
  color: #a13e18;
}

.software-draft-validation ul {
  margin: 0;
}

/* Internal AI structures still drive validation, but no longer appear as a
   second, conflicting Step 4 form. */
.recipe-stage .recipe-technique-brief,
.recipe-stage .recipe-decomposition-card,
.recipe-stage .starch-handling-card,
.recipe-stage > .stage-shell > .program-grid {
  display: none;
}

@media (max-width: 900px) {
  .software-recipe-draft {
    padding: 14px;
    border-radius: 12px;
  }

  .software-form-grid,
  .software-form-grid:first-of-type,
  .software-ingredient-boxes,
  .software-seasoning-list,
  .software-copy-grid {
    grid-template-columns: 1fr;
  }

  .software-draft-heading,
  .software-section-title,
  .software-box-heading,
  .software-ingredient-name,
  .software-draft-validation {
    align-items: flex-start;
    flex-direction: column;
  }

  .software-media-preview {
    align-items: flex-start;
  }

  .standard-stock-note p {
    grid-template-columns: 1fr;
  }
}

.ai-understanding-panel,
.research-evidence-panel,
.baseline-preview {
  margin-top: 18px;
  border: 1px solid rgba(222, 211, 199, 0.9);
  border-radius: 10px;
  background: #fbfaf8;
  padding: 16px;
  color: #252525;
}

.understanding-head,
.research-coverage,
.candidate-source-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.understanding-head {
  justify-content: space-between;
}

.understanding-head div,
.baseline-preview > div {
  display: grid;
  gap: 3px;
}

.understanding-head small,
.baseline-preview small,
.research-source-grid small {
  color: #d95f23;
  font-weight: 800;
}

.understanding-head b,
.research-status {
  border: 1px solid #ded3c7;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  font-size: 12px;
}

.understanding-tags,
.research-coverage {
  margin-top: 12px;
}

.understanding-tags span,
.research-coverage span,
.candidate-source-links a,
.candidate-source-links > span {
  display: inline-flex;
  margin: 0 6px 6px 0;
  border-radius: 6px;
  background: #f2eee8;
  padding: 5px 8px;
  color: #4a4641;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.candidate-source-links a:hover,
.research-source-grid a:hover {
  color: #d95f23;
  text-decoration: underline;
}

.understanding-question,
.research-warning {
  color: #b1481f;
}

.research-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.research-source-grid article {
  display: grid;
  gap: 4px;
  border: 1px solid #e5ddd3;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.research-source-grid a {
  color: #242424;
  font-weight: 800;
  text-decoration: none;
}

.research-source-grid span {
  color: #777068;
  font-size: 12px;
}

.candidate-source-links,
.candidate-process,
.candidate-time-basis {
  grid-column: 1 / -1;
}

.candidate-process {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  color: #4e4944;
  font-size: 13px;
  line-height: 1.6;
}

.candidate-process strong {
  color: #d95f23;
  font-size: 12px;
}

.baseline-preview {
  display: grid;
  gap: 8px;
}

.baseline-preview p,
.baseline-preview span,
.ai-understanding-panel p,
.research-evidence-panel p {
  margin: 4px 0 0;
  color: #615b54;
  font-size: 13px;
  line-height: 1.6;
}

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

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

/* Keep the supplied brand source intact while displaying only its symbol. */
.brand-mark.brand-mark-logo,
body:not([data-step="intro"]) .topbar .brand-mark.brand-mark-logo,
body[data-step="intro"] .brand-mark.brand-mark-logo {
  position: relative;
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 0;
  background: #fff;
  box-shadow: none;
}

.brand-mark-logo img {
  position: absolute;
  top: -51px;
  left: -10px;
  width: 145px;
  max-width: none;
  height: auto;
}

.tag-line.operating-note {
  border-color: #d8e4e9;
  background: #f7fafb;
}

.tag-line.operating-note strong {
  color: #3c6677 !important;
}

.research-master-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid #d9d4cf;
  border-radius: 12px;
  background: #fff;
  color: #242321;
  box-shadow: 0 24px 70px rgba(36, 35, 33, 0.18);
}

.research-master-dialog::backdrop {
  background: rgba(22, 22, 20, 0.42);
  backdrop-filter: blur(3px);
}

.research-master-form {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-heading h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.dialog-close-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border: 1px solid #ddd7d1;
  border-radius: 8px;
  background: #fff;
  color: #5a5753;
  font-size: 25px;
  line-height: 1;
}

.dialog-intro,
.dialog-message,
.dispatch-package-summary span {
  margin: 0;
  color: #68645f;
  font-size: 13px;
  line-height: 1.65;
}

.research-master-form select,
.research-master-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d8d2cc;
  border-radius: 8px;
  background: #fff;
  color: #242321;
}

.dispatch-package-summary {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #e1ddd8;
  border-radius: 8px;
  background: #faf9f7;
}

.dialog-message {
  min-height: 21px;
  color: #b24e2b;
}

.dialog-message.is-success {
  color: #2e7a55;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-actions button {
  min-height: 42px;
}

@media (max-width: 600px) {
  .research-master-form {
    padding: 20px;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-actions button {
    width: 100%;
  }
}

/* Keep generated dishes fully visible in the recipe confirmation and program stages. */
body:not([data-step="intro"]) .result-hero {
  grid-template-columns: minmax(220px, 30%) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

body:not([data-step="intro"]) .dish-image-frame,
body.mode-mobile:not([data-step="intro"]) .dish-image-frame {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--workspace-subtle);
}

body:not([data-step="intro"]) .dish-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

body:not([data-step="intro"]) .result-hero > div:last-child {
  min-width: 0;
}

@media (max-width: 760px) {
  body:not([data-step="intro"]) .result-panel {
    padding: 16px;
  }

  body:not([data-step="intro"]) .result-hero,
  body.mode-mobile:not([data-step="intro"]) .result-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }

  body:not([data-step="intro"]) .dish-image-frame,
  body.mode-mobile:not([data-step="intro"]) .dish-image-frame {
    width: min(100%, 460px);
    max-width: 460px;
    margin: 0 auto;
  }

  body:not([data-step="intro"]) .result-hero > div:last-child {
    padding: 0 2px 2px;
  }

  body:not([data-step="intro"]) .result-hero h3 {
    margin-bottom: 6px;
  }
}

/* Intro cover refresh. The six-step workbench starts only after this screen. */
body[data-step="intro"] {
  background: #fff;
}

body[data-step="intro"] .app-shell {
  width: min(1540px, 100%);
  padding: 0 36px 24px;
}

body[data-step="intro"] .topbar {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 0 8px;
}

body[data-step="intro"] .topbar::before,
body[data-step="intro"] .top-actions {
  display: none;
}

body[data-step="intro"] .brand-mark {
  border-color: #deded9;
  background: #f4f4f1;
  color: #242424;
}

body[data-step="intro"] .workbench-shell {
  display: none;
}

body[data-step="intro"] .intro-stage {
  min-height: calc(100svh - 78px);
  grid-template-columns: minmax(340px, 0.72fr) minmax(600px, 1.28fr);
  gap: clamp(40px, 5vw, 88px);
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 0 56px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body[data-step="intro"] .intro-copy {
  align-self: center;
  max-width: 520px;
}

body[data-step="intro"] .intro-copy .eyebrow {
  margin-bottom: 22px;
  color: #75756f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

body[data-step="intro"] .intro-copy h1 {
  margin: 0;
  color: #1f1f1d;
  font-family: inherit;
  font-size: 52px;
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: 0;
}

body[data-step="intro"] .intro-copy h1 span {
  display: block;
  color: #d85d20;
}

body[data-step="intro"] .hero-text {
  max-width: 500px;
  margin: 24px 0 0;
  color: #62625d;
  font-size: 16px;
  line-height: 1.72;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

body[data-step="intro"] .intro-button,
body[data-step="intro"] .intro-new-button {
  min-height: 46px;
  margin: 0;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 14px;
}

body[data-step="intro"] .intro-button {
  border-color: #202123;
  background: #202123;
  color: #fff;
}

body[data-step="intro"] .intro-button:hover {
  border-color: #3b3b38;
  background: #3b3b38;
}

body[data-step="intro"] .intro-new-button {
  border-color: #d8d8d3;
  background: #fff;
  color: #292927;
}

.intro-draft-hint {
  margin: 12px 0 0;
  color: #777771;
  font-size: 12px;
}

.intro-capabilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 42px 0 0;
  padding: 0;
  border-top: 1px solid #e7e7e3;
  border-bottom: 1px solid #e7e7e3;
  list-style: none;
}

.intro-capabilities li {
  min-width: 0;
  padding: 15px 18px 15px 0;
}

.intro-capabilities li:nth-child(2n) {
  padding-left: 18px;
  border-left: 1px solid #e7e7e3;
}

.intro-capabilities li:nth-child(-n + 2) {
  border-bottom: 1px solid #e7e7e3;
}

.intro-capabilities strong,
.intro-capabilities span {
  display: block;
}

.intro-capabilities strong {
  color: #2a2a28;
  font-size: 13px;
  font-weight: 700;
}

.intro-capabilities span {
  margin-top: 2px;
  color: #8a8a84;
  font-size: 12px;
}

.intro-flow-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 0;
  color: #777771;
  font-size: 12px;
}

.intro-flow-hint span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #d8d8d3;
  border-radius: 50%;
  color: #353532;
  font-size: 10px;
  font-weight: 700;
}

body[data-step="intro"] .machine-figure {
  width: 100%;
  max-width: 820px;
  aspect-ratio: 4 / 3;
  margin: 0;
  align-self: center;
  justify-self: end;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-step="intro"] .machine-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.machine-figure figcaption {
  margin-top: 12px;
  color: #888882;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1100px) {
  body[data-step="intro"] .intro-stage {
    grid-template-columns: minmax(300px, 0.8fr) minmax(470px, 1.2fr);
    gap: 34px;
  }

  body[data-step="intro"] .intro-copy h1 {
    font-size: 44px;
  }
}

@media (max-width: 900px) {
  body[data-step="intro"] .app-shell {
    padding: 0 20px 28px;
  }

  body[data-step="intro"] .topbar {
    padding-top: 16px;
  }

  body[data-step="intro"] .intro-stage {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding: 48px 0 42px;
  }

  body[data-step="intro"] .intro-copy {
    max-width: 680px;
  }

  body[data-step="intro"] .intro-copy h1 {
    max-width: 620px;
    font-size: 40px;
  }

  body[data-step="intro"] .machine-figure {
    max-width: 760px;
    justify-self: center;
  }
}

@media (max-width: 600px) {
  body[data-step="intro"] .app-shell {
    padding-inline: 16px;
  }

  body[data-step="intro"] .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 19px;
  }

  body[data-step="intro"] .brand strong {
    font-size: 18px;
  }

  body[data-step="intro"] .intro-stage {
    gap: 28px;
    padding-top: 36px;
  }

  body[data-step="intro"] .intro-copy h1 {
    font-size: 34px;
  }

  body[data-step="intro"] .hero-text {
    font-size: 15px;
  }

  .intro-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-step="intro"] .intro-button,
  body[data-step="intro"] .intro-new-button {
    width: 100%;
  }

  .intro-capabilities {
    margin-top: 32px;
  }

  .intro-capabilities li {
    padding: 13px 12px 13px 0;
  }

  .intro-capabilities li:nth-child(2n) {
    padding-left: 12px;
  }

  .machine-figure figcaption {
    margin-top: 6px;
  }
}

/* Step 6 hierarchy refinement: one clear delivery path, less card chrome. */
body,
body:not([data-step="intro"]) {
  background-image:
    linear-gradient(rgba(82, 153, 185, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 153, 185, 0.024) 1px, transparent 1px);
  background-size: 96px 96px;
}

@media (min-width: 1101px) {
  .workbench-grid {
    grid-template-columns: 150px minmax(0, 1fr) 258px;
    gap: 16px;
  }

  .workflow-side-item {
    min-height: 44px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    padding: 7px 8px;
  }

  .workflow-side-item:not(.active) small {
    display: none;
  }

  .workflow-side-item.active {
    min-height: 54px;
  }
}

body:not([data-step="intro"]) .workflow-progress-item.active > span:first-child {
  border-color: #149bc8;
  background: #149bc8;
  color: #ffffff;
}

body:not([data-step="intro"]) .context-sidebar {
  box-shadow: 0 8px 22px rgba(54, 108, 134, 0.065);
}

body:not([data-step="intro"]) .context-block {
  padding: 14px;
}

body:not([data-step="intro"]) #contextDemandSummary,
body:not([data-step="intro"]) #contextDeviceSummary,
body:not([data-step="intro"]) #contextSaveStatus,
body:not([data-step="intro"]) #contextNetworkStatus,
body:not([data-step="intro"]) .context-validation-item {
  font-size: 12px;
  line-height: 1.58;
}

body[data-step="trial"] .workbench-stage-area .stage-copy {
  margin-bottom: 16px;
}

body[data-step="trial"] .trial-status-board {
  position: relative;
  border: 1px solid #bfe0ec;
  border-left: 4px solid #149bc8;
  border-radius: 12px;
  padding: 16px 18px;
  background: #f7fcff;
  box-shadow: none;
}

body[data-step="trial"] .trial-status-board h3 {
  margin-bottom: 3px;
  color: #102b3b;
  font-size: 16px;
}

body[data-step="trial"] .trial-status-board p:last-child {
  color: #587382;
  font-size: 14px;
  line-height: 1.6;
}

body[data-step="trial"] .trial-grid {
  grid-template-columns: minmax(0, 1.14fr) minmax(300px, 0.86fr);
  gap: 16px;
  align-items: start;
}

body[data-step="trial"] .trial-grid .export-docs-card {
  grid-column: 1 / -1;
}

body[data-step="trial"] .program-card {
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(54, 108, 134, 0.065);
}

body[data-step="trial"] .export-docs-card {
  padding: 24px 28px 12px;
}

body[data-step="trial"] .export-docs-card .block-title {
  align-items: center;
  margin-bottom: 12px;
}

body[data-step="trial"] .export-doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid #d9e8ee;
}

body[data-step="trial"] .export-doc-grid article,
body:not([data-step="intro"]) .export-doc-grid article {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(180px, 0.52fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid #e0ecf1;
  border-radius: 0;
  padding: 16px 0;
  background: transparent;
}

body[data-step="trial"] .export-doc-grid article:last-child {
  border-bottom: 0;
}

body[data-step="trial"] .export-doc-grid strong {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #17384a;
  font-size: 14px;
}

.export-file-index {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e7f6fc;
  color: #087ba8;
  font-size: 11px;
  font-weight: 900;
}

body[data-step="trial"] .export-doc-grid p {
  min-height: 0;
  color: #607b89;
  font-size: 13.5px;
  line-height: 1.6;
}

body[data-step="trial"] .export-doc-grid .ghost-button,
body:not([data-step="intro"]) .export-doc-grid .ghost-button {
  min-height: 36px;
  justify-self: end;
  border-color: #b9dce9;
  background: #f4fbfe;
  color: #087ba8;
  box-shadow: none;
}

body[data-step="trial"] .export-doc-grid .ghost-button:hover,
body:not([data-step="intro"]) .export-doc-grid .ghost-button:hover {
  border-color: #77c5e0;
  background: #e7f7fd;
}

body[data-step="trial"] .trial-confirmation-card,
body[data-step="trial"] .dispatch-card {
  min-height: 100%;
}

body[data-step="trial"] .dispatch-card {
  background: #f8fbfd;
  box-shadow: none;
}

body[data-step="trial"] .block-title h3 {
  display: flex;
  align-items: center;
  gap: 9px;
}

body[data-step="trial"] .block-title h3 .trial-phase-number {
  width: 24px;
  height: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #9fd5e8;
  border-radius: 50%;
  padding: 0;
  background: #e7f6fc;
  color: #087ba8;
  font-size: 11px;
  line-height: 1;
}

body[data-step="trial"] .trial-confirmation-card .dark-button {
  margin-top: 14px;
}

body[data-step="trial"] .dispatch-card p {
  color: #607b89;
  font-size: 13.5px;
  line-height: 1.6;
}

body[data-step="trial"] .workbench-actionbar {
  position: sticky;
  left: auto;
  bottom: 12px;
  width: min(820px, calc(100% - 28px));
  margin: 20px auto 12px;
  transform: none;
}

/* The top progress is the single six-step navigator. */
@media (min-width: 1101px) {
  .workbench-grid,
  body:not([data-step="intro"]) .workbench-grid {
    grid-template-columns: minmax(0, 1fr) 272px;
  }
}

.context-validation-item > span {
  display: grid;
  gap: 3px;
}

.context-validation-item strong {
  color: #17384a;
  font-size: 12px;
  line-height: 1.4;
}

.context-validation-item > span > span {
  color: #607b89;
  line-height: 1.55;
}

.context-validation-item small {
  color: #7b8d95;
  line-height: 1.45;
}

.context-fix-button {
  align-self: start;
  border: 1px solid #d5dde1;
  border-radius: 6px;
  background: #fff;
  color: #17384a;
  min-height: 30px;
  padding: 4px 8px;
  font: inherit;
  cursor: pointer;
}

.is-fix-highlight {
  outline: 2px solid rgba(226, 87, 35, 0.7);
  outline-offset: 4px;
}

body[data-step="trial"] .workbench-stage-area .stage-shell {
  padding-bottom: 12px;
}

@media (max-width: 900px) {
  body,
  body:not([data-step="intro"]) {
    background-size: 72px 72px;
  }

  body[data-step="trial"] .trial-grid {
    grid-template-columns: 1fr;
  }

  body[data-step="trial"] .export-docs-card {
    padding: 20px 18px 8px;
  }

  body[data-step="trial"] .export-doc-grid article,
  body:not([data-step="intro"]) .export-doc-grid article {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 15px 0;
  }

  body[data-step="trial"] .export-doc-grid p {
    grid-column: 1 / -1;
  }

  body[data-step="trial"] .export-doc-grid .ghost-button,
  body:not([data-step="intro"]) .export-doc-grid .ghost-button {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-step="trial"] .workbench-actionbar {
    width: calc(100% - 16px);
  }
}

body.result-fresh .match-item,
body.result-fresh .program-card,
body.result-fresh .result-hero,
body.result-fresh .command-item {
  animation: revealUp 520ms ease both;
}

body.result-fresh .match-item:nth-child(2),
body.result-fresh .program-card:nth-child(2),
body.result-fresh .command-item:nth-child(2) {
  animation-delay: 50ms;
}

body.result-fresh .match-item:nth-child(3),
body.result-fresh .program-card:nth-child(3),
body.result-fresh .command-item:nth-child(3) {
  animation-delay: 90ms;
}

body.result-fresh .match-item:nth-child(4),
body.result-fresh .program-card:nth-child(4),
body.result-fresh .command-item:nth-child(4) {
  animation-delay: 130ms;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Local visual refresh: culinary intelligence workbench.
   This layer intentionally changes presentation only. */
body:not([data-step="intro"]) {
  --ink: #17201d;
  --muted: #68736d;
  --paper: #edf1ee;
  --paper-soft: #f7f9f7;
  --paper-warm: #f3f0e8;
  --line: #d8dfda;
  --accent: #c98b25;
  --accent-deep: #9f6813;
  --accent-soft: #f6ead2;
  --green: #2f7650;
  --red: #b84338;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-soft: #f4f7f4;
  --shadow: 0 18px 52px rgba(23, 32, 29, 0.1);
  --soft-shadow: 0 10px 28px rgba(23, 32, 29, 0.08);
  color: var(--ink);
  background-color: #edf1ee;
  background-image:
    linear-gradient(118deg, rgba(201, 139, 37, 0.055), transparent 30%),
    repeating-linear-gradient(90deg, rgba(23, 32, 29, 0.028) 0 1px, transparent 1px 112px),
    repeating-linear-gradient(0deg, rgba(23, 32, 29, 0.022) 0 1px, transparent 1px 112px),
    linear-gradient(180deg, #f4f6f4 0%, #e9eeeb 100%);
}

body:not([data-step="intro"]) .app-shell {
  width: min(1520px, 100%);
}

body:not([data-step="intro"]) .topbar {
  color: #f7faf8;
}

body:not([data-step="intro"]) .topbar::before {
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(14, 19, 18, 0.95);
  box-shadow: 0 10px 30px rgba(16, 23, 20, 0.18);
}

body:not([data-step="intro"]) .topbar .brand,
body:not([data-step="intro"]) .topbar .brand strong {
  color: #f7faf8;
}

body:not([data-step="intro"]) .topbar .brand small {
  color: rgba(247, 250, 248, 0.58);
}

body:not([data-step="intro"]) .topbar .brand-mark {
  border-color: rgba(218, 163, 68, 0.46);
  color: #f3c775;
  background:
    linear-gradient(145deg, rgba(201, 139, 37, 0.2), rgba(255, 255, 255, 0.03) 48%),
    #151a18;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

body:not([data-step="intro"]) .topbar .ghost-button,
body:not([data-step="intro"]) .topbar .primary-button {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(247, 250, 248, 0.86);
  box-shadow: none;
}

body:not([data-step="intro"]) .topbar .ghost-button:hover,
body:not([data-step="intro"]) .topbar .primary-button:hover {
  border-color: rgba(218, 163, 68, 0.52);
  background: rgba(218, 163, 68, 0.1);
}

body:not([data-step="intro"]) h1,
body:not([data-step="intro"]) h2,
body:not([data-step="intro"]) h3,
body:not([data-step="intro"]) h4,
body:not([data-step="intro"]) .stage-copy h2 {
  color: #17201d;
}

body:not([data-step="intro"]) .eyebrow,
body:not([data-step="intro"]) .panel-kicker {
  color: #a66b10;
}

body:not([data-step="intro"]) .stage-copy p,
body:not([data-step="intro"]) .workbench-stage-area .stage-copy p:last-child {
  color: #66716b;
  font-size: 14px;
}

body:not([data-step="intro"]) .command-panel,
body:not([data-step="intro"]) .judgement-board,
body:not([data-step="intro"]) .match-panel,
body:not([data-step="intro"]) .result-panel,
body:not([data-step="intro"]) .program-card,
body:not([data-step="intro"]) .trial-status-board {
  border-color: #d7dfda;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

body:not([data-step="intro"]) .command-panel,
body:not([data-step="intro"]) .judgement-board,
body:not([data-step="intro"]) .match-panel,
body:not([data-step="intro"]) .result-panel,
body:not([data-step="intro"]) .program-card {
  padding: clamp(22px, 2.2vw, 32px);
}

body:not([data-step="intro"]) .command-field span,
body:not([data-step="intro"]) .field span {
  color: #68736d;
}

body:not([data-step="intro"]) textarea,
body:not([data-step="intro"]) select,
body:not([data-step="intro"]) input[type="number"],
body:not([data-step="intro"]) .box-select {
  border-color: #cfd7d2;
  background: #f8faf8;
  color: #17201d;
}

body:not([data-step="intro"]) textarea::placeholder {
  color: #9ba49f;
}

body:not([data-step="intro"]) textarea:focus,
body:not([data-step="intro"]) select:focus,
body:not([data-step="intro"]) input[type="number"]:focus {
  border-color: #bd7d18;
  box-shadow: 0 0 0 3px rgba(201, 139, 37, 0.13);
}

body:not([data-step="intro"]) .more-options summary,
body:not([data-step="intro"]) .match-head small,
body:not([data-step="intro"]) .hero-actions span {
  color: #69746e;
}

body:not([data-step="intro"]) .quick-row button,
body:not([data-step="intro"]) .ghost-button {
  border-color: #ccd5d0;
  background: #ffffff;
  color: #35403b;
  box-shadow: none;
}

body:not([data-step="intro"]) .quick-row button:hover,
body:not([data-step="intro"]) .ghost-button:hover {
  border-color: #b47a20;
  background: #fbf4e7;
  color: #704808;
}

body:not([data-step="intro"]) .primary-button,
body:not([data-step="intro"]) .dark-button,
body:not([data-step="intro"]) .stage-button {
  border-color: #25312d;
  background: #17201d;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(23, 32, 29, 0.14);
}

body:not([data-step="intro"]) .primary-button:hover,
body:not([data-step="intro"]) .dark-button:hover,
body:not([data-step="intro"]) .stage-button:hover {
  border-color: #9d6714;
  background: #28332f;
}

body:not([data-step="intro"]) .command-message {
  color: #9a6210;
}

body:not([data-step="intro"]) .thinking-console {
  border-color: rgba(218, 163, 68, 0.28);
  background:
    linear-gradient(180deg, rgba(201, 139, 37, 0.08), transparent 55%),
    #111816;
  box-shadow: 0 16px 36px rgba(13, 20, 17, 0.18);
}

body:not([data-step="intro"]) .thinking-copy strong {
  color: rgba(255, 255, 255, 0.94);
}

body:not([data-step="intro"]) .thinking-copy span,
body:not([data-step="intro"]) .thinking-step span {
  color: rgba(235, 242, 238, 0.55);
}

body:not([data-step="intro"]) .thinking-step {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

body:not([data-step="intro"]) .thinking-step strong {
  color: rgba(245, 249, 247, 0.72);
}

body:not([data-step="intro"]) .fit-summary,
body:not([data-step="intro"]) .fit-grid p,
body:not([data-step="intro"]) .warning-list p,
body:not([data-step="intro"]) .normalize-list p,
body:not([data-step="intro"]) .technique-reasons p,
body:not([data-step="intro"]) .small-note,
body:not([data-step="intro"]) .mini-item span,
body:not([data-step="intro"]) .mini-item small,
body:not([data-step="intro"]) .capability-list div,
body:not([data-step="intro"]) .tag-line span,
body:not([data-step="intro"]) .capability-item span {
  color: #65716b;
}

body:not([data-step="intro"]) .fit-chip-row span,
body:not([data-step="intro"]) .reason-chips span,
body:not([data-step="intro"]) .technique-chips span,
body:not([data-step="intro"]) .state-stack span,
body:not([data-step="intro"]) .block-title span,
body:not([data-step="intro"]) .match-head span,
body:not([data-step="intro"]) .status-pill {
  border-color: #d2dad5;
  background: #f2f5f3;
  color: #48534e;
}

body:not([data-step="intro"]) .fit-grid > div,
body:not([data-step="intro"]) .mini-item,
body:not([data-step="intro"]) .liquid-box,
body:not([data-step="intro"]) .capability-list div,
body:not([data-step="intro"]) .warning-list p,
body:not([data-step="intro"]) .normalize-list p {
  border-color: #d8dfda;
  background: #f7f9f7;
}

body:not([data-step="intro"]) .match-summary {
  border-color: #b9d1c0;
  background: linear-gradient(135deg, #e7f2e9, #f5f8f5);
}

body:not([data-step="intro"]) .match-summary h3 {
  color: #1d3929;
}

body:not([data-step="intro"]) .match-summary p {
  color: #566860;
}

body:not([data-step="intro"]) .score-ring {
  border-color: #b47a20;
  background: #17201d;
  color: #f6ce82;
  box-shadow: none;
}

body:not([data-step="intro"]) .score-ring span {
  color: rgba(255, 255, 255, 0.58);
}

body:not([data-step="intro"]) .match-item {
  border-color: #d5ddd8;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(23, 32, 29, 0.035);
}

body:not([data-step="intro"]) .match-item:hover {
  border-color: #b47a20;
  box-shadow: 0 12px 26px rgba(23, 32, 29, 0.09);
}

body:not([data-step="intro"]) .match-item.featured,
body:not([data-step="intro"]) .match-item.selected {
  border-color: #c5892b;
  background: linear-gradient(135deg, #fbf1df, #ffffff 72%);
}

body:not([data-step="intro"]) .match-item strong {
  color: #17201d;
}

body:not([data-step="intro"]) .match-item small {
  color: #6d7872;
}

body:not([data-step="intro"]) .match-item b {
  border-color: #d9b16d;
  background: #f8edd8;
  color: #80530d;
}

body:not([data-step="intro"]) .dish-image-frame {
  border-color: #d5ddd8;
  background: #eef2ef;
}

body:not([data-step="intro"]) .dish-image-placeholder {
  color: #9b691d;
}

body:not([data-step="intro"]) .result-hero p:last-child,
body:not([data-step="intro"]) .sop-info-item span,
body:not([data-step="intro"]) .sop-box-standard span,
body:not([data-step="intro"]) .sop-quality-notes p,
body:not([data-step="intro"]) .export-doc-grid p,
body:not([data-step="intro"]) .liquid-box p,
body:not([data-step="intro"]) .liquid-box small,
body:not([data-step="intro"]) td {
  color: #5d6963;
}

body:not([data-step="intro"]) .hero-actions .ghost-button,
body:not([data-step="intro"]) .export-doc-grid .ghost-button {
  border-color: #cfaa69;
  background: #fbf3e5;
  color: #79500f;
}

body:not([data-step="intro"]) .recipe-technique-brief {
  border-top-color: #dce2de;
}

body:not([data-step="intro"]) .technique-brief-head span,
body:not([data-step="intro"]) .tag-line strong,
body:not([data-step="intro"]) .capability-item strong {
  border-color: #d7b26f;
  background: #f8edd8;
  color: #80530d;
}

body:not([data-step="intro"]) .metrics div {
  border-color: #d8dfda;
  background: #f5f7f5;
}

body:not([data-step="intro"]) .metric-label,
body:not([data-step="intro"]) .metric-meta,
body:not([data-step="intro"]) .sop-info-item strong,
body:not([data-step="intro"]) th {
  color: #76817b;
}

body:not([data-step="intro"]) .metric-value {
  color: #17201d;
}

body:not([data-step="intro"]) .metric-value small {
  color: #68736d;
}

body:not([data-step="intro"]) .program-detail {
  border-color: #d7dfda;
  background: #ffffff;
}

body:not([data-step="intro"]) .program-detail summary {
  background: #fbfcfb;
}

body:not([data-step="intro"]) .program-detail summary h3,
body:not([data-step="intro"]) .block-title h3,
body:not([data-step="intro"]) .sop-lower-grid h4 {
  color: #81530c;
}

body:not([data-step="intro"]) .program-detail summary small {
  color: #717c76;
}

body:not([data-step="intro"]) .program-detail summary b {
  border-color: #d3dbd6;
  background: #eef2ef;
  color: #45504b;
}

body:not([data-step="intro"]) .program-detail-content {
  border-top-color: #dce2de;
}

body:not([data-step="intro"]) .sop-info-item,
body:not([data-step="intro"]) .sop-lower-grid > div,
body:not([data-step="intro"]) .sop-box-standard article,
body:not([data-step="intro"]) .export-doc-grid article {
  border-color: #d8dfda;
  background: #f7f9f7;
}

body:not([data-step="intro"]) .sop-table-wrap {
  border-color: #d8dfda;
  background: #ffffff;
}

body:not([data-step="intro"]) .sop-table th,
body:not([data-step="intro"]) .sop-table td {
  border-right-color: #e1e6e3;
}

body:not([data-step="intro"]) .sop-box-standard strong,
body:not([data-step="intro"]) .export-doc-grid strong,
body:not([data-step="intro"]) .mini-item strong,
body:not([data-step="intro"]) .box-head strong,
body:not([data-step="intro"]) .review-item strong {
  color: #1d2723;
}

body:not([data-step="intro"]) .liquid-box.large {
  border-color: #b9d1c0;
  background: #edf5ef;
}

body:not([data-step="intro"]) .box-head span {
  color: #748079;
}

body:not([data-step="intro"]) .table-wrap {
  border: 1px solid #d8dfda;
  border-radius: 10px;
  background: #ffffff;
}

body:not([data-step="intro"]) th,
body:not([data-step="intro"]) td {
  border-bottom-color: #e2e7e4;
}

body:not([data-step="intro"]) .command-item {
  border-color: #2d3a35;
  background: #121916;
  color: #dfe8e2;
}

body:not([data-step="intro"]) .review-item.pass {
  border-color: #b8d5c1;
  background: #eaf5ed;
}

body:not([data-step="intro"]) .review-item.warn {
  border-color: #dfc18a;
  background: #fcf3e4;
}

body:not([data-step="intro"]) .review-item.error {
  border-color: #e2b1aa;
  background: #fbecea;
}

body:not([data-step="intro"]) .review-item span {
  color: #637069;
}

body:not([data-step="intro"]) .workflow-progress {
  border-color: #d4dcd7;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(23, 32, 29, 0.08);
}

body:not([data-step="intro"]) .workflow-progress-item {
  border-right-color: #e0e6e2;
  background: #f8faf8;
  color: #66716b;
}

body:not([data-step="intro"]) .workflow-progress-item small {
  color: #929b96;
}

body:not([data-step="intro"]) .workflow-progress-item > span:last-child {
  width: auto;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

body:not([data-step="intro"]) .workflow-progress-item.active {
  background: linear-gradient(180deg, #f9edd7, #fffaf2);
  color: #6f480a;
  box-shadow: inset 0 -3px 0 #c98b25;
}

body:not([data-step="intro"]) .workflow-progress-item.active > span {
  border-color: #c98b25;
  background: #c98b25;
  color: #ffffff;
}

body:not([data-step="intro"]) .workflow-progress-item.complete {
  background: #f0f7f2;
  color: #2f6848;
}

body:not([data-step="intro"]) .workflow-progress-item.complete > span {
  border-color: #8ab89a;
  background: #e1f0e6;
  color: #2f6848;
}

body:not([data-step="intro"]) .workflow-progress-item.error {
  background: #fbefed;
  color: #a53d34;
}

body:not([data-step="intro"]) .workflow-progress-item.active > span:last-child,
body:not([data-step="intro"]) .workflow-progress-item.complete > span:last-child,
body:not([data-step="intro"]) .workflow-progress-item.error > span:last-child {
  border: 0;
  background: transparent;
  color: inherit;
}

body:not([data-step="intro"]) .workflow-sidebar,
body:not([data-step="intro"]) .context-sidebar {
  border-color: #d4dcd7;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--soft-shadow);
  backdrop-filter: none;
}

body:not([data-step="intro"]) .workflow-side-item {
  border-bottom-color: #e3e8e5;
  color: #65706a;
}

body:not([data-step="intro"]) .workflow-side-item:hover:not(:disabled),
body:not([data-step="intro"]) .workflow-side-item.active {
  background: #f8eedc;
  color: #704908;
}

body:not([data-step="intro"]) .workflow-side-item > span {
  color: #a46b13;
}

body:not([data-step="intro"]) .workflow-side-item small {
  color: #909994;
}

body:not([data-step="intro"]) .workflow-side-item b {
  background: #f7e5e2;
  color: #aa4339;
}

body:not([data-step="intro"]) .context-toggle {
  border-bottom-color: #e0e6e2;
  background: #f7f9f7;
  color: #1c2722;
}

body:not([data-step="intro"]) .context-toggle b,
body:not([data-step="intro"]) .context-block-head span {
  color: #7d8882;
}

body:not([data-step="intro"]) .context-toggle.has-errors b {
  color: #aa4339;
}

body:not([data-step="intro"]) .context-block {
  border-bottom-color: #e3e8e5;
}

body:not([data-step="intro"]) #contextDemandSummary,
body:not([data-step="intro"]) #contextDeviceSummary,
body:not([data-step="intro"]) #contextSaveStatus,
body:not([data-step="intro"]) #contextNetworkStatus,
body:not([data-step="intro"]) .context-validation-item {
  color: #5f6b65;
}

body:not([data-step="intro"]) .context-system-block.is-offline {
  background: #fcf3e4;
}

body:not([data-step="intro"]) .workbench-actionbar {
  border-color: #cbd4ce;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(23, 32, 29, 0.16);
}

body:not([data-step="intro"]) .actionbar-status span {
  color: #8a590e;
}

body:not([data-step="intro"]) .actionbar-status small {
  color: #78837d;
}

body:not([data-step="intro"]) .trial-status-badge {
  border-color: #d7b26f;
  background: #fbf1df;
  color: #81530c;
}

@media (max-width: 900px) {
  body:not([data-step="intro"]) .app-shell {
    padding: 10px;
  }

  body:not([data-step="intro"]) .topbar {
    display: flex;
    align-items: center;
  }

  body:not([data-step="intro"]) .top-actions {
    margin-left: auto;
    justify-content: flex-end;
  }

  body:not([data-step="intro"]) .program-grid,
  body:not([data-step="intro"]) .program-grid > *,
  body:not([data-step="intro"]) .program-card,
  body:not([data-step="intro"]) .sop-card,
  body:not([data-step="intro"]) .liquid-plan-panel,
  body:not([data-step="intro"]) .program-detail,
  body:not([data-step="intro"]) .sop-table-wrap {
    min-width: 0;
    max-width: 100%;
  }

  body:not([data-step="intro"]) .sop-info-item.wide {
    grid-column: auto;
  }

  body:not([data-step="intro"]) .workflow-progress-item:nth-child(-n + 3) {
    border-bottom-color: #e0e6e2;
  }

  body:not([data-step="intro"]) .workbench-actionbar {
    bottom: 8px;
  }

  body:not([data-step="intro"]) button,
  body:not([data-step="intro"]) select,
  body:not([data-step="intro"]) input[type="number"] {
    min-height: 44px;
  }
}

@media (max-width: 620px) {
  body:not([data-step="intro"]) .workflow-progress-item {
    display: block;
    padding: 9px 4px;
    text-align: center;
  }

  body:not([data-step="intro"]) .workflow-progress-item > span:first-child {
    display: none;
  }

  body:not([data-step="intro"]) .workflow-progress-item > span:last-child {
    display: block;
  }

  body:not([data-step="intro"]) .workflow-progress-item strong {
    font-size: 11px;
    line-height: 1.2;
  }

  body:not([data-step="intro"]) .workflow-progress-item small {
    display: none;
  }

  body:not([data-step="intro"]) .command-panel,
  body:not([data-step="intro"]) .judgement-board,
  body:not([data-step="intro"]) .match-panel,
  body:not([data-step="intro"]) .result-panel,
  body:not([data-step="intro"]) .program-card {
    padding: 16px;
  }
}

/* Billow-inspired local theme: clear sky workspace, white surfaces, navy type. */
:root {
  --ink: #102b3b;
  --muted: #6f8794;
  --paper: #eef9ff;
  --paper-soft: #f7fcff;
  --paper-warm: #e4f5fd;
  --line: #d8e8ef;
  --accent: #149bc8;
  --accent-deep: #087ba8;
  --accent-soft: #e2f5fc;
  --green: #27865e;
  --red: #cf554d;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-soft: #f6fbfd;
  --shadow: 0 22px 64px rgba(54, 108, 134, 0.12);
  --soft-shadow: 0 12px 34px rgba(54, 108, 134, 0.09);
  font-family: Inter, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body,
body:not([data-step="intro"]) {
  color: var(--ink);
  background-color: #edf9ff;
  background-image:
    linear-gradient(rgba(82, 153, 185, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 153, 185, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  background-attachment: fixed;
}

.topbar,
body:not([data-step="intro"]) .topbar {
  color: var(--ink);
  backdrop-filter: blur(16px);
}

.topbar::before,
body:not([data-step="intro"]) .topbar::before {
  border-color: rgba(185, 215, 228, 0.9);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 10px 30px rgba(65, 121, 146, 0.09);
}

.brand,
.brand strong,
body:not([data-step="intro"]) .topbar .brand,
body:not([data-step="intro"]) .topbar .brand strong {
  color: #102b3b;
}

.brand small,
body:not([data-step="intro"]) .topbar .brand small {
  color: #708794;
}

.brand-mark,
body:not([data-step="intro"]) .topbar .brand-mark {
  border-color: #9dd7ea;
  background: #e3f6fd;
  color: #087ca8;
  box-shadow: 0 7px 18px rgba(38, 135, 174, 0.12);
}

h1,
h2,
h3,
h4,
body:not([data-step="intro"]) h1,
body:not([data-step="intro"]) h2,
body:not([data-step="intro"]) h3,
body:not([data-step="intro"]) h4,
body:not([data-step="intro"]) .stage-copy h2 {
  color: #102b3b;
}

.eyebrow,
.panel-kicker,
body:not([data-step="intro"]) .eyebrow,
body:not([data-step="intro"]) .panel-kicker {
  color: #158cb6;
}

.hero-text,
.stage-copy p,
body:not([data-step="intro"]) .stage-copy p,
body:not([data-step="intro"]) .workbench-stage-area .stage-copy p:last-child {
  color: #6a8290;
}

.ghost-button,
.quick-row button,
body:not([data-step="intro"]) .ghost-button,
body:not([data-step="intro"]) .quick-row button,
body:not([data-step="intro"]) .topbar .ghost-button,
body:not([data-step="intro"]) .topbar .primary-button {
  border-color: #c9dfe8;
  background: #ffffff;
  color: #365769;
  box-shadow: 0 3px 10px rgba(54, 108, 134, 0.06);
}

.primary-button,
.dark-button,
.stage-button,
body:not([data-step="intro"]) .primary-button,
body:not([data-step="intro"]) .dark-button,
body:not([data-step="intro"]) .stage-button {
  border-color: #1294c0;
  background: #149bc8;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(20, 155, 200, 0.18);
}

.ghost-button:hover,
.quick-row button:hover,
body:not([data-step="intro"]) .ghost-button:hover,
body:not([data-step="intro"]) .quick-row button:hover,
body:not([data-step="intro"]) .topbar .ghost-button:hover,
body:not([data-step="intro"]) .topbar .primary-button:hover {
  border-color: #83cbe4;
  background: #effaff;
  color: #087ba8;
}

.primary-button:hover,
.dark-button:hover,
.stage-button:hover,
body:not([data-step="intro"]) .primary-button:hover,
body:not([data-step="intro"]) .dark-button:hover,
body:not([data-step="intro"]) .stage-button:hover {
  border-color: #087ba8;
  background: #087fae;
}

body[data-step="intro"] .intro-stage {
  border-color: #c9e4ef;
  background: #f8fdff;
  box-shadow: 0 28px 80px rgba(54, 108, 134, 0.14);
}

.intro-stage::before {
  border-color: #d6eaf2;
  background-image:
    linear-gradient(rgba(87, 156, 187, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 156, 187, 0.055) 1px, transparent 1px);
  background-color: #f4fbfe;
  background-size: 64px 64px;
}

.intro-stage::after {
  background: #5dc4e8;
  box-shadow: 0 0 24px rgba(93, 196, 232, 0.36);
}

.intro-copy h1 {
  color: #102b3b;
  font-family: Georgia, "Iowan Old Style", "Songti SC", STSong, serif;
  font-weight: 700;
}

.machine-figure {
  border-color: #b9ddeb;
  background: #e2f5fd;
  box-shadow: 0 26px 60px rgba(54, 108, 134, 0.17);
}

.machine-figure::before {
  background: rgba(224, 246, 254, 0.06);
}

.machine-figure::after {
  background: #55bfe5;
  box-shadow: 0 0 22px rgba(64, 181, 224, 0.34);
}

.command-panel,
.judgement-board,
.match-panel,
.result-panel,
.program-card,
.trial-status-board,
body:not([data-step="intro"]) .command-panel,
body:not([data-step="intro"]) .judgement-board,
body:not([data-step="intro"]) .match-panel,
body:not([data-step="intro"]) .result-panel,
body:not([data-step="intro"]) .program-card,
body:not([data-step="intro"]) .trial-status-board {
  border-color: #d2e5ed;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(54, 108, 134, 0.1);
  backdrop-filter: none;
}

textarea,
select,
input[type="number"],
.box-select,
body:not([data-step="intro"]) textarea,
body:not([data-step="intro"]) select,
body:not([data-step="intro"]) input[type="number"],
body:not([data-step="intro"]) .box-select {
  border-color: #cbdfe8;
  background: #f8fcfe;
  color: #163749;
}

textarea::placeholder,
body:not([data-step="intro"]) textarea::placeholder {
  color: #96a9b3;
}

textarea:focus,
select:focus,
input[type="number"]:focus,
body:not([data-step="intro"]) textarea:focus,
body:not([data-step="intro"]) select:focus,
body:not([data-step="intro"]) input[type="number"]:focus {
  border-color: #39add5;
  box-shadow: 0 0 0 4px rgba(57, 173, 213, 0.13);
}

.command-field span,
.field span,
body:not([data-step="intro"]) .command-field span,
body:not([data-step="intro"]) .field span,
.more-options summary,
body:not([data-step="intro"]) .more-options summary {
  color: #67808e;
}

.command-message,
body:not([data-step="intro"]) .command-message {
  color: #087ba8;
}

.thinking-console,
body:not([data-step="intro"]) .thinking-console {
  border-color: #bfe3f0;
  background: #eefaff;
  box-shadow: 0 16px 38px rgba(54, 108, 134, 0.1);
}

.thinking-core {
  border-color: #76c9e5;
  background: #ffffff;
  box-shadow: 0 0 0 7px rgba(90, 193, 229, 0.1), 0 10px 26px rgba(45, 142, 178, 0.12);
}

.thinking-core::before,
.thinking-core::after {
  border-color: rgba(32, 163, 207, 0.2);
}

.thinking-core span,
.thinking-step.active strong {
  color: #087ba8;
}

.thinking-copy strong,
body:not([data-step="intro"]) .thinking-copy strong {
  color: #17384a;
}

.thinking-copy span,
.thinking-step span,
body:not([data-step="intro"]) .thinking-copy span,
body:not([data-step="intro"]) .thinking-step span {
  color: #73909f;
}

.thinking-meter {
  background: #d8edf5;
}

.thinking-meter span {
  background: #2cadD8;
  box-shadow: 0 0 16px rgba(44, 173, 216, 0.22);
}

.thinking-step,
body:not([data-step="intro"]) .thinking-step {
  border-color: #d2e7ef;
  background: #ffffff;
}

.thinking-step strong,
body:not([data-step="intro"]) .thinking-step strong {
  color: #365769;
}

.thinking-step.active {
  border-color: #76c9e5;
  background: #e7f7fd;
}

.thinking-step.done {
  border-color: #b8dccb;
  background: #f0faf5;
}

.thinking-code-stream {
  border-top-color: #cde4ed;
  color: #237ea0;
}

.fit-chip-row span,
.reason-chips span,
.technique-chips span,
.state-stack span,
.block-title span,
.match-head span,
.status-pill,
body:not([data-step="intro"]) .fit-chip-row span,
body:not([data-step="intro"]) .reason-chips span,
body:not([data-step="intro"]) .technique-chips span,
body:not([data-step="intro"]) .state-stack span,
body:not([data-step="intro"]) .block-title span,
body:not([data-step="intro"]) .match-head span,
body:not([data-step="intro"]) .status-pill {
  border-color: #cfe3ec;
  background: #f0f8fb;
  color: #496574;
}

.fit-grid > div,
.mini-item,
.review-item,
.liquid-box,
.capability-list div,
.warning-list p,
.normalize-list p,
body:not([data-step="intro"]) .fit-grid > div,
body:not([data-step="intro"]) .mini-item,
body:not([data-step="intro"]) .liquid-box,
body:not([data-step="intro"]) .capability-list div,
body:not([data-step="intro"]) .warning-list p,
body:not([data-step="intro"]) .normalize-list p {
  border-color: #d6e7ee;
  background: #f8fcfe;
}

.match-summary,
body:not([data-step="intro"]) .match-summary {
  border-color: #b8deec;
  background: #eaf8fd;
}

.match-summary h3,
body:not([data-step="intro"]) .match-summary h3 {
  color: #12364a;
}

.match-summary p,
body:not([data-step="intro"]) .match-summary p {
  color: #5b7988;
}

.score-ring,
body:not([data-step="intro"]) .score-ring {
  border-color: #8ed2e8;
  background: #e8f7fc;
  color: #087ba8;
}

.score-ring span,
body:not([data-step="intro"]) .score-ring span {
  color: #678694;
}

.match-item,
body:not([data-step="intro"]) .match-item {
  border-color: #d3e4eb;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(54, 108, 134, 0.05);
}

.match-item:hover,
body:not([data-step="intro"]) .match-item:hover {
  border-color: #74c5e1;
  box-shadow: 0 13px 30px rgba(54, 108, 134, 0.11);
}

.match-item.featured,
.match-item.selected,
body:not([data-step="intro"]) .match-item.featured,
body:not([data-step="intro"]) .match-item.selected {
  border-color: #5fbedf;
  background: #effaff;
}

.match-item strong,
body:not([data-step="intro"]) .match-item strong,
.mini-item strong,
.box-head strong,
.review-item strong,
body:not([data-step="intro"]) .mini-item strong,
body:not([data-step="intro"]) .box-head strong,
body:not([data-step="intro"]) .review-item strong {
  color: #17384a;
}

.match-item small,
body:not([data-step="intro"]) .match-item small,
.fit-summary,
.fit-grid p,
.warning-list p,
.normalize-list p,
.technique-reasons p,
.small-note,
body:not([data-step="intro"]) .fit-summary,
body:not([data-step="intro"]) .fit-grid p,
body:not([data-step="intro"]) .warning-list p,
body:not([data-step="intro"]) .normalize-list p,
body:not([data-step="intro"]) .technique-reasons p,
body:not([data-step="intro"]) .small-note {
  color: #637f8d;
}

.match-item b,
body:not([data-step="intro"]) .match-item b,
.technique-brief-head span,
.tag-line strong,
.capability-item strong,
body:not([data-step="intro"]) .technique-brief-head span,
body:not([data-step="intro"]) .tag-line strong,
body:not([data-step="intro"]) .capability-item strong {
  border-color: #a8d9e9;
  background: #e6f6fc;
  color: #087ba8;
}

.dish-image-frame,
body:not([data-step="intro"]) .dish-image-frame {
  border-color: #cce1ea;
  background: #eef8fc;
}

.metrics div,
body:not([data-step="intro"]) .metrics div,
.sop-info-item,
.sop-lower-grid > div,
.sop-box-standard article,
.export-doc-grid article,
body:not([data-step="intro"]) .sop-info-item,
body:not([data-step="intro"]) .sop-lower-grid > div,
body:not([data-step="intro"]) .sop-box-standard article,
body:not([data-step="intro"]) .export-doc-grid article {
  border-color: #d6e7ee;
  background: #f8fcfe;
}

.metric-value,
body:not([data-step="intro"]) .metric-value {
  color: #102b3b;
}

.metric-label,
.metric-meta,
.sop-info-item strong,
th,
body:not([data-step="intro"]) .metric-label,
body:not([data-step="intro"]) .metric-meta,
body:not([data-step="intro"]) .sop-info-item strong,
body:not([data-step="intro"]) th {
  color: #6f8794;
}

.program-detail,
body:not([data-step="intro"]) .program-detail,
.table-wrap,
.sop-table-wrap,
body:not([data-step="intro"]) .table-wrap,
body:not([data-step="intro"]) .sop-table-wrap {
  border-color: #d3e5ed;
  background: #ffffff;
}

.program-detail summary,
body:not([data-step="intro"]) .program-detail summary {
  background: #f8fcfe;
}

.program-detail summary h3,
.block-title h3,
.sop-lower-grid h4,
body:not([data-step="intro"]) .program-detail summary h3,
body:not([data-step="intro"]) .block-title h3,
body:not([data-step="intro"]) .sop-lower-grid h4 {
  color: #087ba8;
}

.command-item,
body:not([data-step="intro"]) .command-item {
  border-color: #c9e2ec;
  background: #f2faff;
  color: #1c526b;
}

.phase-chart {
  border-color: #d2e6ee;
  background-color: #f4fbfe;
  background-image:
    linear-gradient(rgba(87, 156, 187, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 156, 187, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
}

.bar {
  background: #48b7dd;
}

.bar:nth-child(2n) {
  background: #73c9e6;
}

.bar:nth-child(3n) {
  background: #168eb9;
}

.bar span {
  color: #ffffff;
}

.workflow-progress,
body:not([data-step="intro"]) .workflow-progress {
  border-color: #ccdee6;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 9px 26px rgba(54, 108, 134, 0.08);
}

.workflow-progress-item,
body:not([data-step="intro"]) .workflow-progress-item {
  border-right-color: #e0edf2;
  background: #f8fcfe;
  color: #667f8c;
}

.workflow-progress-item.active,
body:not([data-step="intro"]) .workflow-progress-item.active {
  background: #e8f7fc;
  color: #087ba8;
  box-shadow: inset 0 -3px 0 #24a8d4;
}

.workflow-progress-item.complete,
body:not([data-step="intro"]) .workflow-progress-item.complete {
  background: #f1faf6;
  color: #2c7e5a;
}

.workflow-progress-item.error,
body:not([data-step="intro"]) .workflow-progress-item.error {
  background: #fff3f1;
  color: #b84b43;
}

.workflow-sidebar,
.context-sidebar,
body:not([data-step="intro"]) .workflow-sidebar,
body:not([data-step="intro"]) .context-sidebar {
  border-color: #d2e4ec;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(54, 108, 134, 0.08);
}

.workflow-side-item,
body:not([data-step="intro"]) .workflow-side-item {
  border-bottom-color: #e2edf2;
  color: #68808d;
}

.workflow-side-item:hover:not(:disabled),
.workflow-side-item.active,
body:not([data-step="intro"]) .workflow-side-item:hover:not(:disabled),
body:not([data-step="intro"]) .workflow-side-item.active {
  background: #eaf8fd;
  color: #087ba8;
}

.workflow-side-item > span,
body:not([data-step="intro"]) .workflow-side-item > span {
  color: #1594c0;
}

.context-toggle,
body:not([data-step="intro"]) .context-toggle {
  border-bottom-color: #dceaf0;
  background: #f6fbfd;
  color: #17384a;
}

.context-block,
body:not([data-step="intro"]) .context-block {
  border-bottom-color: #e1edf2;
}

#contextDemandSummary,
#contextDeviceSummary,
#contextSaveStatus,
#contextNetworkStatus,
.context-validation-item,
body:not([data-step="intro"]) #contextDemandSummary,
body:not([data-step="intro"]) #contextDeviceSummary,
body:not([data-step="intro"]) #contextSaveStatus,
body:not([data-step="intro"]) #contextNetworkStatus,
body:not([data-step="intro"]) .context-validation-item {
  color: #607b89;
}

.workbench-actionbar,
body:not([data-step="intro"]) .workbench-actionbar {
  border-color: #c9dfe8;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 42px rgba(54, 108, 134, 0.15);
}

.actionbar-status span,
body:not([data-step="intro"]) .actionbar-status span {
  color: #087ba8;
}

.actionbar-status small,
body:not([data-step="intro"]) .actionbar-status small {
  color: #738a96;
}

.trial-status-badge,
body:not([data-step="intro"]) .trial-status-badge {
  border-color: #acdceB;
  background: #eaf8fd;
  color: #087ba8;
}

.review-item.pass,
body:not([data-step="intro"]) .review-item.pass {
  border-color: #b8dccb;
  background: #f0faf5;
}

.review-item.warn,
body:not([data-step="intro"]) .review-item.warn {
  border-color: #ecd5a8;
  background: #fff9ed;
}

.review-item.error,
body:not([data-step="intro"]) .review-item.error {
  border-color: #ebc4bf;
  background: #fff3f1;
}

@media (max-width: 900px) {
  body,
  body:not([data-step="intro"]) {
    background-size: 54px 54px;
  }

  body[data-step="intro"] .intro-stage {
    background: #f8fdff;
  }
}

/* Final Step 6 specificity fixes. Keep delivery actions in the blue workbench palette. */
body[data-step="trial"] .export-docs-card .export-doc-grid article .ghost-button {
  border-color: #b9dce9;
  background: #f4fbfe;
  color: #087ba8;
  box-shadow: none;
}

body[data-step="trial"] .export-docs-card .export-doc-grid article .ghost-button:hover {
  border-color: #77c5e0;
  background: #e7f7fd;
  color: #066f99;
}

body[data-step="trial"] .workbench-actionbar {
  position: static;
  left: auto;
  bottom: auto;
  width: min(820px, calc(100% - 28px));
  margin: 20px auto 12px;
  transform: none;
}

@media (max-width: 900px) {
  body[data-step="trial"] .workbench-actionbar {
    width: calc(100% - 16px);
  }

  body[data-step="trial"] .export-docs-card .export-doc-grid article .ghost-button {
    min-height: 44px;
    padding-inline: 14px;
  }
}

/* Simple neutral workbench theme. Inspired by calm AI editors, not dashboards. */
:root {
  --workspace-bg: #ffffff;
  --workspace-surface: #ffffff;
  --workspace-subtle: #faf8f5;
  --workspace-hover: #f4f1ec;
  --workspace-border: #e8e3dc;
  --workspace-border-strong: #d8d1c8;
  --workspace-text: #202123;
  --workspace-muted: #6d6d68;
  --workspace-faint: #94948d;
  --workspace-accent: #d85d20;
  --workspace-accent-soft: #fff3ec;
  --workspace-primary: #202123;
  --workspace-danger: #b42318;
  --workspace-danger-soft: #fff1ef;
  --workspace-warning: #9a6700;
  --workspace-warning-soft: #fff8e6;
  --ink: var(--workspace-text);
  --muted: var(--workspace-muted);
  --paper: var(--workspace-bg);
  --paper-soft: var(--workspace-surface);
  --paper-warm: var(--workspace-subtle);
  --line: var(--workspace-border);
  --accent: var(--workspace-accent);
  --accent-deep: #b94b17;
  --accent-soft: var(--workspace-accent-soft);
  --green: var(--workspace-accent);
  --red: var(--workspace-danger);
  --panel: var(--workspace-surface);
  --panel-strong: var(--workspace-surface);
  --panel-soft: var(--workspace-subtle);
  --shadow: 0 1px 2px rgba(24, 24, 22, 0.04);
  --soft-shadow: 0 1px 2px rgba(24, 24, 22, 0.04);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  background: var(--workspace-bg);
}

body,
body:not([data-step="intro"]) {
  color: var(--workspace-text);
  background: var(--workspace-bg);
  background-image: none !important;
  background-attachment: scroll;
}

.app-shell,
body:not([data-step="intro"]) .app-shell {
  width: min(1440px, 100%);
  padding: 14px 20px 22px;
}

.topbar,
body:not([data-step="intro"]) .topbar {
  padding: 4px 0 12px;
  color: var(--workspace-text);
  backdrop-filter: none;
}

.topbar::before,
body:not([data-step="intro"]) .topbar::before {
  inset: 0 -1px 8px;
  border: 1px solid var(--workspace-border);
  border-radius: 12px;
  background: var(--workspace-surface);
  box-shadow: none;
}

.brand,
.brand strong,
body:not([data-step="intro"]) .topbar .brand,
body:not([data-step="intro"]) .topbar .brand strong {
  color: var(--workspace-text);
}

.brand small,
body:not([data-step="intro"]) .topbar .brand small {
  color: var(--workspace-muted);
}

.brand-mark,
body:not([data-step="intro"]) .topbar .brand-mark {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-subtle);
  color: var(--workspace-text);
  box-shadow: none;
}

h1,
h2,
h3,
h4,
body:not([data-step="intro"]) h1,
body:not([data-step="intro"]) h2,
body:not([data-step="intro"]) h3,
body:not([data-step="intro"]) h4,
body:not([data-step="intro"]) .stage-copy h2 {
  color: var(--workspace-text);
}

.eyebrow,
.panel-kicker,
body:not([data-step="intro"]) .eyebrow,
body:not([data-step="intro"]) .panel-kicker {
  color: var(--workspace-muted);
  letter-spacing: 0.08em;
}

.hero-text,
.stage-copy p,
body:not([data-step="intro"]) .stage-copy p,
body:not([data-step="intro"]) .workbench-stage-area .stage-copy p:last-child {
  color: var(--workspace-muted);
}

.ghost-button,
.quick-row button,
body:not([data-step="intro"]) .ghost-button,
body:not([data-step="intro"]) .quick-row button,
body:not([data-step="intro"]) .topbar .ghost-button,
body:not([data-step="intro"]) .topbar .primary-button {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-surface);
  color: var(--workspace-text);
  box-shadow: none;
}

.ghost-button:hover,
.quick-row button:hover,
body:not([data-step="intro"]) .ghost-button:hover,
body:not([data-step="intro"]) .quick-row button:hover,
body:not([data-step="intro"]) .topbar .ghost-button:hover,
body:not([data-step="intro"]) .topbar .primary-button:hover {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-hover);
  color: var(--workspace-text);
}

.primary-button,
.dark-button,
.stage-button,
body:not([data-step="intro"]) .primary-button,
body:not([data-step="intro"]) .dark-button,
body:not([data-step="intro"]) .stage-button {
  border-color: var(--workspace-primary);
  background: var(--workspace-primary);
  color: #ffffff;
  box-shadow: none;
}

.primary-button:hover,
.dark-button:hover,
.stage-button:hover,
body:not([data-step="intro"]) .primary-button:hover,
body:not([data-step="intro"]) .dark-button:hover,
body:not([data-step="intro"]) .stage-button:hover {
  border-color: #3a3a37;
  background: #3a3a37;
  color: #ffffff;
}

button:focus-visible,
textarea:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(47, 111, 99, 0.35);
  outline-offset: 2px;
}

body[data-step="intro"] .intro-stage {
  border-color: var(--workspace-border);
  background: var(--workspace-surface);
  box-shadow: none;
}

.intro-stage::before,
.intro-stage::after,
.machine-figure::before,
.machine-figure::after {
  display: none;
}

.intro-copy h1 {
  color: var(--workspace-text);
  font-family: inherit;
  font-weight: 700;
}

.machine-figure {
  border-color: var(--workspace-border);
  background: var(--workspace-subtle);
  box-shadow: none;
}

.workflow-progress,
body:not([data-step="intro"]) .workflow-progress {
  top: 64px;
  gap: 0;
  border-color: var(--workspace-border);
  background: var(--workspace-surface);
  box-shadow: none;
  backdrop-filter: none;
}

.workflow-progress-item,
body:not([data-step="intro"]) .workflow-progress-item {
  min-height: 50px;
  border-right-color: var(--workspace-border);
  background: var(--workspace-surface);
  color: var(--workspace-muted);
}

.workflow-progress-item > span,
body:not([data-step="intro"]) .workflow-progress-item > span {
  border-color: var(--workspace-border-strong);
  background: transparent;
}

.workflow-progress-item small,
body:not([data-step="intro"]) .workflow-progress-item small {
  color: var(--workspace-faint);
}

.workflow-progress-item.active,
body:not([data-step="intro"]) .workflow-progress-item.active {
  background: var(--workspace-subtle);
  color: var(--workspace-text);
  box-shadow: inset 0 -2px 0 var(--workspace-text);
}

.workflow-progress-item.active > span,
body:not([data-step="intro"]) .workflow-progress-item.active > span {
  border-color: var(--workspace-text);
  background: var(--workspace-text);
  color: #ffffff;
}

body:not([data-step="intro"]) .workflow-progress-item.active > span:first-child {
  border-color: var(--workspace-text);
  background: var(--workspace-text);
  color: #ffffff;
}

.workflow-progress-item.complete,
body:not([data-step="intro"]) .workflow-progress-item.complete {
  background: var(--workspace-surface);
  color: var(--workspace-accent);
}

.workflow-progress-item.complete > span,
body:not([data-step="intro"]) .workflow-progress-item.complete > span {
  border-color: #a9c9be;
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
}

.workflow-progress-item.error,
body:not([data-step="intro"]) .workflow-progress-item.error {
  background: var(--workspace-danger-soft);
  color: var(--workspace-danger);
}

.workbench-grid,
body:not([data-step="intro"]) .workbench-grid {
  gap: 16px;
}

.workflow-sidebar,
.context-sidebar,
body:not([data-step="intro"]) .workflow-sidebar,
body:not([data-step="intro"]) .context-sidebar {
  border-color: var(--workspace-border);
  background: var(--workspace-surface);
  box-shadow: none;
  backdrop-filter: none;
}

.context-toggle,
body:not([data-step="intro"]) .context-toggle {
  border-bottom-color: var(--workspace-border);
  background: var(--workspace-surface);
  color: var(--workspace-text);
}

.context-toggle b,
body:not([data-step="intro"]) .context-toggle b,
.context-block-head span,
body:not([data-step="intro"]) .context-block-head span {
  color: var(--workspace-faint);
}

.context-toggle.has-errors b,
body:not([data-step="intro"]) .context-toggle.has-errors b {
  color: var(--workspace-danger);
}

.context-block,
body:not([data-step="intro"]) .context-block {
  border-bottom-color: var(--workspace-border);
}

#contextDemandSummary,
#contextDeviceSummary,
#contextSaveStatus,
#contextNetworkStatus,
.context-validation-item,
body:not([data-step="intro"]) #contextDemandSummary,
body:not([data-step="intro"]) #contextDeviceSummary,
body:not([data-step="intro"]) #contextSaveStatus,
body:not([data-step="intro"]) #contextNetworkStatus,
body:not([data-step="intro"]) .context-validation-item {
  color: var(--workspace-muted);
}

.context-system-block.is-offline,
body:not([data-step="intro"]) .context-system-block.is-offline {
  background: var(--workspace-warning-soft);
}

.command-panel,
.judgement-board,
.match-panel,
.result-panel,
.program-card,
.trial-status-board,
.sop-card,
.liquid-plan-panel,
.export-docs-card,
body:not([data-step="intro"]) .command-panel,
body:not([data-step="intro"]) .judgement-board,
body:not([data-step="intro"]) .match-panel,
body:not([data-step="intro"]) .result-panel,
body:not([data-step="intro"]) .program-card,
body:not([data-step="intro"]) .trial-status-board,
body:not([data-step="intro"]) .sop-card,
body:not([data-step="intro"]) .liquid-plan-panel,
body:not([data-step="intro"]) .export-docs-card {
  border-color: var(--workspace-border);
  background: var(--workspace-surface);
  box-shadow: none;
  backdrop-filter: none;
}

textarea,
select,
input[type="text"],
input[type="number"],
.box-select,
body:not([data-step="intro"]) textarea,
body:not([data-step="intro"]) select,
body:not([data-step="intro"]) input[type="text"],
body:not([data-step="intro"]) input[type="number"],
body:not([data-step="intro"]) .box-select {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-surface);
  color: var(--workspace-text);
  box-shadow: none;
}

textarea::placeholder,
input::placeholder,
body:not([data-step="intro"]) textarea::placeholder,
body:not([data-step="intro"]) input::placeholder {
  color: var(--workspace-faint);
}

textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
body:not([data-step="intro"]) textarea:focus,
body:not([data-step="intro"]) select:focus,
body:not([data-step="intro"]) input[type="text"]:focus,
body:not([data-step="intro"]) input[type="number"]:focus {
  border-color: #8f8f88;
  box-shadow: 0 0 0 3px rgba(32, 33, 35, 0.08);
}

.command-field span,
.field span,
.more-options summary,
body:not([data-step="intro"]) .command-field span,
body:not([data-step="intro"]) .field span,
body:not([data-step="intro"]) .more-options summary {
  color: var(--workspace-muted);
}

.command-message,
body:not([data-step="intro"]) .command-message {
  color: var(--workspace-accent);
}

.thinking-console,
body:not([data-step="intro"]) .thinking-console {
  border-color: var(--workspace-border);
  background: var(--workspace-subtle);
  box-shadow: none;
}

.thinking-core {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-surface);
  box-shadow: none;
}

.thinking-core::before,
.thinking-core::after {
  border-color: rgba(47, 111, 99, 0.16);
}

.thinking-core span,
.thinking-step.active strong,
.thinking-copy strong,
body:not([data-step="intro"]) .thinking-copy strong {
  color: var(--workspace-text);
}

.thinking-copy span,
.thinking-step span,
body:not([data-step="intro"]) .thinking-copy span,
body:not([data-step="intro"]) .thinking-step span {
  color: var(--workspace-muted);
}

.thinking-meter {
  background: #dfdfdb;
}

.thinking-meter span {
  background: var(--workspace-accent);
  box-shadow: none;
}

.thinking-step,
body:not([data-step="intro"]) .thinking-step {
  border-color: var(--workspace-border);
  background: var(--workspace-surface);
}

.thinking-step strong,
body:not([data-step="intro"]) .thinking-step strong {
  color: var(--workspace-text);
}

.thinking-step.active,
body:not([data-step="intro"]) .thinking-step.active {
  border-color: #a9c9be;
  background: var(--workspace-accent-soft);
}

.thinking-step.done,
body:not([data-step="intro"]) .thinking-step.done {
  border-color: #c8ddd5;
  background: #f5faf7;
}

.thinking-code-stream,
body:not([data-step="intro"]) .thinking-code-stream {
  border-top-color: var(--workspace-border);
  color: var(--workspace-muted);
}

.fit-chip-row span,
.reason-chips span,
.technique-chips span,
.state-stack span,
.block-title span,
.match-head span,
.status-pill,
body:not([data-step="intro"]) .fit-chip-row span,
body:not([data-step="intro"]) .reason-chips span,
body:not([data-step="intro"]) .technique-chips span,
body:not([data-step="intro"]) .state-stack span,
body:not([data-step="intro"]) .block-title span,
body:not([data-step="intro"]) .match-head span,
body:not([data-step="intro"]) .status-pill {
  border-color: var(--workspace-border);
  background: var(--workspace-subtle);
  color: var(--workspace-muted);
}

.fit-grid > div,
.mini-item,
.review-item,
.liquid-box,
.capability-list div,
.warning-list p,
.normalize-list p,
.metrics div,
.sop-info-item,
.sop-lower-grid > div,
.sop-box-standard article,
.export-doc-grid article,
body:not([data-step="intro"]) .fit-grid > div,
body:not([data-step="intro"]) .mini-item,
body:not([data-step="intro"]) .review-item,
body:not([data-step="intro"]) .liquid-box,
body:not([data-step="intro"]) .capability-list div,
body:not([data-step="intro"]) .warning-list p,
body:not([data-step="intro"]) .normalize-list p,
body:not([data-step="intro"]) .metrics div,
body:not([data-step="intro"]) .sop-info-item,
body:not([data-step="intro"]) .sop-lower-grid > div,
body:not([data-step="intro"]) .sop-box-standard article,
body:not([data-step="intro"]) .export-doc-grid article {
  border-color: var(--workspace-border);
  background: var(--workspace-subtle);
  box-shadow: none;
}

.match-summary,
body:not([data-step="intro"]) .match-summary {
  border-color: var(--workspace-border);
  background: var(--workspace-subtle);
}

.match-summary h3,
.match-item strong,
.mini-item strong,
.box-head strong,
.review-item strong,
body:not([data-step="intro"]) .match-summary h3,
body:not([data-step="intro"]) .match-item strong,
body:not([data-step="intro"]) .mini-item strong,
body:not([data-step="intro"]) .box-head strong,
body:not([data-step="intro"]) .review-item strong {
  color: var(--workspace-text);
}

.match-summary p,
.match-item small,
.fit-summary,
.fit-grid p,
.warning-list p,
.normalize-list p,
.technique-reasons p,
.small-note,
body:not([data-step="intro"]) .match-summary p,
body:not([data-step="intro"]) .match-item small,
body:not([data-step="intro"]) .fit-summary,
body:not([data-step="intro"]) .fit-grid p,
body:not([data-step="intro"]) .warning-list p,
body:not([data-step="intro"]) .normalize-list p,
body:not([data-step="intro"]) .technique-reasons p,
body:not([data-step="intro"]) .small-note {
  color: var(--workspace-muted);
}

.score-ring,
body:not([data-step="intro"]) .score-ring {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-surface);
  color: var(--workspace-text);
}

.score-ring span,
body:not([data-step="intro"]) .score-ring span {
  color: var(--workspace-muted);
}

.match-item,
body:not([data-step="intro"]) .match-item {
  border-color: var(--workspace-border);
  background: var(--workspace-surface);
  box-shadow: none;
}

.match-item:hover,
body:not([data-step="intro"]) .match-item:hover {
  border-color: var(--workspace-border-strong);
  background: #fbfbfa;
  box-shadow: none;
}

.match-item.featured,
.match-item.selected,
body:not([data-step="intro"]) .match-item.featured,
body:not([data-step="intro"]) .match-item.selected {
  border-color: #9ab9b0;
  background: var(--workspace-accent-soft);
}

.match-item b,
.technique-brief-head span,
.tag-line strong,
.capability-item strong,
body:not([data-step="intro"]) .match-item b,
body:not([data-step="intro"]) .technique-brief-head span,
body:not([data-step="intro"]) .tag-line strong,
body:not([data-step="intro"]) .capability-item strong {
  border-color: #c8ddd5;
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
}

.dish-image-frame,
body:not([data-step="intro"]) .dish-image-frame {
  border-color: var(--workspace-border);
  background: var(--workspace-subtle);
}

.metric-value,
body:not([data-step="intro"]) .metric-value {
  color: var(--workspace-text);
}

.metric-label,
.metric-meta,
.sop-info-item strong,
th,
body:not([data-step="intro"]) .metric-label,
body:not([data-step="intro"]) .metric-meta,
body:not([data-step="intro"]) .sop-info-item strong,
body:not([data-step="intro"]) th {
  color: var(--workspace-muted);
}

.program-detail,
.table-wrap,
.sop-table-wrap,
body:not([data-step="intro"]) .program-detail,
body:not([data-step="intro"]) .table-wrap,
body:not([data-step="intro"]) .sop-table-wrap {
  border-color: var(--workspace-border);
  background: var(--workspace-surface);
  box-shadow: none;
}

.program-detail summary,
body:not([data-step="intro"]) .program-detail summary {
  background: var(--workspace-subtle);
}

.program-detail summary h3,
.block-title h3,
.sop-lower-grid h4,
body:not([data-step="intro"]) .program-detail summary h3,
body:not([data-step="intro"]) .block-title h3,
body:not([data-step="intro"]) .sop-lower-grid h4 {
  color: var(--workspace-text);
}

.command-item,
body:not([data-step="intro"]) .command-item {
  border-color: var(--workspace-border);
  background: var(--workspace-subtle);
  color: var(--workspace-text);
}

.phase-chart {
  border-color: var(--workspace-border);
  background: var(--workspace-subtle);
  background-image: none !important;
}

.bar,
.bar:nth-child(2n),
.bar:nth-child(3n) {
  background: #7f9f96;
}

.review-item.pass,
body:not([data-step="intro"]) .review-item.pass {
  border-color: #c8ddd5;
  background: #f5faf7;
}

.review-item.warn,
body:not([data-step="intro"]) .review-item.warn {
  border-color: #ead8a8;
  background: var(--workspace-warning-soft);
}

.review-item.error,
body:not([data-step="intro"]) .review-item.error {
  border-color: #efc4bf;
  background: var(--workspace-danger-soft);
}

.trial-status-badge,
body:not([data-step="intro"]) .trial-status-badge {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-subtle);
  color: var(--workspace-text);
}

.workbench-actionbar,
body:not([data-step="intro"]) .workbench-actionbar {
  border-color: var(--workspace-border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(24, 24, 22, 0.08);
  backdrop-filter: blur(12px);
}

.actionbar-status span,
body:not([data-step="intro"]) .actionbar-status span {
  color: var(--workspace-text);
}

.actionbar-status small,
body:not([data-step="intro"]) .actionbar-status small {
  color: var(--workspace-muted);
}

body[data-step="trial"] .export-docs-card .export-doc-grid article .ghost-button {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-surface);
  color: var(--workspace-text);
}

body[data-step="trial"] .export-docs-card .export-doc-grid article .ghost-button:hover {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-hover);
  color: var(--workspace-text);
}

body[data-step="trial"] .trial-status-board {
  border-color: var(--workspace-border);
  border-left-color: var(--workspace-accent);
  background: var(--workspace-surface);
}

body[data-step="trial"] .trial-status-board h3,
body[data-step="trial"] .export-doc-grid strong {
  color: var(--workspace-text);
}

body[data-step="trial"] .trial-status-board p:last-child,
body[data-step="trial"] .export-doc-grid p {
  color: var(--workspace-muted);
}

body[data-step="trial"] .export-doc-grid,
body[data-step="trial"] .export-doc-grid article {
  border-color: var(--workspace-border);
}

.export-file-index,
body[data-step="trial"] .block-title h3 .trial-phase-number {
  border-color: var(--workspace-border-strong);
  background: var(--workspace-subtle);
  color: var(--workspace-text);
}

body[data-step="trial"] .dispatch-card {
  background: var(--workspace-surface);
}

@media (max-width: 900px) {
  body,
  body:not([data-step="intro"]) {
    background: var(--workspace-bg);
    background-image: none !important;
  }

  .app-shell,
  body:not([data-step="intro"]) .app-shell {
    padding: 8px 10px 18px;
  }

  body[data-step="intro"] .intro-stage {
    background: var(--workspace-surface);
  }

  .workflow-progress,
  body:not([data-step="intro"]) .workflow-progress {
    top: 62px;
  }

  .workflow-progress-item,
  body:not([data-step="intro"]) .workflow-progress-item {
    min-height: 52px;
    padding: 6px 8px;
  }

  .workbench-actionbar,
  body:not([data-step="intro"]) .workbench-actionbar {
    border-radius: 12px;
  }
}

/* Final visual precedence for the simplified cover and its matching workbench. */
body[data-step="intro"] .app-shell {
  width: min(1560px, 100%);
  padding: 0 38px;
}

body[data-step="intro"] .topbar {
  display: none;
}

body[data-step="intro"] .flow-main {
  min-height: 100svh;
}

body[data-step="intro"] .intro-stage {
  display: grid;
  grid-template-columns: minmax(520px, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 64px;
  width: 100%;
  max-width: 1460px;
  min-height: 100svh;
  margin: 0 auto;
  padding: 52px 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body[data-step="intro"] .intro-copy {
  align-self: center;
  max-width: 600px;
  padding-left: clamp(0px, 3vw, 42px);
}

body[data-step="intro"] .intro-copy h1 {
  max-width: 590px;
  margin: 0;
  color: var(--workspace-text);
  font-size: 54px;
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: 0;
}

body[data-step="intro"] .intro-copy h1 span {
  display: block;
  color: var(--workspace-accent);
}

@media (min-width: 1101px) {
  body[data-step="intro"] .intro-copy h1 span {
    font-size: 48px;
    white-space: nowrap;
  }
}

body[data-step="intro"] .intro-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
}

body[data-step="intro"] .intro-button,
body[data-step="intro"] .intro-new-button {
  min-width: 118px;
  min-height: 46px;
  margin: 0;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  box-shadow: none;
}

body[data-step="intro"] .intro-button {
  border-color: var(--workspace-primary);
  background: var(--workspace-primary);
  color: #fff;
}

body[data-step="intro"] .intro-new-button {
  border-color: var(--workspace-border-strong);
  background: #fff;
  color: var(--workspace-text);
}

body[data-step="intro"] .intro-draft-hint {
  display: none !important;
}

body[data-step="intro"] .machine-figure {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 4 / 3;
  margin: 0;
  align-self: center;
  justify-self: end;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-step="intro"] .machine-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none;
}

body:not([data-step="intro"]) {
  background: #fff;
  background-image: none !important;
}

body:not([data-step="intro"]) .app-shell {
  width: min(1500px, 100%);
  padding: 0 24px 24px;
}

body:not([data-step="intro"]) .topbar {
  padding: 12px 0;
  border-bottom: 1px solid var(--workspace-border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

body:not([data-step="intro"]) .topbar::before {
  display: none;
}

body:not([data-step="intro"]) .topbar .brand-mark {
  border-color: #f0c5aa;
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
}

body:not([data-step="intro"]) .workflow-progress {
  top: 65px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--workspace-border);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.97);
}

body:not([data-step="intro"]) .workflow-progress-item {
  min-height: 54px;
  border-right: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
}

body:not([data-step="intro"]) .workflow-progress-item.active {
  border-bottom-color: var(--workspace-accent);
  background: var(--workspace-accent-soft);
  color: var(--workspace-text);
  box-shadow: none;
}

body:not([data-step="intro"]) .workflow-progress-item.active > span,
body:not([data-step="intro"]) .workflow-progress-item.active > span:first-child {
  border-color: var(--workspace-accent);
  background: var(--workspace-accent);
  color: #fff;
}

body:not([data-step="intro"]) .workflow-progress-item.complete {
  color: #287957;
}

body:not([data-step="intro"]) .workflow-progress-item.complete > span {
  border-color: #b8d8c8;
  background: #eef8f2;
  color: #287957;
}

body:not([data-step="intro"]) .workbench-grid {
  gap: 22px;
  padding-top: 24px;
}

body:not([data-step="intro"]) .workbench-stage-area .stage-copy .eyebrow,
body:not([data-step="intro"]) .panel-kicker {
  color: var(--workspace-accent);
}

body:not([data-step="intro"]) .workbench-stage-area .stage-copy h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

body:not([data-step="intro"]) .command-stage::before,
body:not([data-step="intro"]) .fit-stage::before,
body:not([data-step="intro"]) .choose-stage::before,
body:not([data-step="intro"]) .recipe-stage::before,
body:not([data-step="intro"]) .program-stage::before,
body:not([data-step="intro"]) .trial-stage::before {
  display: none;
}

body:not([data-step="intro"]) .command-panel,
body:not([data-step="intro"]) .judgement-board,
body:not([data-step="intro"]) .match-panel,
body:not([data-step="intro"]) .result-panel,
body:not([data-step="intro"]) .program-card,
body:not([data-step="intro"]) .trial-status-board,
body:not([data-step="intro"]) .sop-card,
body:not([data-step="intro"]) .liquid-plan-panel,
body:not([data-step="intro"]) .export-docs-card,
body:not([data-step="intro"]) .context-sidebar,
body:not([data-step="intro"]) .workbench-actionbar {
  border-color: var(--workspace-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

body:not([data-step="intro"]) textarea,
body:not([data-step="intro"]) select,
body:not([data-step="intro"]) input[type="text"],
body:not([data-step="intro"]) input[type="number"],
body:not([data-step="intro"]) .box-select {
  border-color: var(--workspace-border-strong);
  border-radius: 8px;
  background: var(--workspace-subtle);
}

body:not([data-step="intro"]) textarea:focus,
body:not([data-step="intro"]) select:focus,
body:not([data-step="intro"]) input[type="text"]:focus,
body:not([data-step="intro"]) input[type="number"]:focus {
  border-color: var(--workspace-accent);
  box-shadow: 0 0 0 3px rgba(216, 93, 32, 0.12);
}

body:not([data-step="intro"]) .context-toggle {
  border-bottom-color: var(--workspace-border);
  background: var(--workspace-subtle);
}

body:not([data-step="intro"]) .thinking-step.active,
body:not([data-step="intro"]) .match-item.featured,
body:not([data-step="intro"]) .match-item.selected {
  border-color: #edb18f;
  background: var(--workspace-accent-soft);
}

body:not([data-step="intro"]) .match-item b,
body:not([data-step="intro"]) .technique-brief-head span,
body:not([data-step="intro"]) .tag-line strong,
body:not([data-step="intro"]) .capability-item strong {
  border-color: #f0c5aa;
  background: var(--workspace-accent-soft);
  color: var(--workspace-accent);
}

body:not([data-step="intro"]) .workbench-actionbar {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(32, 33, 35, 0.08);
}

.ingredient-assessment-panel {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid var(--workspace-border);
  border-radius: 8px;
  background: #fff;
}

.ingredient-assessment-panel.is-ready {
  border-color: #badccc;
  background: #f8fcfa;
}

.ingredient-assessment-panel.needs-supplement {
  border-color: #edb18f;
  background: #fffaf6;
}

.ingredient-assessment-panel.is-rejected {
  border-color: #e9b3ad;
  background: #fff8f7;
}

.candidate-recovery-panel.needs-user-input {
  border-color: #e6a17b;
  background: #fffaf6;
}

.candidate-recovery-panel.retry-available {
  border-color: #d8d2ca;
  background: #fbfaf8;
}

.candidate-recovery-prompt {
  margin: 14px 0 0;
  color: var(--workspace-text);
  line-height: 1.7;
}

.candidate-recovery-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.candidate-recovery-fields span {
  padding: 6px 9px;
  border: 1px solid #e8c5ae;
  border-radius: 6px;
  background: #fff;
  color: #7d4d32;
  font-size: 12px;
  font-weight: 600;
}

.candidate-recovery-reasons {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #8a4a32;
  font-size: 13px;
  line-height: 1.65;
}

.candidate-recovery-input-wrap {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--workspace-text);
  font-size: 13px;
  font-weight: 600;
}

.candidate-recovery-input-wrap textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--workspace-border-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--workspace-text);
  font: inherit;
  line-height: 1.6;
}

.candidate-recovery-input-wrap textarea:focus {
  border-color: var(--workspace-accent);
  outline: 2px solid rgba(216, 87, 29, 0.12);
}

.candidate-recovery-example {
  margin: 8px 0 0;
  color: var(--workspace-muted);
  font-size: 12px;
  line-height: 1.6;
}

.candidate-recovery-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.candidate-recovery-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--workspace-border-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--workspace-text);
  font-weight: 600;
}

.candidate-recovery-actions button.primary {
  border-color: var(--workspace-accent);
  background: var(--workspace-accent);
  color: #fff;
}

.candidate-recovery-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ingredient-assessment-head,
.assessment-actions,
.supplement-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ingredient-assessment-head h3 {
  margin: 3px 0 0;
  font-size: 17px;
}

.assessment-status {
  padding: 5px 9px;
  border: 1px solid currentColor;
  border-radius: 6px;
  color: #5d6c66;
  font-size: 12px;
  font-weight: 600;
}

.needs-supplement .assessment-status {
  color: var(--workspace-accent);
}

.is-ready .assessment-status {
  color: #287957;
}

.is-rejected .assessment-status {
  color: #b4493f;
}

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

.ingredient-inventory-grid section {
  padding: 14px;
  border: 1px solid var(--workspace-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.ingredient-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.ingredient-chip-list span {
  padding: 4px 8px;
  border-radius: 5px;
  background: #f1f4f2;
  color: #3d4843;
  font-size: 12px;
}

.ingredient-chip-list.pantry span {
  background: #f7f3ee;
  color: #71645b;
}

.supplement-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.supplement-suggestion {
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #edc8af;
  border-radius: 8px;
  background: #fff;
}

.supplement-suggestion p,
.assessment-note {
  margin: 5px 0 0;
  color: var(--workspace-muted);
  font-size: 13px;
  line-height: 1.55;
}

.supplement-suggestion small {
  color: var(--workspace-muted);
  text-align: right;
}

.assessment-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

.assessment-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--workspace-border-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--workspace-text);
  font-weight: 600;
}

.assessment-actions button.primary {
  border-color: var(--workspace-accent);
  background: var(--workspace-accent);
  color: #fff;
}

.assessment-reasons {
  margin: 16px 0 0;
  padding-left: 20px;
  color: #9e4038;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  body[data-step="intro"] .intro-stage {
    grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
    gap: 36px;
  }

  body[data-step="intro"] .intro-copy h1 {
    font-size: 48px;
  }
}

@media (max-width: 900px) {
  body[data-step="intro"] .app-shell {
    padding: 0 22px;
  }

  body[data-step="intro"] .intro-stage {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding: 64px 0 44px;
  }

  body[data-step="intro"] .intro-copy {
    max-width: 680px;
    padding-left: 0;
  }

  body[data-step="intro"] .intro-copy h1 {
    max-width: 620px;
    font-size: 40px;
  }

  body[data-step="intro"] .machine-figure {
    max-width: 760px;
    justify-self: center;
  }

  body:not([data-step="intro"]) .app-shell {
    padding: 0 12px 18px;
  }
}

@media (max-width: 600px) {
  .ingredient-assessment-panel {
    padding: 16px;
  }

  .ingredient-inventory-grid {
    grid-template-columns: 1fr;
  }

  .supplement-suggestion,
  .assessment-actions,
  .candidate-recovery-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .supplement-suggestion small {
    text-align: left;
  }

  .assessment-actions button,
  .candidate-recovery-actions button {
    width: 100%;
  }

  body[data-step="intro"] .app-shell {
    padding: 0 16px;
  }

  body[data-step="intro"] .intro-stage {
    gap: 28px;
    padding: 46px 0 32px;
  }

  body[data-step="intro"] .intro-copy h1 {
    font-size: 34px;
  }

  body[data-step="intro"] .intro-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 26px;
  }

  body[data-step="intro"] .intro-button,
  body[data-step="intro"] .intro-new-button {
    width: 100%;
  }
}
