/* Public sample UI follows the real app's node cards, dotted canvas and inspector hierarchy. */
.cs-demo { container: content-workspace / inline-size; --cs-ink: #2e3d35; --cs-muted: #657267; --cs-edge: #dce3d7; --cs-green: #426c50; --cs-paper: #fafbf6; --cs-amber: #946c27; position: relative; min-width: 0; color: var(--cs-ink); background: #f4f6ef; border: 1px solid #cbd4c4; border-radius: 9px; overflow: hidden; font: 12px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: left; box-shadow: 0 16px 45px #15271b12, 0 1px 2px #15271b12; }
.cs-demo [hidden] { display: none !important; }
.cs-demo :is(button, input, textarea) { font: inherit; }
.cs-demo button { color: inherit; cursor: pointer; }
.cs-demo button:disabled { cursor: default; }
.cs-demo :is(button, input, textarea, a):focus-visible { outline: 2px solid #3f7455; outline-offset: 3px; }
.cs-inspector-head [data-cs-panel-title]:focus-visible { outline: 2px solid #3f7455; outline-offset: 4px; }
.cs-chrome { display: flex; align-items: center; gap: 8px; padding: 12px 17px; border-bottom: 1px solid var(--cs-edge); background: var(--cs-paper); }
.cs-chrome > strong { font-size: 13px; font-weight: 600; letter-spacing: -.025em; }
.cs-appmark { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 24px; height: 24px; border: 1px solid #d3ddcc; border-radius: 7px; background: #e9f0e3; font: 25px/1 Georgia, serif; color: #426c50; }
.cs-appmark > span { font: 15px/1 sans-serif; color: #b8794e; margin: -4px 0 0 -1px; }
.cs-sample-badge { margin-left: auto; padding: 3px 7px; border: 1px solid #dce3d7; border-radius: 4px; font-size: 9px; color: #667761; white-space: nowrap; }
.cs-toolbar { display: flex; align-items: center; gap: 8px; padding: 14px 17px; border-bottom: 1px solid var(--cs-edge); background: #f8faf3; }
.cs-toolbar > div { min-width: 0; flex: 1; }
.cs-eyebrow { display: block; font: 8px/1.5 "SFMono-Regular", Consolas, monospace; color: var(--cs-muted); letter-spacing: .06em; }
.cs-toolbar > div > strong { display: block; margin-top: 3px; font-size: 13px; font-weight: 550; letter-spacing: -.02em; }
.cs-reset { flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid var(--cs-edge); border-radius: 5px; background: #fafbf6; font-size: 18px !important; }
.cs-demo .cs-run { display: flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 7px; min-height: 32px; padding: 7px 11px; background: #41684b; color: #fff; border: 1px solid #345b3f; border-radius: 5px; font-size: 10px; }
.cs-run > span { font-size: 9px; }
.cs-demo .cs-run:hover { background: #31533a; }
.cs-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
/* A five-node graph: the lower row returns from layout to a human approval node. */
.cs-canvas { position: relative; min-width: 0; min-height: 460px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, 1fr); gap: 65px 28px; align-content: center; align-items: center; padding: 58px 22px 55px; background: radial-gradient(#9aa99166 .8px, transparent .9px) 5px 5px / 15px 15px, #f0f3ea; }
.cs-canvas-meta, .cs-canvas-footer { position: absolute; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #71816c; font: 8px/1.5 "SFMono-Regular", Consolas, monospace; }
.cs-canvas-meta { top: 16px; }
.cs-canvas-footer { bottom: 16px; }
.cs-canvas-key { display: flex; align-items: center; gap: 5px; font: 8px/1.4 -apple-system, sans-serif; }
.cs-canvas-key i { width: 5px; height: 5px; margin-left: 5px; border-radius: 50%; background: #5e8663; }
.cs-canvas-key i:last-of-type { background: #bd964c; }
.cs-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cs-wires path { fill: none; stroke: #b0bda6; stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: stroke .25s; }
.cs-wires path[data-connected="true"] { stroke: #588262; stroke-width: 2; }
.cs-demo .cs-node { position: relative; z-index: 1; min-width: 0; width: 100%; padding: 10px 11px 0; text-align: left; color: #314637; background: #fcfdf9; border: 1px solid #d1ddc8; border-radius: 8px; box-shadow: 0 3px 9px #31493308; transition: border-color .2s, box-shadow .2s, translate .2s; }
.cs-node::before, .cs-node::after { content: ""; position: absolute; top: 50%; width: 6px; height: 6px; border: 1px solid #a6b79b; border-radius: 50%; background: #fafbf6; transform: translateY(-50%); }
.cs-node::before { left: -4px; }
.cs-node::after { right: -4px; }
.cs-node[data-cs-node="input"]::before, .cs-node[data-cs-node="review"]::after { display: none; }
.cs-node[data-cs-node="draft"]::after { top: auto; bottom: -4px; right: auto; left: 50%; transform: translateX(-50%); }
.cs-node[data-cs-node="layout"]::before { top: -4px; left: 50%; transform: translateX(-50%); }
.cs-node[data-cs-node="layout"]::after { left: -4px; right: auto; }
.cs-node[data-cs-node="review"]::before { left: auto; right: -4px; }
.cs-demo .cs-node[aria-pressed="true"] { border-color: #648f70; box-shadow: 0 0 0 3px #7399781a, 0 4px 15px #324d3110; }
.cs-demo .cs-node:not(:disabled):hover { border-color: #7d9b70; translate: 0 -2px; }
.cs-demo .cs-node:disabled { color: #667661; background: #f7f9f3; }
.cs-node-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cs-node-top i { display: grid; place-content: center; width: 22px; height: 22px; border-radius: 5px; color: #54764a; background: #e8eee0; font-style: normal; font-size: 14px; }
.cs-node-top > small { font: 7px/1.2 monospace; color: #728069; flex: 1; }
.cs-node-top > span { color: #8d9d81; font-size: 9px; }
.cs-node[data-state="done"] .cs-node-top > span { color: #3c794b; }
.cs-node[data-state="ready"][data-cs-node="topics"], .cs-node[data-state="ready"][data-cs-node="review"] { border-color: #c5a45d; }
.cs-node[data-state="ready"][data-cs-node="topics"] .cs-node-bottom b, .cs-node[data-state="ready"][data-cs-node="review"] .cs-node-bottom b { color: #8b681d; }
.cs-node > strong { display: block; font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; }
.cs-node-summary { display: block; min-height: 29px; margin: 5px 0 10px; color: #7b8871; font-size: 8px; line-height: 1.6; }
.cs-node-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px; margin: 0 -11px; padding: 7px 9px; border-top: 1px solid #e7ecdf; border-radius: 0 0 7px 7px; background: #f6f9f0; font-size: 7px; }
.cs-node-bottom small { font: inherit; color: #7b8871; }
.cs-node-bottom b { font-weight: 500; color: #56724b; }
.cs-node[data-cs-node="input"] { grid-area: 1 / 1; }
.cs-node[data-cs-node="topics"] { grid-area: 1 / 2; }
.cs-node[data-cs-node="draft"] { grid-area: 1 / 3; }
.cs-node[data-cs-node="layout"] { grid-area: 2 / 3; }
.cs-node[data-cs-node="review"] { grid-area: 2 / 2; }
.cs-canvas-output { grid-area: 2 / 1; min-width: 0; padding: 0 10px; transform: rotate(-4deg); }
.cs-canvas-output > .cs-eyebrow { font-size: 7px; margin-bottom: 7px; }
.cs-mini-card { display: flex; flex-direction: column; min-height: 118px; padding: 13px 11px; background: #f6eddd; color: #4a4437; box-shadow: 3px 6px 10px #34452c14; border: 1px solid #ded3bd; transition: background .25s, color .25s; }
.cs-mini-card > span:first-child { font: 6px/1.5 monospace; letter-spacing: .06em; }
.cs-mini-card strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font: 20px/1.05 "Iowan Old Style", Georgia, serif; letter-spacing: -.04em; margin: 11px 0; overflow-wrap: anywhere; }
.cs-mini-rule { display: block; width: 30%; height: 1px; background: currentColor; opacity: .3; margin-bottom: 5px; }
.cs-mini-card small { font: 6px/1.5 sans-serif; }
.cs-output-state { display: block; margin-top: 7px; font-size: 7px; color: #69755e; }
/* A normal-flow inspector lets long copy and edited text grow without clipping or overlapping. */
.cs-inspector { min-width: 0; border-left: 1px solid var(--cs-edge); background: #fbfcf8; }
.cs-inspector-head { display: flex; flex-direction: column; gap: 4px; padding: 20px 20px 15px; border-bottom: 1px solid #e4e9de; }
.cs-inspector-head > strong { font-size: 20px; font-weight: 500; letter-spacing: -.035em; }
.cs-inspector-kind { font-size: 9px; color: #85917b; }
.cs-panel { padding: 19px 20px 20px; }
.cs-panel > label { display: block; margin-bottom: 7px; color: #56684c; font-size: 10px; }
.cs-demo :is(input[type="text"], input:not([type]), textarea) { display: block; width: 100%; max-width: 100%; min-width: 0; color: #3e5137; background: #fffef9; border: 1px solid #d6dfcc; border-radius: 5px; padding: 10px; font-size: 12px; line-height: 1.7; }
.cs-demo textarea { min-height: 90px; resize: vertical; }
.cs-panel > input { margin-bottom: 16px; }
.cs-reference { display: flex; align-items: center; gap: 9px; padding: 10px; margin-top: 14px; background: #f1f4e9; border: 1px solid #e0e7d7; border-radius: 5px; }
.cs-reference img { flex-shrink: 0; display: block; width: 34px; height: 34px; border-radius: 3px; object-fit: cover; }
.cs-reference > span { min-width: 0; }
.cs-reference > span:last-child { margin-left: auto; color: #839274; }
.cs-reference strong { display: block; overflow-wrap: anywhere; font-weight: 500; font-size: 10px; }
.cs-reference small { display: block; font-size: 8px; color: #7f8d72; }
.cs-materials { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 11px; }
.cs-materials > span { padding: 4px 7px; background: #edf1e6; border: 1px solid #d9e3cf; border-radius: 3px; color: #6a7d5c; font: 9px monospace; }
.cs-demo .cs-add { min-height: 34px; padding: 7px 0; margin-top: 6px; border: 0; background: none; color: #5e7d50; font-size: 10px; }
.cs-field-hint { margin: 10px 0 0; color: #7b8871; font-size: 10px; line-height: 1.7; }
.cs-choices, .cs-themes { min-width: 0; margin: 0; padding: 0; border: 0; }
.cs-demo legend { padding: 0; margin-bottom: 10px; font-size: 10px; color: #65765a; }
.cs-choices label { display: flex; gap: 9px; padding: 12px 10px; margin-bottom: 8px; background: #f8faf3; border: 1px solid #dfe6d6; border-radius: 5px; cursor: pointer; }
.cs-choices label:has(input:checked) { border-color: #78966a; background: #edf3e7; box-shadow: 0 0 0 2px #8ca87b10; }
.cs-demo input:is([type="radio"], [type="checkbox"]) { flex-shrink: 0; width: 13px; height: 13px; margin: 3px 0 0; accent-color: #4f7653; }
.cs-choices strong { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 550; }
.cs-choices small { display: block; color: #7c8972; font-size: 9px; line-height: 1.7; }
.cs-demo .cs-primary { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 38px; margin-top: 18px; padding: 10px 12px; color: #fff; background: #426a4b; border: 1px solid #375e40; border-radius: 5px; font-size: 10px; }
.cs-demo .cs-primary:hover { background: #34593d; }
.cs-demo .cs-primary:disabled { color: #89937f; border-color: #dce3d4; background: #e9eee1; }
.cs-wordcount { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 9px; color: #7d8d70; }
.cs-themes { display: flex; gap: 8px; }
.cs-themes label { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 9px; border: 1px solid #d7e1ce; border-radius: 5px; font-size: 10px; cursor: pointer; }
.cs-theme-swatch { width: 13px; height: 13px; border: 1px solid #d6cbb8; background: #f6eddd; border-radius: 50%; }
.cs-themes label:last-child .cs-theme-swatch { background: #303d32; border-color: #303d32; }
.cs-review-summary > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #e5eadc; color: #758269; font-size: 10px; }
.cs-review-summary b { font-size: 9px; font-weight: 500; color: #5b754d; }
.cs-demo .cs-review-check { display: flex; gap: 9px; align-items: start; margin-top: 16px; font-size: 10px; line-height: 1.7; }
.cs-download { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 10px 0; border-bottom: 1px solid #b9c9ab; color: #44643c; font-size: 11px; text-decoration: none; }
/* A real HTML card preview, driven by the editor, rather than animated placeholder lines. */
.cs-preview { padding: 0 20px 22px; }
.cs-preview > .cs-eyebrow { margin-bottom: 9px; }
.cs-poster { display: flex; flex-direction: column; min-height: 265px; padding: 20px; background: #f6eddd; color: #4a4437; border: 1px solid #ded3bd; box-shadow: 0 6px 18px #394a3110; }
.cs-poster > span { font: 7px/1.5 monospace; letter-spacing: .1em; }
.cs-poster > strong { font: 29px/1.05 "Iowan Old Style", Georgia, serif; letter-spacing: -.045em; margin: 28px 0 18px; overflow-wrap: anywhere; }
.cs-poster > p { margin: 0 0 25px; font-size: 9px; line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.cs-poster-foot { margin-top: auto; padding-top: 13px; border-top: 1px solid #74624f40; display: flex; align-items: center; justify-content: space-between; font: 6px/1.5 monospace; }
.cs-poster-foot b { font-size: 27px; font-weight: 400; }
.cs-demo[data-theme="ink"] :is(.cs-mini-card, .cs-poster) { color: #f7efdd; border-color: #20372b; background: #303d32; }
.cs-demo[data-theme="ink"] .cs-poster-foot { border-color: #f7efdd44; }
.cs-statusbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 17px; border-top: 1px solid var(--cs-edge); background: #f8faf3; color: #819076; font-size: 8px; }
.cs-live { display: flex; align-items: center; gap: 6px; color: #6d8061; }
.cs-live::before { content: ""; display: block; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: #7b9a6d; }
.cs-demo[data-approved="true"] .cs-live::before { background: #377548; box-shadow: 0 0 0 3px #37754815; }
/* These placements share state logic and component markup, with distinct available space. */
.homepage-v2 .instrument-card-content > .cs-demo { margin: 12px; }
.content-workspace-exhibit { padding: 28px 28px 28px 0; align-self: center; min-width: 0; }
.cs-demo--hero .cs-chrome { padding: 9px 12px; }
.cs-demo--hero .cs-toolbar { padding: 11px 12px; }
.cs-demo--hero .cs-toolbar > div > strong { font-size: 11px; }
.cs-demo--hero .cs-workspace { grid-template-columns: minmax(0, 1fr); }
.cs-demo--hero .cs-canvas { min-height: 0; height: 220px; padding: 34px 14px 27px; gap: 28px 17px; }
.cs-demo--hero .cs-node { padding: 7px 7px 0; border-radius: 5px; }
.cs-demo--hero .cs-node-top { gap: 4px; margin-bottom: 5px; }
.cs-demo--hero .cs-node-top i { width: 16px; height: 16px; font-size: 10px; }
.cs-demo--hero .cs-node-top small { font-size: 6px; }
.cs-demo--hero .cs-node > strong { font-size: 8px; }
.cs-demo--hero .cs-node-summary { display: none; }
.cs-demo--hero .cs-node-bottom { font-size: 6px; padding: 5px 6px; margin: 7px -7px 0; }
.cs-demo--hero .cs-node-bottom small { display: none; }
.cs-demo--hero .cs-canvas-output { padding: 0 5px; }
.cs-demo--hero .cs-mini-card { min-height: 70px; padding: 8px; }
.cs-demo--hero .cs-mini-card strong { font-size: 14px; margin: 5px 0; }
.cs-demo--hero .cs-mini-card small, .cs-demo--hero .cs-mini-rule, .cs-demo--hero .cs-output-state { display: none; }
.cs-demo--hero .cs-canvas-output > .cs-eyebrow { font-size: 6px; margin-bottom: 3px; }
.cs-demo--hero .cs-canvas-meta, .cs-demo--hero .cs-canvas-footer { left: 14px; right: 14px; font-size: 6px; }
.cs-demo--hero .cs-canvas-meta { top: 10px; }
.cs-demo--hero .cs-canvas-footer { bottom: 9px; }
.cs-demo--hero .cs-canvas-key { display: none; }
.cs-demo--hero .cs-inspector { border-left: 0; border-top: 1px solid var(--cs-edge); }
.cs-demo--hero .cs-inspector-head { flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; }
.cs-demo--hero .cs-inspector-head > strong { font-size: 12px; }
.cs-demo--hero .cs-inspector-kind, .cs-demo--hero .cs-reference, .cs-demo--hero .cs-field-hint { display: none; }
.cs-demo--hero .cs-panel { padding: 12px; }
.cs-demo--hero textarea { min-height: 60px; }
.cs-demo--hero .cs-materials { display: inline-flex; margin-right: 12px; }
.cs-demo--hero .cs-statusbar { padding: 9px 12px; }
.cs-demo--hero .cs-statusbar > span:last-child { display: none; }
.cs-demo--hero .cs-choices label { padding: 9px; }
.cs-demo--hero .cs-choices small { display: none; }
.cs-demo--hero .cs-preview { max-width: 280px; margin: auto; }
/* Container queries adapt to exhibit size instead of assuming the whole browser is available. */
@container content-workspace (max-width: 800px) {
  .cs-workspace { grid-template-columns: minmax(0, 1fr); }
  .cs-inspector { border-left: 0; border-top: 1px solid var(--cs-edge); }
  .cs-inspector-head { flex-direction: row; align-items: center; gap: 12px; padding: 13px 18px; }
  .cs-inspector-head > strong { font-size: 16px; }
  .cs-inspector-kind { margin-left: auto; font-size: 8px; }
  .cs-panel { padding: 16px 18px; }
  .cs-canvas { min-height: 320px; padding: 42px 18px 38px; gap: 42px 22px; }
  .cs-node { padding: 8px 9px 0; }
  .cs-node-top i { width: 20px; height: 20px; }
  .cs-node > strong { font-size: 10px; }
  .cs-node-summary { font-size: 8px; min-height: 0; }
  .cs-node-bottom { margin: 0 -9px; }
  .cs-mini-card { min-height: 100px; }
  .cs-mini-card strong { font-size: 18px; }
  .cs-preview { max-width: 320px; margin: auto; }
  .cs-statusbar { flex-wrap: wrap; gap: 4px 12px; }
}
@container content-workspace (max-width: 420px) {
  .cs-toolbar { padding: 12px; gap: 6px; }
  .cs-toolbar > div > strong { font-size: 11px; }
  .cs-toolbar .cs-eyebrow { font-size: 6px; }
  .cs-demo .cs-run { font-size: 9px; padding: 6px 8px; }
  .cs-chrome { padding: 10px 12px; }
  .cs-canvas { min-height: 280px; padding: 39px 12px 34px; gap: 35px 14px; }
  .cs-canvas-meta, .cs-canvas-footer { left: 12px; right: 12px; font-size: 6px; }
  .cs-canvas-key { display: none; }
  .cs-node-top { gap: 4px; }
  .cs-node-top i { width: 17px; height: 17px; font-size: 11px; }
  .cs-node-top > small { font-size: 6px; }
  .cs-node > strong { font-size: 9px; }
  .cs-node-summary { display: none; }
  .cs-node-bottom { font-size: 6px; margin-top: 8px; }
  .cs-node-bottom small { display: none; }
  .cs-canvas-output { padding: 0 3px; }
  .cs-canvas-output > .cs-eyebrow { font-size: 6px; }
  .cs-mini-card { min-height: 85px; padding: 9px; }
  .cs-mini-card strong { font-size: 16px; }
  .cs-mini-card small, .cs-mini-rule { display: none; }
  .cs-output-state { font-size: 6px; }
  .cs-inspector-kind { display: none; }
  .cs-inspector-head { padding: 12px; }
  .cs-panel { padding: 13px 12px; }
  .cs-demo :is(input:not([type]), textarea) { font-size: 16px; }
  .cs-demo--hero .cs-canvas { min-height: 0; }
  .cs-demo--hero .cs-node { padding-left: 6px; padding-right: 6px; }
  .cs-demo--hero .cs-node-top i { display: none; }
  .cs-demo--hero .cs-node-bottom { margin-left: -6px; margin-right: -6px; }
  .cs-demo--hero .cs-mini-card strong { font-size: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .cs-demo[data-running="true"] .cs-run > span { animation: cs-running .65s linear; }
  .cs-demo[data-running="true"] .cs-wires path:first-child { stroke: #5d875e; stroke-dasharray: 5 5; animation: cs-flow .65s linear; }
  .cs-panel:not([hidden]), .cs-preview:not([hidden]) { animation: cs-panel-arrive .25s ease-out; }
  @keyframes cs-running { to { rotate: 360deg; } }
  @keyframes cs-flow { to { stroke-dashoffset: -20; } }
  @keyframes cs-panel-arrive { from { opacity: .5; translate: 0 5px; } to { opacity: 1; translate: 0 0; } }
}
@container content-workspace (max-width: 350px) {
  .cs-node-top i { display: none; }
  .cs-chrome > strong { font-size: 11px; }
  .cs-sample-badge { font-size: 8px; padding: 3px 5px; }
}
@media (max-width: 760px) {
  .content-workspace-exhibit { padding: 0 15px 20px; }
  /* Keep the active step below the viewport edge, with a full finger-sized target for each action. */
  .cs-inspector { scroll-margin-top: 16px; }
  .cs-demo .cs-toolbar { flex-wrap: wrap; }
  .cs-demo .cs-toolbar > div { flex: 1 0 100%; }
  .cs-demo .cs-reset { flex-basis: 44px; width: 44px; height: 44px; }
  .cs-demo .cs-run { flex: 1; min-height: 44px; padding: 10px 12px; font-size: 12px; }
  .cs-demo :is(.cs-primary, .cs-add, .cs-download) { min-height: 44px; font-size: 12px; }
  .cs-demo :is(.cs-choices label, .cs-themes label, .cs-review-check) { min-height: 44px; }
  .cs-demo .cs-review-check { align-items: center; cursor: pointer; }
  .cs-demo input:is([type="radio"], [type="checkbox"]) { width: 18px; height: 18px; margin: 0; }
  /* A readable input size also prevents focus zoom in mobile Safari, including the compact hero. */
  .cs-demo :is(input:not([type]), textarea) { font-size: 16px; }
}
