:root {
  --demo-ink: #102033;
  --demo-muted: #65758a;
  --demo-mint: #0b7f74;
  --demo-mint-strong: #08655d;
  --demo-mint-light: #75e1d0;
  --demo-mint-soft: #e9f8f5;
  --demo-line: #d9e2ec;
  --demo-panel: #ffffff;
  --demo-canvas: #f4f7fa;
  --demo-warning: #b45309;
}

* { box-sizing: border-box; }

.demo-sandbox-body {
  margin: 0;
  overflow: hidden;
  background: #e8edf2;
  color: var(--demo-ink);
}

.demo-app { height: 100vh; min-height: 620px; }

.demo-app-header {
  display: grid;
  height: 64px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid #273549;
  background: #111827;
  color: #fff;
}

.demo-app-brand { display: flex; align-items: center; gap: 10px; }
.demo-app-brand > span,
.rail-logo {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: var(--demo-mint-light);
  color: #073b34;
  font-weight: 900;
}
.demo-app-brand strong { font-size: 1.05rem; }
.demo-app-brand em {
  padding: .28rem .48rem;
  border: 1px solid rgba(117, 225, 208, .35);
  border-radius: 999px;
  color: var(--demo-mint-light);
  font-size: .62rem;
  font-style: normal;
  font-weight: 800;
}
.demo-app-context { text-align: center; }
.demo-app-context small,
.demo-app-context b { display: block; }
.demo-app-context small { color: #8998aa; font-size: .58rem; letter-spacing: .12em; }
.demo-app-context b { margin-top: .2rem; font-size: .78rem; }
.demo-exit {
  justify-self: end;
  padding: .5rem .7rem;
  border: 1px solid #435166;
  border-radius: 8px;
  color: #e7edf4;
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
}
.demo-exit:hover { border-color: var(--demo-mint-light); color: var(--demo-mint-light); }

.demo-app-layout { display: grid; height: calc(100vh - 64px); grid-template-columns: 76px 1fr; }
.demo-app-rail {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 27px;
  padding: 16px 7px;
  background: #172033;
  color: #91a0b2;
}
.rail-logo { margin-bottom: 5px; }
.rail-item { font-size: .58rem; font-weight: 800; writing-mode: vertical-rl; rotate: 180deg; }
.rail-item.active { color: var(--demo-mint-light); }
.demo-app-main { min-width: 0; overflow: hidden; }

.demo-flow {
  display: grid;
  height: 70px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  padding: 0 3vw;
  border-bottom: 1px solid var(--demo-line);
  background: #fff;
}
.demo-flow button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 0;
  background: transparent;
  color: #8190a2;
  font: inherit;
  font-size: .65rem;
  font-weight: 760;
}
.demo-flow button::after {
  content: "";
  position: absolute;
  left: 68%;
  width: 64%;
  height: 1px;
  background: #dae2e9;
}
.demo-flow button:last-child::after { display: none; }
.demo-flow i {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e6ebf0;
  color: #64748b;
  font-style: normal;
  font-weight: 850;
}
.demo-flow button.active { color: var(--demo-mint); }
.demo-flow button.active i,
.demo-flow button.done i { background: var(--demo-mint-light); color: #073b34; }
.demo-flow button.done::after { background: var(--demo-mint-light); }
.demo-flow button span { white-space: nowrap; }

.demo-scenes {
  height: calc(100% - 70px);
  overflow: auto;
  overflow-anchor: none;
  padding: clamp(16px, 2vw, 28px) clamp(16px, 3vw, 42px) 170px;
  background: linear-gradient(145deg, #f8fafc, #edf2f6);
  scroll-behavior: smooth;
}
.demo-scene { display: none; max-width: 1320px; margin: 0 auto; }
.demo-scene.active { display: block; animation: demo-in .24s ease; }
@keyframes demo-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.demo-card,
.demo-release-card,
.demo-callout,
.demo-open-checks,
.demo-success-banner,
.demo-finished,
.demo-wizard-shell {
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: var(--demo-panel);
  box-shadow: 0 14px 34px rgba(16, 32, 51, .075);
}

.demo-hero,
.demo-compact-hero,
.demo-builder-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: linear-gradient(110deg, rgba(11, 127, 116, .09), rgba(117, 225, 208, .025) 52%, #fff), #fff;
  box-shadow: 0 14px 34px rgba(16, 32, 51, .075);
}
.demo-hero p,
.demo-compact-hero p,
.demo-builder-title p,
.demo-eyebrow { margin: 0; color: var(--demo-mint); font-size: .68rem; font-weight: 850; letter-spacing: .085em; }
.demo-hero h1,
.demo-compact-hero h1,
.demo-builder-title h1 { margin: .2rem 0; color: #0b1728; font-size: clamp(1.35rem, 2.2vw, 1.9rem); }
.demo-hero span,
.demo-compact-hero span,
.demo-builder-title span { color: var(--demo-muted); font-size: .85rem; }
.demo-hero > b,
.demo-compact-hero > b,
.demo-builder-title > b {
  flex: 0 0 auto;
  padding: .42rem .62rem;
  border-radius: 999px;
  background: var(--demo-mint-soft);
  color: var(--demo-mint);
  font-size: .65rem;
  letter-spacing: .04em;
}

.demo-entry-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; }
.demo-entry-card,
.demo-safety-note,
.demo-spec-card,
.demo-split-card,
.demo-finalize-card,
.demo-test-summary { padding: 1.15rem; }
.demo-field-label { display: flex; justify-content: space-between; margin-bottom: .5rem; font-size: .8rem; font-weight: 800; }
.demo-field-label span { color: var(--demo-mint); }
.demo-entry-card textarea {
  width: 100%;
  min-height: 190px;
  resize: none;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  border-color: #9acfc7;
  background: linear-gradient(135deg, #f3fcfa, #fff);
  color: #142f42;
  font: inherit;
  font-size: 1rem;
  font-weight: 720;
  line-height: 1.6;
  box-shadow: inset 4px 0 0 var(--demo-mint), 0 10px 26px rgba(11, 127, 116, .08);
}
.demo-context { display: flex; align-items: center; gap: .75rem; margin: .9rem 0; padding: .7rem .8rem; border-radius: 8px; background: #f1f5f9; font-size: .75rem; }
.demo-context span { color: #68778a; }
.demo-context small { margin-left: auto; color: var(--demo-mint); }
.demo-safety-note { align-self: start; }
.demo-safety-note h2 { margin: .35rem 0; font-size: 1rem; }
.demo-safety-note p,
.demo-safety-note li { color: var(--demo-muted); font-size: .76rem; line-height: 1.55; }
.demo-safety-note ul { padding-left: 1.1rem; }
.demo-path-preview { display: grid; gap: .55rem; margin: .85rem 0; padding: 0; list-style: none; }
.demo-path-preview li { display: flex; align-items: center; gap: .65rem; color: #42556a; }
.demo-path-preview li b { display: grid; width: 34px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: var(--demo-mint-soft); color: var(--demo-mint); font-size: .68rem; }
.demo-path-preview li span { font-size: .74rem; font-weight: 720; }
.demo-safe-caption { display: block; padding-top: .7rem; border-top: 1px solid #e5ebf0; color: var(--demo-muted); font-size: .66rem; }

.demo-target { position: relative; }
.demo-target::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid #14b8a6;
  border-radius: inherit;
  pointer-events: none;
  animation: demo-pulse 1.7s ease-out infinite;
}
@keyframes demo-pulse { 0%, 30% { opacity: 1; box-shadow: 0 0 0 0 rgba(20, 184, 166, .3); } 100% { opacity: 0; box-shadow: 0 0 0 13px rgba(20, 184, 166, 0); } }

.demo-wizard-shell { display: grid; grid-template-columns: 245px minmax(0, 1fr); min-height: 520px; overflow: hidden; }
.demo-wizard-intro { padding: 1.2rem; background: linear-gradient(155deg, #112031, #172c3f); color: #fff; }
.demo-wizard-intro span { color: var(--demo-mint-light); font-size: .63rem; font-weight: 850; letter-spacing: .1em; }
.demo-wizard-intro strong { display: block; margin-top: .6rem; font-size: 1rem; }
.demo-wizard-intro p { color: #b7c4d2; font-size: .76rem; line-height: 1.55; }
.demo-chat { display: flex; min-width: 0; flex-direction: column; gap: .8rem; padding: 1.2rem; background: #f7fafc; }
.demo-message { max-width: 82%; padding: .75rem .85rem; border-radius: 10px; font-size: .79rem; line-height: 1.5; }
.demo-message.assistant { align-self: flex-start; border: 1px solid #d8e2eb; border-top-left-radius: 3px; background: #fff; color: #35465a; }
.demo-message.user { align-self: flex-end; border-top-right-radius: 3px; background: #dff6f1; color: #164f49; }
.demo-question { margin-top: auto; padding-top: .8rem; border-top: 1px solid #dbe5ed; }
.demo-question-head { display: grid; gap: .55rem; margin-bottom: 1.1rem; padding: 1.05rem 1.15rem; border-left: 5px solid var(--demo-warning); border-radius: 0 10px 10px 0; background: linear-gradient(100deg, #fef8ec, #fff 72%); box-shadow: 0 10px 26px rgba(180, 83, 9, .1); }
.demo-question-head > span { display: inline-flex; align-self: start; align-items: center; gap: .4rem; padding: .32rem .7rem; border-radius: 999px; background: var(--demo-warning); color: #fff; font-size: .62rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.demo-question-head > strong { color: #1a2e1f; font-size: 1.08rem; font-weight: 800; line-height: 1.4; }
.demo-question-head > small { padding-top: .35rem; border-top: 1px dashed #ecd9b8; color: #8a774f; font-size: .68rem; line-height: 1.5; }
.demo-options { display: grid; gap: .62rem; }
.demo-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: .8rem;
  padding: .8rem .86rem;
  border: 1px solid #cfdbe5;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: .76rem;
  line-height: 1.45;
  text-align: left;
  transition: border-color .25s ease, background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.demo-option i { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 2px solid #91a5b6; border-radius: 6px; background: #fff; color: transparent; font-style: normal; font-weight: 900; }
.demo-option.is-selected { border-color: #60cabb; background: var(--demo-mint-soft); color: #155e56; }
.demo-option.is-selected i { border-color: var(--demo-mint); background: var(--demo-mint); color: #fff; }
.demo-option.is-new-selection { animation: demo-option-selected .55s ease both; }
@keyframes demo-option-selected { 0% { transform: scale(.985); box-shadow: 0 0 0 0 rgba(11,127,116,.25); } 55% { transform: scale(1.012); box-shadow: 0 0 0 8px rgba(11,127,116,.1); } 100% { transform: none; box-shadow: 0 8px 20px rgba(11,127,116,.08); } }
.demo-question-actions { display: flex; align-items: center; gap: .55rem; justify-content: flex-end; margin-top: .85rem; }
.demo-question.is-entering { animation: demo-question-enter .48s ease both; }
.demo-question.is-applying { opacity: .62; transform: scale(.992); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
@keyframes demo-question-enter { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.demo-decision-progress { display: grid; grid-template-columns: repeat(8, 1fr); gap: .38rem; margin-bottom: .75rem; }
.demo-decision-progress span { display: grid; height: 24px; place-items: center; border: 1px solid #d8e2e9; border-radius: 999px; background: #f8fafc; color: #8493a3; font-size: .59rem; font-weight: 850; }
.demo-decision-progress span.is-current { border-color: #5dc9b9; background: #e9f8f5; color: #0b6d63; box-shadow: 0 0 0 3px rgba(11,127,116,.08); }
.demo-decision-progress span.is-complete { border-color: #94d7cd; background: var(--demo-mint); color: #fff; }
.demo-decision-applied { display: grid; gap: .2rem; margin-bottom: .75rem; padding: .7rem .8rem; border: 1px solid #a7e2d6; border-radius: 8px; background: linear-gradient(100deg, #effaf7, #fff); animation: demo-decision-applied .6s ease both; }
.demo-decision-applied span { color: var(--demo-mint); font-size: .58rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.demo-decision-applied strong { color: #25483f; font-size: .7rem; }
.demo-decision-applied small { color: #62786f; font-size: .63rem; line-height: 1.4; }
@keyframes demo-decision-applied { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.demo-custom-answer { display: flex; align-items: center; gap: .6rem; padding: .7rem; border: 1px solid #60cabb; border-radius: 8px; background: var(--demo-mint-soft); }
.demo-custom-answer span { color: var(--demo-muted); font-size: .72rem; }
.demo-custom-answer strong { color: #155e56; }

.demo-wizard-original { overflow: hidden; border: 1px solid var(--demo-line); border-radius: 10px; background: #f8fafb; box-shadow: 0 14px 34px rgba(16, 32, 51, .075); }
.demo-wizard-modebar { display: grid; grid-template-columns: minmax(170px, .65fr) repeat(2, minmax(240px, 1fr)); gap: .55rem; align-items: stretch; padding: .75rem; border-bottom: 1px solid #dce5eb; background: #fff; }
.demo-wizard-modebar > div,
.demo-wizard-modebar > button { display: flex; min-width: 0; justify-content: center; flex-direction: column; padding: .65rem .75rem; border: 1px solid #dce5eb; border-radius: 8px; background: #fbfdff; color: #32465a; text-align: left; }
.demo-wizard-modebar > div { border: 0; background: transparent; }
.demo-wizard-modebar > div small { color: var(--demo-mint); font-size: .56rem; font-weight: 850; letter-spacing: .08em; }
.demo-wizard-modebar > div strong { margin-top: .15rem; font-size: .78rem; }
.demo-wizard-modebar button span { font-size: .72rem; font-weight: 820; }
.demo-wizard-modebar button small { margin-top: .15rem; color: var(--demo-muted); font-size: .6rem; line-height: 1.35; }
.demo-wizard-modebar button.is-active { border-color: #8bd9ce; background: #effaf7; box-shadow: inset 0 0 0 1px rgba(11, 127, 116, .08); }
.demo-wizard-toolbar,
.demo-wizard-context { display: flex; align-items: center; gap: .65rem; margin: .7rem .75rem 0; padding: .65rem .75rem; border: 1px solid #dce5eb; border-radius: 8px; background: #fff; }
.demo-wizard-toolbar > span,
.demo-wizard-context > span { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: var(--demo-mint); color: #fff; font-weight: 900; }
.demo-wizard-toolbar > div,
.demo-wizard-context > div { flex: 1; }
.demo-wizard-toolbar strong,
.demo-wizard-toolbar small,
.demo-wizard-context strong,
.demo-wizard-context small { display: block; }
.demo-wizard-toolbar strong,
.demo-wizard-context strong { color: #30465a; font-size: .72rem; }
.demo-wizard-toolbar small,
.demo-wizard-context small { margin-top: .12rem; color: var(--demo-muted); font-size: .6rem; }
.demo-wizard-toolbar button,
.demo-wizard-context button { padding: .42rem .55rem; border: 1px solid #d4dfe7; border-radius: 7px; background: #fff; color: #496074; font: inherit; font-size: .6rem; font-weight: 750; }
.demo-wizard-toolbar button:nth-last-child(2) { border-color: #78cfc2; background: var(--demo-mint); color: #fff; }
.demo-wizard-original .demo-chat { display: block; min-height: 330px; margin: .7rem .75rem 0; padding: 1rem; border: 1px solid #dce5eb; border-radius: 8px; background: #fff; }
.demo-wizard-original .demo-question { margin: 0; padding: 0; border: 0; }
.demo-wizard-original .demo-options { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: .65rem; }
.demo-wizard-original .demo-option { min-height: 72px; padding: .75rem; font-size: .69rem; line-height: 1.4; }
.demo-wizard-original .demo-option > span { flex: 1; }
.demo-wizard-original .demo-option > b { margin-left: auto; color: #94a3b8; font-size: .9rem; }
.demo-wizard-original .demo-custom-option { grid-column: 1 / -1; min-height: 38px; }
.demo-wizard-original .demo-question-actions { align-items: center; justify-content: flex-start; padding-top: .75rem; border-top: 1px solid #e7edf2; }
.demo-selected-count { color: var(--demo-muted); font-size: .63rem; }
.demo-clear-selection { padding: .42rem .55rem; border: 1px solid #dce5eb; border-radius: 6px; background: #fff; color: #64748b; font: inherit; font-size: .6rem; }
.demo-wizard-original .demo-custom-answer { margin-top: .55rem; padding: .55rem .65rem; }
.demo-wizard-composer-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: .7rem .75rem 0; }
.demo-wizard-composer-head > div { padding: .55rem .65rem; border: 1px solid #dce5eb; border-radius: 7px; background: #fff; }
.demo-wizard-composer-head strong,
.demo-wizard-composer-head small { display: block; }
.demo-wizard-composer-head strong { color: #40566a; font-size: .63rem; }
.demo-wizard-composer-head small { margin-top: .12rem; color: var(--demo-muted); font-size: .56rem; line-height: 1.35; }
.demo-wizard-composer { margin: .55rem .75rem 0; padding: .65rem; border: 1px solid #dce5eb; border-radius: 8px; background: #fff; }
.demo-wizard-composer textarea { width: 100%; min-height: 80px; resize: none; border: 0; background: transparent; color: #607184; font: inherit; font-size: .68rem; outline: 0; }
.demo-wizard-composer small { display: block; color: #6b7e8f; font-size: .56rem; text-align: right; }
.demo-wizard-bottom { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: .45rem; align-items: center; margin-top: .65rem; padding: .6rem .75rem; border-top: 1px solid #dce5eb; background: #fff; }
.demo-wizard-bottom button { padding: .55rem .65rem; border: 1px solid #d9e3ea; border-radius: 7px; background: #fff; color: #506579; font: inherit; font-size: .6rem; font-weight: 750; }
.demo-wizard-bottom button:first-child { border-color: var(--demo-mint); background: var(--demo-mint); color: #fff; }

.demo-summary-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 1rem; }
.demo-spec-card h2,
.demo-split-card h2 { margin: .32rem 0 1rem; font-size: 1.1rem; }
.demo-spec-card p,
.demo-split-card p { color: #526276; line-height: 1.6; }
.demo-recommendation { display: flex; align-items: center; gap: .65rem; margin: 1rem 0; padding: .7rem; border: 1px solid #a7e2d6; border-radius: 8px; background: #effaf7; }
.demo-recommendation > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--demo-mint); color: #fff; }
.demo-recommendation strong,
.demo-recommendation small { display: block; }
.demo-recommendation small { margin-top: .1rem; color: var(--demo-muted); }

.demo-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.demo-kpi { padding: 1rem; border: 1px solid var(--demo-line); border-radius: 9px; background: #fff; box-shadow: 0 10px 26px rgba(16, 32, 51, .06); }
.demo-kpi span,
.demo-kpi strong,
.demo-kpi small { display: block; }
.demo-kpi span { color: var(--demo-muted); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.demo-kpi strong { margin: .35rem 0; color: #19344e; font-size: 1.7rem; }
.demo-kpi small { color: #71849a; font-size: .72rem; }
.demo-callout,
.demo-success-banner,
.demo-finished { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding: 1rem; }
.demo-callout div,
.demo-success-banner div,
.demo-finished div { flex: 1; }
.demo-callout strong,
.demo-callout p,
.demo-success-banner strong,
.demo-success-banner p,
.demo-finished strong,
.demo-finished p { display: block; margin: 0; }
.demo-callout p,
.demo-success-banner p,
.demo-finished p { margin-top: .2rem; color: var(--demo-muted); font-size: .76rem; }

.demo-release-card { display: grid; grid-template-columns: 145px minmax(260px, .9fr) minmax(420px, 1.4fr); gap: 1rem; align-items: center; padding: 1.1rem; }
.demo-release-card.is-open { border-left: 4px solid #f59e0b; }
.demo-release-card.is-ready { border-left: 4px solid var(--demo-mint); background: linear-gradient(110deg, #f0fdf9, #fff 48%); }
.demo-release-score { display: grid; place-items: center; align-content: center; width: 116px; height: 116px; border: 10px solid #e4eaf0; border-radius: 50%; background: #fff; }
.is-open .demo-release-score { border-color: #fde7b5; }
.is-ready .demo-release-score { border-color: #a7e2d6; }
.demo-release-score span { color: #17324d; font-size: 2rem; font-weight: 900; line-height: 1; }
.demo-release-score span::after { content: "%"; font-size: .8rem; }
.demo-release-score small { margin-top: .3rem; color: var(--demo-muted); font-size: .65rem; }
.demo-release-copy h2 { margin: .35rem 0; font-size: 1.05rem; }
.demo-release-copy p { margin: 0; color: var(--demo-muted); font-size: .76rem; line-height: 1.5; }
.demo-status { display: inline-flex; padding: .28rem .52rem; border-radius: 999px; font-size: .65rem; font-weight: 850; }
.demo-status.warning { background: #fff7ed; color: #9a3412; }
.demo-status.success { background: #dcfce7; color: #166534; }
.demo-release-components { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.demo-release-components > div { padding: .7rem; border: 1px solid #dce6f0; border-radius: 8px; background: rgba(255, 255, 255, .85); }
.demo-release-components span,
.demo-release-components strong,
.demo-release-components small { display: block; }
.demo-release-components span { color: var(--demo-muted); font-size: .61rem; font-weight: 830; text-transform: uppercase; }
.demo-release-components strong { margin: .22rem 0; color: #18334f; font-size: .98rem; }
.demo-release-components small { color: #71849a; font-size: .68rem; }
.demo-open-checks { margin-top: .8rem; overflow: hidden; }
.demo-open-checks summary { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; color: #334155; font-size: .78rem; font-weight: 800; cursor: pointer; }
.demo-open-checks summary b { padding: .25rem .45rem; border-radius: 999px; background: #fff7ed; color: #9a3412; font-size: .63rem; }
.demo-open-checks ul { margin: 0; padding: 0 2rem 1rem; color: var(--demo-muted); font-size: .75rem; line-height: 1.6; }
.demo-scene-action,
.demo-builder-footer { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; margin-top: 1rem; color: var(--demo-muted); font-size: .76rem; }
.demo-scene-hint { color: var(--demo-mint); font-weight: 700; animation: demo-hint-fade .4s ease both; }
.demo-scene-hint[hidden] { display: none; }
@keyframes demo-hint-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.demo-and-callout {
  position: absolute;
  z-index: 90;
  transform: translate(-50%, -4px);
  width: min(300px, calc(100% - 32px));
  padding: .65rem .8rem;
  border: 1px solid #f4d597;
  border-radius: 10px;
  background: #fffbeb;
  box-shadow: 0 16px 40px rgba(16, 32, 51, .18);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.demo-and-callout[hidden] { display: none; }
.demo-and-callout.is-visible { opacity: 1; transform: translate(-50%, 0); }
.demo-and-callout::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, 0) rotate(45deg);
  background: #fffbeb;
  border-left: 1px solid #f4d597;
  border-top: 1px solid #f4d597;
}
.demo-and-callout b { display: block; margin-bottom: .2rem; color: #9a3412; font-size: .64rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.demo-and-callout p { margin: 0; color: #7c2d12; font-size: .74rem; line-height: 1.45; }

.demo-change-callout {
  position: absolute;
  z-index: 110;
  transform: translate(-50%, -4px);
  width: min(380px, calc(100% - 32px));
  padding: .85rem 1rem;
  border: 2px solid #43bbaa;
  border-radius: 12px;
  background: #f0fdfa;
  box-shadow: 0 22px 58px rgba(8, 84, 75, .3), 0 0 0 8px rgba(67, 187, 170, .11);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.demo-change-callout[hidden] { display: none; }
.demo-change-callout.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  animation: demo-change-callout-focus 1.8s ease-in-out infinite;
}
.demo-change-callout::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, 0) rotate(45deg);
  background: #effaf7;
  border-left: 1px solid #a7e2d6;
  border-top: 1px solid #a7e2d6;
}
.demo-change-callout b { display: block; margin-bottom: .28rem; color: #087066; font-size: .7rem; font-weight: 900; letter-spacing: .065em; text-transform: uppercase; }
.demo-change-callout p { margin: 0; color: #134e4a; font-size: .8rem; font-weight: 680; line-height: 1.5; }
@keyframes demo-change-callout-focus {
  0%, 100% { box-shadow: 0 22px 58px rgba(8, 84, 75, .28), 0 0 0 7px rgba(67, 187, 170, .1); }
  50% { box-shadow: 0 25px 65px rgba(8, 84, 75, .36), 0 0 0 13px rgba(67, 187, 170, .16); }
}

.demo-quality-recap { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed #cddce9; }
.demo-quality-recap span { display: flex; align-items: center; gap: .4rem; color: #1f374d; font-size: .74rem; font-weight: 650; }
.demo-quality-recap span > i { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #dcfce7; color: #166534; font-size: .6rem; font-style: normal; font-weight: 900; }
.demo-quality-recap span b { color: #0b7f74; font-weight: 800; }

.demo-builder { min-height: 550px; border: 1px solid #cdd8e2; border-radius: 9px; background: #fff; box-shadow: 0 14px 34px rgba(16, 32, 51, .08); }
.demo-builder header {
  position: sticky !important;
  z-index: 72;
  top: 0;
  overflow-x: auto;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 32, 51, .1);
}
.demo-builder header .nav-actions,
.demo-builder header .zoom-controls { min-width: max-content; flex-wrap: nowrap; }
.demo-builder button:disabled,
.demo-builder input:disabled,
.demo-builder .block { cursor: default !important; opacity: .48; pointer-events: none; }
.demo-builder #inlineViewBtn { opacity: 1 !important; pointer-events: auto !important; }
.demo-builder #inlineViewBtn.demo-target { overflow: visible; }
.demo-builder .xcontainer { height: 470px; }
.demo-builder .canvas-wrapper,
.demo-builder .tree-wrapper { height: 100%; }
.demo-builder .canvas-content { min-height: 100%; padding: 2rem; }
.demo-builder .condition-block,
.demo-builder .item { pointer-events: none; }
.demo-builder .item.sequence,
.demo-builder .item.typed-action {
  border-color: #475569 !important;
  background: #64748b !important;
  color: #fff !important;
}
.demo-builder .tree-container { height: 100%; background-color: #f8fafc; background-image: radial-gradient(#d6dee7 1px, transparent 1px); background-size: 20px 20px; }
.demo-builder svg { width: 100%; height: 100%; }
.demo-builder .quality-warning-empty-branch { background: rgba(254, 226, 226, .42); }
.demo-builder .demo-unclear {
  border-color: #dc2626 !important;
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22);
}
.demo-builder .demo-unclear::after {
  content: "Review";
  position: absolute;
  top: -10px;
  right: -8px;
  padding: 2px 7px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff1f2;
  color: #991b1b;
  font-size: 10px;
  font-weight: 800;
}
.demo-builder .demo-new-node { animation: demo-new-node-flash 2.4s ease both; outline-offset: 2px; }
.demo-builder .demo-focus-node { position: relative; z-index: 2; }
.demo-builder .demo-focus-node.is-focused-change { animation: demo-builder-focus 2.2s ease both; }
.demo-builder .demo-focus-node.is-changing-out { animation: demo-builder-out .7s ease both; }
.demo-builder .demo-non-atomic > .condition-label { background: #fff2c7 !important; color: #713f12 !important; box-shadow: inset 0 -3px 0 #f59e0b; }
.demo-builder .demo-non-atomic > .condition-label::after { content: "AND"; display: inline-flex; margin-left: .55rem; padding: .18rem .4rem; border-radius: 999px; background: #f59e0b; color: #fff; font-size: .62rem; font-weight: 900; }
.demo-builder .demo-open-path > .condition-label { background: #fff7ed !important; color: #7c2d12 !important; box-shadow: inset 0 -3px 0 #ea580c; }
.demo-builder .demo-resolved-path > .condition-label { background: #ecfdf5 !important; color: #065f46 !important; box-shadow: inset 0 -3px 0 #10b981; }
.demo-builder .demo-resolved-action { animation: demo-resolved-action 1.6s ease both; }
.demo-builder .demo-typewriter-outcome {
  min-height: 35px;
  text-align: left;
}
.demo-builder .demo-typewriter-outcome.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -.12em;
  background: #fff;
  animation: demo-typewriter-caret .62s steps(1) infinite;
}
.demo-builder .branch.demo-branch-filling {
  position: relative;
  z-index: 4;
  animation: demo-branch-insert 1.1s ease-in-out infinite alternate;
}
.demo-builder .branch.demo-branch-filled {
  animation: demo-branch-complete 1.8s ease both;
}
@keyframes demo-typewriter-caret { 50% { opacity: 0; } }
@keyframes demo-branch-insert {
  from { box-shadow: inset 0 0 0 2px rgba(245, 158, 11, .55), 0 0 0 2px rgba(245, 158, 11, .08); }
  to { box-shadow: inset 0 0 0 3px rgba(20, 184, 166, .75), 0 0 0 10px rgba(20, 184, 166, .12); }
}
@keyframes demo-branch-complete {
  0% { box-shadow: inset 0 0 0 3px rgba(20, 184, 166, .8), 0 0 0 12px rgba(20, 184, 166, .16); }
  100% { box-shadow: none; }
}
@keyframes demo-new-node-flash {
  0% { outline: 3px solid rgba(20, 184, 166, .55); }
  60% { outline: 3px solid rgba(20, 184, 166, .3); }
  100% { outline: 3px solid rgba(20, 184, 166, 0); }
}
@keyframes demo-builder-focus { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,.34); } 30% { box-shadow: 0 0 0 14px rgba(245,158,11,.14); } 100% { box-shadow: 0 0 0 5px rgba(20,184,166,.1); } }
@keyframes demo-builder-out { to { opacity: .25; filter: saturate(.4); transform: scale(.98); } }
@keyframes demo-resolved-action {
  0% { opacity: 0; transform: translateY(-12px); background: #fef3c7; color: #78350f; }
  55% { opacity: 1; transform: none; background: #d1fae5; color: #065f46; }
  100% { background: inherit; color: inherit; }
}
.demo-builder-tree-link { fill: none; stroke: #94a3b8; stroke-width: 2; }
.demo-builder-tree-link-yes { stroke: #0f9f6e; }
.demo-builder-tree-link-no { stroke: #dc2626; }
.demo-builder-tree-branch { font-size: 11px; font-weight: 800; fill: #64748b; }
.demo-builder-tree-branch-yes { fill: #0f9f6e; }
.demo-builder-tree-branch-no { fill: #dc2626; }
.demo-builder-tree-node rect { stroke-width: 1.5; }
.demo-builder-tree-node.condition rect { fill: #eba739; stroke: #c67619; }
.demo-builder-tree-node.action rect { fill: #64748b; stroke: #475569; }
.demo-builder-tree-node.unclear rect { fill: #dc2626; stroke: #b91c1c; }
.demo-builder-tree-node text { font-size: 12px; font-weight: 700; fill: #263548; }
.demo-builder-tree-node.condition text,
.demo-builder-tree-node.action text,
.demo-builder-tree-node.unclear text { fill: #ffffff; }
.hidden { display: none !important; }

.demo-modal-backdrop { position: fixed; z-index: 900; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(5, 14, 25, .62); backdrop-filter: blur(3px); }
.demo-modal-backdrop[hidden] { display: none; }
.demo-modal { width: min(520px, 100%); padding: 1.25rem; border: 1px solid #a7e2d6; border-radius: 12px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.demo-modal h2 { margin: .35rem 0; font-size: 1.2rem; }
.demo-modal p { color: var(--demo-muted); font-size: .8rem; line-height: 1.55; }
.demo-modal-example { margin: .8rem 0 1rem; padding: .75rem; border: 1px solid #fed7aa; border-radius: 8px; background: #fff7ed; color: #7c2d12; font-size: .8rem; }
.demo-modal-notice { margin-top: .75rem; padding: .65rem .75rem; border: 1px solid #f4d597; border-radius: 8px; background: #fffbeb; color: #854d0e; font-size: .76rem; font-weight: 780; }
.demo-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid #e5eaf0; }
.demo-modal-actions .btn:disabled { cursor: not-allowed; opacity: .48; }

.demo-success-banner { border-color: #a7e2d6; background: #effaf7; }
.demo-success-banner > span,
.demo-finished > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--demo-mint); color: #fff; }

.demo-derivation-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr) auto) minmax(0, 1fr);
  align-items: stretch;
  gap: .55rem;
}
.demo-derivation-flow > article {
  display: flex;
  min-width: 0;
  gap: .7rem;
  padding: .9rem;
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(16, 32, 51, .06);
}
.demo-derivation-flow > article > span {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--demo-mint-soft);
  color: var(--demo-mint);
  font-size: .65rem;
  font-weight: 900;
}
.demo-derivation-flow article small,
.demo-derivation-flow article strong,
.demo-derivation-flow article p { display: block; }
.demo-derivation-flow article small { color: var(--demo-mint); font-size: .57rem; font-weight: 850; letter-spacing: .065em; }
.demo-derivation-flow article strong { margin-top: .2rem; color: #20384f; font-size: .78rem; }
.demo-derivation-flow article p { margin: .28rem 0 0; color: var(--demo-muted); font-size: .68rem; line-height: 1.45; }
.demo-derivation-flow > i { display: grid; place-items: center; color: #78a9a2; font-size: 1.1rem; font-style: normal; }
.demo-derivation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .8rem; }
.demo-mapping-card,
.demo-proof-card { padding: 1rem; }
.demo-mapping-card h2,
.demo-proof-card h2 { margin: .3rem 0 .75rem; font-size: 1rem; }
.demo-mapping-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(120px, .65fr); gap: .65rem; align-items: center; padding: .58rem 0; border-top: 1px solid #e6edf2; font-size: .73rem; }
.demo-mapping-row > b { display: grid; width: 28px; height: 26px; place-items: center; border-radius: 6px; background: #e9f8f5; color: var(--demo-mint); }
.demo-mapping-row > span { color: var(--demo-muted); }
.demo-mapping-row > strong { color: #29445c; text-align: right; }
.demo-proof-card ol { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.demo-proof-card li { display: flex; gap: .6rem; padding: .6rem; border: 1px solid #dfe8ee; border-radius: 8px; background: #fbfdff; }
.demo-proof-card li > span { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--demo-mint-soft); color: var(--demo-mint); font-weight: 900; }
.demo-proof-card li strong,
.demo-proof-card li small { display: block; }
.demo-proof-card li strong { color: #29445c; font-size: .75rem; }
.demo-proof-card li small { margin-top: .18rem; color: var(--demo-muted); font-size: .67rem; line-height: 1.4; }
.demo-algorithm-note { display: flex; align-items: center; gap: .75rem; margin-top: .8rem; padding: .8rem .9rem; border: 1px solid #a7e2d6; border-radius: 9px; background: #effaf7; }
.demo-algorithm-note > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--demo-mint); color: #fff; font-size: .67rem; font-weight: 900; }
.demo-algorithm-note strong,
.demo-algorithm-note p { display: block; margin: 0; }
.demo-algorithm-note p { margin-top: .2rem; color: #557068; font-size: .72rem; line-height: 1.45; }

.demo-finalize-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 1rem; }
.demo-finalize-card h2,
.demo-test-summary h2 { margin: .35rem 0 .8rem; font-size: 1.05rem; }
.demo-choice { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; margin-top: .55rem; padding: .7rem; border: 1px solid #cfe0e6; border-radius: 8px; background: #fbfdff; }
.demo-choice input { accent-color: var(--demo-mint); }
.demo-choice strong,
.demo-choice small { display: block; }
.demo-choice small { margin-top: .15rem; color: var(--demo-muted); font-size: .7rem; }
.demo-choice > b { padding: .25rem .4rem; border-radius: 999px; background: var(--demo-mint-soft); color: var(--demo-mint); font-size: .6rem; }
.demo-test-summary ul { padding-left: 1.1rem; color: var(--demo-muted); font-size: .75rem; line-height: 1.7; }
.demo-token-note { display: grid; gap: .2rem; margin-top: 1rem; padding: .75rem; border-radius: 8px; background: #f1f5f9; }
.demo-token-note strong { color: var(--demo-muted); font-size: .66rem; text-transform: uppercase; }
.demo-token-note span { color: var(--demo-mint); font-weight: 850; }
.demo-token-note small { color: var(--demo-muted); }

.demo-artifact-status-grid { display: grid; gap: .75rem; }
.demo-artifact-status-grid > article { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: .8rem; padding: 1rem; }
.demo-artifact-status-grid article > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--demo-mint-soft); color: var(--demo-mint); font-weight: 900; }
.demo-artifact-status-grid strong,
.demo-artifact-status-grid p { display: block; margin: 0; }
.demo-artifact-status-grid p { margin-top: .25rem; color: var(--demo-muted); font-size: .75rem; line-height: 1.45; }
.demo-artifact-status-grid article > b { padding: .28rem .48rem; border-radius: 999px; background: #dcfce7; color: #166534; font-size: .62rem; }
.demo-artifact-status-grid .artifact-preparing > b { background: #eff6ff; color: #1d4ed8; }
.demo-artifact-status-grid .artifact-linking {
  border-color: #9bd9cf;
  background: linear-gradient(100deg, #effaf7, #fff);
}
.demo-artifact-status-grid .artifact-linking > span {
  animation: demo-handover-arrow 1.25s ease-in-out 2;
}
@keyframes demo-handover-arrow {
  0%, 100% { transform: translateX(0); box-shadow: 0 0 0 0 rgba(11,127,116,.2); }
  50% { transform: translateX(7px); box-shadow: 0 0 0 9px rgba(11,127,116,.09); }
}
.demo-spinner { border: 3px solid #cfe4e1; border-top-color: var(--demo-mint); animation: demo-spin 1s linear infinite; }
@keyframes demo-spin { to { rotate: 360deg; } }

.demo-story-detail,
.demo-test-detail { padding: 1.1rem; }
.demo-story-head,
.demo-test-head { display: flex; align-items: center; gap: .85rem; padding-bottom: .9rem; border-bottom: 1px solid #e4eaf0; }
.demo-story-head > span,
.demo-test-head > span { display: grid; min-width: 48px; height: 48px; place-items: center; border-radius: 9px; background: var(--demo-mint-soft); color: var(--demo-mint); font-size: .72rem; font-weight: 900; }
.demo-story-head > div,
.demo-test-head > div { flex: 1; }
.demo-story-head small,
.demo-test-head small { color: var(--demo-mint); font-size: .62rem; font-weight: 850; letter-spacing: .08em; }
.demo-story-head h2,
.demo-test-head h2 { margin: .18rem 0 0; font-size: 1rem; }
.demo-test-head p { margin: .18rem 0 0; color: var(--demo-muted); font-size: .65rem; }
.demo-story-head > b,
.demo-test-head > b { padding: .3rem .48rem; border-radius: 999px; background: #dcfce7; color: #166534; font-size: .62rem; }
.demo-story-statement { display: grid; grid-template-columns: 60px 1fr; gap: .38rem .7rem; margin: 1rem 0; padding: .9rem; border-radius: 9px; background: #f6f9fb; }
.demo-story-statement span { color: var(--demo-muted); font-size: .72rem; font-weight: 750; }
.demo-story-statement strong { color: #294056; font-size: .8rem; }
.demo-story-detail ol { display: grid; gap: .5rem; padding: 0; list-style: none; }
.demo-story-detail li { display: flex; gap: .55rem; padding: .65rem; border: 1px solid #dce6ee; border-radius: 8px; color: #435468; font-size: .77rem; }
.demo-story-detail li span { color: var(--demo-mint); font-weight: 900; }
.demo-test-definition,
.demo-test-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .8rem; }
.demo-test-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin-top: .8rem; }
.demo-test-meta-grid section { padding: .7rem; border: 1px solid #e0e8ef; border-radius: 8px; background: #fbfdff; }
.demo-test-meta-grid span,
.demo-test-meta-grid strong,
.demo-test-meta-grid small { display: block; }
.demo-test-meta-grid span { color: #74869a; font-size: .58rem; font-weight: 830; letter-spacing: .055em; text-transform: uppercase; }
.demo-test-meta-grid strong { margin-top: .25rem; color: #2b4359; font-size: .72rem; }
.demo-test-meta-grid small { margin-top: .2rem; color: var(--demo-muted); font-size: .62rem; }
.demo-test-section-title { margin: .95rem 0 0; color: #456075; font-size: .62rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.demo-test-definition section,
.demo-test-flow section { padding: .85rem; border: 1px solid #dce6ee; border-radius: 8px; background: #fbfdff; }
.demo-test-flow section:first-child { border-top: 3px solid #4f8dd8; }
.demo-test-flow section:last-child { border-top: 3px solid var(--demo-mint); }
.demo-test-detail ul,
.demo-test-detail ol { margin: .55rem 0 0; padding-left: 1.15rem; color: #46576b; font-size: .76rem; line-height: 1.6; }
.demo-test-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .8rem; }
.demo-test-evidence-grid section { min-height: 125px; padding: .85rem; border: 1px solid #d9e7f4; border-radius: 8px; background: #eff7ff; }
.demo-test-evidence-grid section:last-child { border-color: #f3e3a9; background: #fffbea; }
.demo-test-evidence-grid p { color: var(--demo-muted); font-size: .68rem; line-height: 1.45; }
.demo-test-evidence-grid section > div { display: flex; gap: .45rem; margin-top: .7rem; }
.demo-test-evidence-grid button,
.demo-test-evidence-grid input { min-height: 32px; border: 1px solid #d8dfdf; border-radius: 6px; background: #fff; color: #64748b; font: inherit; font-size: .62rem; }
.demo-test-evidence-grid button { width: 85px; }
.demo-test-evidence-grid input { flex: 1; padding: 0 .55rem; }
.demo-test-remaining { margin-top: .85rem; border: 1px solid var(--demo-line); border-radius: 9px; background: #fff; box-shadow: 0 10px 25px rgba(16, 32, 51, .06); overflow: hidden; }
.demo-test-remaining > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; cursor: pointer; list-style: none; }
.demo-test-remaining > summary::-webkit-details-marker { display: none; }
.demo-test-remaining summary strong,
.demo-test-remaining summary small { display: block; }
.demo-test-remaining summary strong { color: #2f465c; font-size: .78rem; }
.demo-test-remaining summary small { margin-top: .15rem; color: var(--demo-muted); font-size: .66rem; }
.demo-test-remaining summary > b { padding: .34rem .5rem; border-radius: 7px; background: var(--demo-mint-soft); color: var(--demo-mint); font-size: .62rem; }
.demo-test-index { display: grid; border-top: 1px solid #e4ebf0; }
.demo-test-index article { display: grid; grid-template-columns: 42px 1fr auto; gap: .7rem; align-items: center; padding: .65rem .85rem; border-bottom: 1px solid #edf2f5; }
.demo-test-index article:last-child { border-bottom: 0; }
.demo-test-index article > span { display: grid; width: 36px; height: 30px; place-items: center; border-radius: 7px; background: var(--demo-mint-soft); color: var(--demo-mint); font-size: .62rem; font-weight: 900; }
.demo-test-index article strong,
.demo-test-index article small { display: block; }
.demo-test-index article strong { color: #334b61; font-size: .7rem; }
.demo-test-index article small { margin-top: .12rem; color: var(--demo-muted); font-size: .6rem; }
.demo-test-index article > b { color: #718397; font-size: .6rem; }
.demo-empty-artifact { padding: 1.2rem; color: var(--demo-muted); }
.demo-finished { border-color: #a7e2d6; background: #effaf7; }

.demo-guide {
  position: absolute;
  z-index: 500;
  right: 24px;
  bottom: 22px;
  width: min(370px, calc(100% - 120px));
  padding: .9rem 1rem;
  border: 1px solid rgba(117, 225, 208, .52);
  border-radius: 10px;
  background: rgba(12, 20, 29, .97);
  color: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .4);
  transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
}
.demo-guide-hide {
  position: absolute;
  top: .55rem;
  right: .55rem;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(189, 200, 213, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  color: #dbe6ef;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.demo-guide-hide:hover,
.demo-guide-hide:focus-visible {
  border-color: var(--demo-mint-light);
  background: rgba(117, 225, 208, .13);
  color: var(--demo-mint-light);
  outline: none;
}
.demo-guide > span,
.demo-guide h2,
.demo-guide p,
.demo-guide small { padding-right: 1.8rem; }
.demo-app.is-guide-hidden .demo-guide {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.97);
  pointer-events: none;
}
.demo-guide-show {
  position: fixed;
  z-index: 505;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 42px;
  padding: .48rem .72rem .48rem .52rem;
  border: 1px solid rgba(117, 225, 208, .58);
  border-radius: 999px;
  background: rgba(12, 20, 29, .97);
  color: #fff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .35);
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
  animation: demo-guide-show-in .25s ease both;
}
.demo-guide-show[hidden] { display: none !important; }
.demo-guide-show span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--demo-mint-light);
  color: #073b34;
  font-size: .72rem;
  font-weight: 900;
}
.demo-guide-show:hover,
.demo-guide-show:focus-visible {
  border-color: var(--demo-mint-light);
  color: var(--demo-mint-light);
  outline: none;
  transform: translateY(-2px);
}
@keyframes demo-guide-show-in {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.demo-guide[data-position="left"] { right: auto; left: 100px; }
.demo-guide > span { color: var(--demo-mint-light); font-size: .62rem; font-weight: 850; letter-spacing: .1em; }
.demo-guide h2 { margin: .3rem 0; font-size: .92rem; }
.demo-guide p { margin: 0; color: #bdc8d5; font-size: .73rem; line-height: 1.45; }
.demo-guide small { display: block; margin-top: .5rem; color: var(--demo-mint-light); font-size: .64rem; }
.demo-app.is-complete .demo-guide { border-color: var(--demo-mint-light); background: #0b302b; }

@media (max-width: 1050px) {
  .demo-release-card { grid-template-columns: 125px 1fr; }
  .demo-release-components { grid-column: 1 / -1; }
  .demo-derivation-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-derivation-flow > i { display: none; }
}

.demo-production-label {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 .7rem;
  padding: .62rem .78rem;
  border: 1px solid #cbd8e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 32, 51, .06);
}
.demo-production-label span {
  padding: .22rem .45rem;
  border-radius: 999px;
  background: #e9f8f5;
  color: #087066;
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.demo-production-label strong { color: #22344a; font-size: .78rem; }
.demo-production-label b {
  margin-left: auto;
  padding: .28rem .5rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a4b08;
  font-size: .62rem;
}
.demo-production-label.is-ready b { background: #ecfdf5; color: #047857; }

.demo-production-surface {
  position: relative;
  max-height: min(69vh, 820px);
  overflow: auto;
  border: 1px solid #ccd8e4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 52px rgba(16, 32, 51, .12);
  scrollbar-color: #a8b8c8 #eef3f7;
}
.demo-production-surface::after {
  content: "READ-ONLY PRODUCT TOUR";
  position: sticky;
  z-index: 20;
  right: 12px;
  bottom: 12px;
  float: right;
  margin: 12px;
  padding: .34rem .52rem;
  border: 1px solid rgba(11, 127, 116, .3);
  border-radius: 999px;
  background: rgba(239, 250, 248, .94);
  color: #087066;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  pointer-events: none;
}
.demo-production-surface a,
.demo-production-surface button,
.demo-production-surface input,
.demo-production-surface textarea,
.demo-production-surface select,
.demo-production-surface label { cursor: default !important; }
.demo-production-surface form { margin: 0; }
.demo-production-statistics .stats-step,
.demo-production-finalize .finalize-step,
.demo-production-summary .summary-step { padding: 1rem; }
.demo-production-finalize .cost-chip,
.demo-production-finalize .ai-support-summary,
.demo-production-finalize [data-token-forecast] { display: none !important; }
.demo-production-builder { min-height: 620px; overflow: auto; }
.demo-production-builder > form { min-height: 620px; }
.demo-production-builder #inlineViewBtn,
.demo-production-builder .zoom-controls button#zoomOutBtn,
.demo-production-builder .zoom-controls button#zoomInBtn,
.demo-production-builder .zoom-controls button#zoomResetBtn,
.demo-production-builder .zoom-controls #zoomSlider { cursor: pointer !important; pointer-events: auto !important; opacity: 1 !important; }
.demo-production-builder .xcontainer { height: 540px; }
.demo-production-builder #sourcePanel,
.demo-production-builder #contextMenu,
.demo-production-builder .builder-modal,
.demo-production-builder #referencesPanel { display: none !important; }
.demo-production-builder #builderCanvas { min-height: 500px; }
.demo-production-builder {
  --color-action-bg: #64748b;
  --color-action-border: #475569;
  --color-sequence-bg: #64748b;
  --color-sequence-border: #475569;
}
.demo-production-builder.is-switching-view #nsView,
.demo-production-builder.is-switching-view #treeView { opacity: .25; filter: blur(1px); transform: scale(.99); transition: opacity .35s ease, filter .35s ease, transform .35s ease; }
.demo-production-builder.is-applying-change #builderCanvas { filter: saturate(.65); transition: filter .35s ease; }
.demo-builder-change {
  position: absolute;
  z-index: 85;
  top: 72px;
  left: 50%;
  display: grid;
  width: min(470px, calc(100% - 32px));
  gap: .2rem;
  padding: .8rem .95rem;
  border: 1px solid #7acfc2;
  border-radius: 10px;
  background: rgba(12, 32, 43, .96);
  color: #fff;
  box-shadow: 0 22px 55px rgba(16,32,51,.3);
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity .25s ease, transform .25s ease, border-color .25s ease, background .25s ease;
  pointer-events: none;
}
.demo-builder-change[hidden] { display: none; }
.demo-builder-change.is-visible { opacity: 1; transform: translate(-50%, 0); }
.demo-builder-change.is-applied { border-color: #6ee7b7; background: rgba(6, 78, 59, .96); }
.demo-builder-change span { color: #75e1d0; font-size: .58rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.demo-builder-change strong { font-size: .82rem; }
.demo-builder-change small { color: #c3d3dd; font-size: .66rem; line-height: 1.4; }
.demo-production-story .story-detail-page { padding: 1rem; }
.demo-production-story .story-detail-hero { margin-top: 0; }

.demo-transition-explainer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: center;
  margin-top: .85rem;
  padding: .85rem .95rem;
  border: 1px solid #cddce9;
  border-left: 4px solid #0b7f74;
  border-radius: 9px;
  background: linear-gradient(100deg, #f5fbfa, #fff);
  box-shadow: 0 12px 26px rgba(16, 32, 51, .07);
}
.demo-transition-explainer.is-success { border-left-color: #10b981; background: linear-gradient(100deg, #ecfdf5, #fff); }
.demo-transition-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #0b7f74;
  color: #fff;
  font-size: .72rem;
  font-weight: 900;
}
.demo-transition-explainer.is-success .demo-transition-icon { background: #059669; }
.demo-transition-explainer strong { display: block; color: #173047; font-size: .86rem; }
.demo-transition-explainer p { margin: .2rem 0 0; color: #637489; font-size: .74rem; line-height: 1.45; }

.demo-scene.is-leaving { animation: demo-scene-out .18s ease both; }
@keyframes demo-scene-out { to { opacity: 0; transform: translateY(-8px); } }
.demo-app.is-transitioning .demo-guide { opacity: 0; visibility: hidden; transform: translateY(10px); }

.demo-tour {
  position: fixed;
  inset: 0;
  z-index: 590;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.demo-tour.is-active { opacity: 1; visibility: visible; }
.demo-tour-ring {
  position: fixed;
  z-index: 591;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(8, 16, 27, .58);
  outline: 2px solid var(--demo-mint-light);
  outline-offset: 2px;
  pointer-events: none;
  transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease;
}
.demo-tour-popover {
  position: fixed;
  z-index: 592;
  width: min(320px, calc(100vw - 32px));
  padding: 1.05rem 1.15rem;
  border-radius: 12px;
  background: #0c141d;
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  pointer-events: auto;
  transition: left .3s ease, top .3s ease;
}
.demo-tour-step { display: inline-block; margin-bottom: .5rem; padding: .25rem .55rem; border-radius: 999px; background: rgba(117, 225, 208, .16); color: var(--demo-mint-light); font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.demo-tour-popover h4 { margin: 0 0 .4rem; font-size: .98rem; line-height: 1.35; }
.demo-tour-popover p { margin: 0 0 .95rem; color: #c3d0dc; font-size: .78rem; line-height: 1.5; }
.demo-tour-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.demo-tour-skip { border: 0; background: transparent; color: #93a4b4; font: inherit; font-size: .72rem; font-weight: 700; }
.demo-tour-actions .btn { padding: .55rem 1.1rem; font-size: .76rem; }

.demo-production-statistics .stat-card { opacity: 0; animation: demo-stat-in .5s ease forwards; }
.demo-production-statistics .stat-card:nth-of-type(1) { animation-delay: .04s; }
.demo-production-statistics .stat-card:nth-of-type(2) { animation-delay: .1s; }
.demo-production-statistics .stat-card:nth-of-type(3) { animation-delay: .16s; }
.demo-production-statistics .stat-card:nth-of-type(4) { animation-delay: .22s; }
.demo-production-statistics .stat-card:nth-of-type(5) { animation-delay: .28s; }
.demo-production-statistics .stat-card:nth-of-type(6) { animation-delay: .34s; }
.demo-production-statistics .stat-card:nth-of-type(7) { animation-delay: .4s; }
.demo-production-statistics .stat-card:nth-of-type(8) { animation-delay: .46s; }
@keyframes demo-stat-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.demo-scene.active .demo-derivation-flow article {
  opacity: 0;
  animation: demo-flow-reveal .4s ease forwards;
}
.demo-scene.active .demo-derivation-flow article:nth-of-type(2) { animation-delay: .1s; }
.demo-scene.active .demo-derivation-flow article:nth-of-type(3) { animation-delay: .2s; }
.demo-scene.active .demo-derivation-flow article:nth-of-type(4) { animation-delay: .3s; }
@keyframes demo-flow-reveal { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

.demo-platform-scope {
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid #cad9e6;
  border-radius: 10px;
  background: linear-gradient(145deg, #102033, #172c3f);
  color: #fff;
  box-shadow: 0 20px 48px rgba(16, 32, 51, .2);
}
.demo-platform-scope__intro > span { color: #75e1d0; font-size: .65rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.demo-platform-scope__intro h2 { margin: .35rem 0; color: #fff; font-size: 1.2rem; }
.demo-platform-scope__intro p { max-width: 900px; margin: 0; color: #b7c5d3; font-size: .78rem; line-height: 1.55; }
.demo-platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-top: 1rem; }
.demo-platform-grid article { display: grid; grid-template-columns: 30px 1fr; gap: .2rem .55rem; padding: .75rem; border: 1px solid #334b60; border-radius: 8px; background: rgba(255,255,255,.045); }
.demo-platform-grid i { grid-row: 1 / 3; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: #75e1d0; color: #073b34; font-size: .62rem; font-style: normal; font-weight: 900; }
.demo-platform-grid strong { color: #fff; font-size: .76rem; }
.demo-platform-grid span { color: #9fb0c0; font-size: .67rem; line-height: 1.4; }

@media (max-width: 900px) {
  .demo-app-context { display: none; }
  .demo-app-header { grid-template-columns: 1fr auto; }
  .demo-app-rail { display: none; }
  .demo-app-layout { grid-template-columns: 1fr; }
  .demo-flow span { display: none; }
  .demo-entry-grid,
  .demo-summary-grid,
  .demo-finalize-grid,
  .demo-derivation-grid { grid-template-columns: 1fr; }
  .demo-safety-note { display: none; }
  .demo-wizard-shell { grid-template-columns: 1fr; }
  .demo-wizard-intro { display: none; }
  .demo-wizard-modebar { grid-template-columns: 1fr 1fr; }
  .demo-wizard-modebar > div { grid-column: 1 / -1; }
  .demo-wizard-original .demo-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-wizard-toolbar button:not(:nth-last-child(2)),
  .demo-wizard-context button { display: none; }
  .demo-guide[data-position="left"] { left: 24px; }
  .demo-builder .block { display: none; }
  .demo-platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-transition-explainer { grid-template-columns: 42px 1fr; }
  .demo-transition-explainer .btn { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .demo-app-header { height: 56px; padding: 0 10px; }
  .demo-app-layout { height: calc(100vh - 56px); }
  .demo-app-brand em { display: none; }
  .demo-flow { height: 56px; padding: 0; }
  .demo-flow button::after { display: none; }
  .demo-flow i { width: 24px; height: 24px; }
  .demo-scenes { height: calc(100% - 56px); padding: 9px 8px 165px; }
  .demo-hero,
  .demo-compact-hero,
  .demo-builder-title { align-items: flex-start; padding: .8rem; }
  .demo-hero h1,
  .demo-compact-hero h1,
  .demo-builder-title h1 { font-size: 1.08rem; }
  .demo-hero span,
  .demo-compact-hero span,
  .demo-builder-title span { display: none; }
  .demo-entry-card { padding: .8rem; }
  .demo-release-card { grid-template-columns: 1fr; }
  .demo-release-score { width: 90px; height: 90px; border-width: 8px; }
  .demo-release-components,
  .demo-kpi-grid,
  .demo-test-definition,
  .demo-test-flow,
  .demo-derivation-flow { grid-template-columns: 1fr; }
  .demo-test-meta-grid,
  .demo-test-evidence-grid,
  .demo-wizard-composer-head { grid-template-columns: 1fr; }
  .demo-wizard-original .demo-options { grid-template-columns: 1fr; }
  .demo-wizard-bottom { grid-template-columns: 1fr 1fr; }
  .demo-wizard-bottom > span { display: none; }
  .demo-mapping-row { grid-template-columns: 30px 1fr; }
  .demo-mapping-row > strong { grid-column: 2; text-align: left; }
  .demo-builder .xcontainer { height: 440px; }
  .demo-builder-footer,
  .demo-scene-action,
  .demo-callout,
  .demo-success-banner,
  .demo-finished { align-items: stretch; flex-direction: column; }
  .demo-builder-footer button,
  .demo-scene-action button,
  .demo-callout button,
  .demo-success-banner button,
  .demo-finished button { width: 100%; }
  .demo-artifact-status-grid > article { grid-template-columns: 34px 1fr; }
  .demo-artifact-status-grid article > b { grid-column: 2; justify-self: start; }
  .demo-guide,
  .demo-guide[data-position="left"] {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
    max-height: min(38vh, 260px);
    overflow: auto;
    padding: .75rem .8rem;
  }
  .demo-guide h2 { margin: .2rem 0; font-size: .82rem; }
  .demo-guide p { font-size: .68rem; line-height: 1.4; }
  .demo-guide small { margin-top: .35rem; font-size: .6rem; }
  .demo-guide-show { right: 10px; bottom: 10px; min-height: 38px; }
  .demo-production-surface { max-height: 66vh; }
  .demo-production-label { align-items: flex-start; flex-wrap: wrap; }
  .demo-production-label b { margin-left: 0; }
  .demo-platform-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-scene { animation: none; }
  .demo-target::after,
  .demo-spinner,
  .demo-scene.is-leaving,
  .demo-production-statistics .stat-card,
  .demo-scene.active .demo-derivation-flow article { animation: none; opacity: 1; }
  .demo-tour-ring, .demo-tour-popover { transition: none; }
  .demo-scenes { scroll-behavior: auto; }
}
