/* "Korani Studio" — the interactive demo: a desktop workspace where my tools take turns on one job.
   Loaded on the pages that carry the demo. Reads the site tokens (--lime, --line, --mono …) from site.css. */

.demo {
  --st-bg: #090c0a;
  --st-chrome: #0e120f;
  --st-side: #0b0f0c;
  --st-panel: #101511;
  --st-panel-2: #141a15;
  --st-line: rgba(236, 240, 230, .07);
  --st-line-2: rgba(236, 240, 230, .13);
  --st-text: #e9ede5;
  --st-soft: #b9c1b5;
  --st-muted: #7c8679;
  --st-lime: #d7ff3f;
  --st-red: #ff6e5a;
  --st-amber: #ffc54d;
  --st-ease: cubic-bezier(.2, .7, .15, 1);
  position: relative;
  container: demo / inline-size;
}
.demo button { font: inherit; color: inherit; }

/* ---------- Jobs and actions ---------- */
.demo-top { position: relative; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.demo-jobs { display: flex; gap: 4px; min-width: 0; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .025); overflow-x: auto; scrollbar-width: none; }
.demo-jobs::-webkit-scrollbar { display: none; }
.demo-jobs button { display: inline-flex; align-items: center; gap: 9px; flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--soft); font-size: .88rem; font-weight: 520; white-space: nowrap; transition: background-color .25s, color .25s; }
.demo-jobs button span { font-family: var(--mono); font-size: .6rem; color: var(--muted); transition: color .25s; }
.demo-jobs button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.demo-jobs button[aria-selected="true"] { background: var(--text); color: var(--ink); }
.demo-jobs button[aria-selected="true"] span { color: #5a6356; }
.demo-actions { display: flex; flex: none; gap: 8px; }
.demo-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .025); color: var(--soft); font-size: .88rem; font-weight: 520; transition: border-color .25s, color .25s; }
.demo-btn .i { width: 18px; height: 18px; }
.demo-btn:hover, .demo-btn[aria-expanded="true"] { border-color: var(--lime); color: var(--text); }
.demo-full { width: 46px; padding: 0; justify-content: center; }

.demo-adjust { position: absolute; top: calc(100% + 10px); right: 0; width: min(440px, 100%); padding: 20px; border: 1px solid var(--line-2); border-radius: 18px; background: rgba(13, 17, 14, .97); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .85); }
.adjust-k { margin-bottom: 16px; font-size: .88rem; color: var(--muted); }
.demo-adjust fieldset { margin-bottom: 16px; }
.demo-adjust legend { margin-bottom: 10px; font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .9rem; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.seg span:hover { border-color: var(--line-3); }
.seg input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.toggle { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--soft); cursor: pointer; }
.toggle input { position: relative; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 999px; background: #2a312b; -webkit-appearance: none; appearance: none; cursor: pointer; transition: background-color .25s; }
.toggle input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s var(--st-ease), background-color .3s; }
.toggle input:checked { background: var(--lime); }
.toggle input:checked::after { transform: translateX(16px); background: var(--ink); }
.toggle input:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* ---------- Stage ---------- */
.demo-stage { position: relative; isolation: isolate; }
.demo-stage::before { content: ''; position: absolute; z-index: -1; inset: 6% 4% -8%; pointer-events: none; filter: blur(48px); opacity: .9;
  background: radial-gradient(45% 55% at 22% 30%, rgba(215, 255, 63, .16), transparent 70%), radial-gradient(50% 60% at 80% 75%, rgba(52, 150, 125, .22), transparent 70%); }

/* ---------- Window ---------- */
.studio { position: relative; display: grid; grid-template-rows: 42px minmax(0, 1fr) 30px; height: 640px; overflow: hidden; border-radius: 16px; background: var(--st-bg); color: var(--st-text); font-size: 13px; line-height: 1.4; text-align: left;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .05), 0 70px 120px -50px rgba(0, 0, 0, .95), 0 30px 60px -30px rgba(0, 0, 0, .7); }
.studio .ti { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.studio code { font-family: var(--mono); }
.studio del { color: #ff9585; text-decoration-color: rgba(255, 110, 90, .7); }
.studio ins { color: var(--st-lime); text-decoration: none; }

.st-chrome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px) minmax(0, 1fr); align-items: center; gap: 14px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--st-line); background: var(--st-chrome); }
.st-app { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12.5px; white-space: nowrap; }
.st-logo { display: grid; place-items: center; flex: none; width: 19px; height: 19px; border-radius: 5px; background: var(--st-lime); color: #0b0e0b; font-size: 11px; font-weight: 800; font-stretch: 112%; }
.st-app b { font-weight: 620; }
.st-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--st-muted); }
.st-path::before { content: '/'; margin-right: 10px; opacity: .5; }
.st-search { display: flex; align-items: center; gap: 8px; height: 27px; padding: 0 10px; border: 1px solid var(--st-line); border-radius: 7px; background: rgba(255, 255, 255, .03); color: var(--st-muted); font-size: 12px; white-space: nowrap; }
.st-search .ti { width: 14px; height: 14px; }
.st-search kbd { margin-left: auto; padding: 1px 6px; border: 1px solid var(--st-line-2); border-radius: 4px; font-family: var(--mono); font-size: 9.5px; }
.st-win { display: flex; justify-self: end; gap: 18px; padding-right: 2px; }
.st-win i { position: relative; width: 10px; height: 10px; opacity: .55; }
.st-win i:nth-child(1)::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--st-soft); }
.st-win i:nth-child(2) { border: 1px solid var(--st-soft); border-radius: 1px; }
.st-win i:nth-child(3)::before, .st-win i:nth-child(3)::after { content: ''; position: absolute; left: -1px; right: -1px; top: 50%; height: 1px; background: var(--st-soft); transform: rotate(45deg); }
.st-win i:nth-child(3)::after { transform: rotate(-45deg); }

.st-body { display: grid; grid-template-columns: 214px minmax(0, 1fr); min-height: 0; }
.st-side { display: flex; flex-direction: column; gap: 4px; min-height: 0; padding: 16px 10px 12px; border-right: 1px solid var(--st-line); background: var(--st-side); }
.st-h { padding: 0 10px; margin-bottom: 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--st-muted); }
.st-tools { display: grid; gap: 2px; }
.st-tools li { position: relative; display: grid; grid-template-columns: 17px minmax(0, 1fr) 8px; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--st-soft); transition: background-color .35s, color .35s, opacity .35s; }
.st-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--st-line-2); transition: background-color .3s, border-color .3s, box-shadow .3s; }
.st-tools li[data-idle] { opacity: .35; }
.st-tools li[data-state="run"] { background: rgba(215, 255, 63, .1); color: #fff; }
.st-tools li[data-state="run"]::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--st-lime); box-shadow: 0 0 14px var(--st-lime); }
.st-tools li[data-state="run"] .ti { color: var(--st-lime); }
.st-tools li[data-state="run"] .st-dot { border-color: var(--st-lime); background: var(--st-lime); box-shadow: 0 0 10px var(--st-lime); animation: st-pulse 1.3s ease-in-out infinite; }
.st-tools li[data-state="done"] { color: var(--st-text); }
.st-tools li[data-state="done"] .st-dot { border-color: rgba(215, 255, 63, .55); background: rgba(215, 255, 63, .55); }
.st-proj { display: grid; gap: 3px; margin-top: auto; padding: 14px 10px 2px; border-top: 1px solid var(--st-line); font-size: 12px; color: var(--st-muted); }
.st-proj .st-h { padding: 0; }
.st-proj-n { font-weight: 620; color: var(--st-text); }
.studio .r-b { display: none; }
.studio.rev-b .r-a { display: none; }
.studio.rev-b .r-b { display: inline; color: var(--st-lime); }

.st-main { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: radial-gradient(rgba(236, 240, 230, .045) 1px, transparent 1.3px) 0 0 / 18px 18px, var(--st-bg); }

.st-status { display: flex; align-items: center; gap: 22px; min-width: 0; padding: 0 16px; border-top: 1px solid var(--st-line); background: var(--st-chrome); font-family: var(--mono); font-size: 10.5px; color: var(--st-muted); white-space: nowrap; overflow: hidden; }
.st-run { display: inline-flex; align-items: center; gap: 8px; color: var(--st-soft); }
.st-run i { width: 7px; height: 7px; border-radius: 50%; background: #3b433b; transition: background-color .3s; }
.studio.is-running .st-run i { background: var(--st-lime); box-shadow: 0 0 8px var(--st-lime); animation: st-pulse 1.2s ease-in-out infinite; }
.studio.is-done .st-run i { background: var(--st-lime); }
.st-rev b { font-weight: 400; }
.st-data { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Views ---------- */
.st-view { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .45s var(--st-ease), transform .6s var(--st-ease), visibility 0s linear .45s; }
/* The opening view shows without script; the player marks the active view from then on. */
.studio[data-view="brief"] [data-v="brief"], .studio .st-view.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.st-bar { display: flex; align-items: center; gap: 14px; min-width: 0; height: 54px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--st-line); background: rgba(9, 12, 10, .88); }
.st-title { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; }
.st-title .ti { color: var(--st-lime); }
.st-title b { font-size: 13.5px; font-weight: 640; }
.st-title span { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--st-muted); }
.st-title span::before { content: '—'; margin-right: 8px; opacity: .5; }
.st-files { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.st-files i { font-style: normal; color: var(--st-muted); }
.studio .chip { display: inline-flex; align-items: center; flex: none; height: 25px; padding: 0 9px; border: 1px solid var(--st-line-2); border-radius: 6px; background: rgba(255, 255, 255, .03); font-family: var(--mono); font-size: 10.5px; color: var(--st-soft); white-space: nowrap; }
.st-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 32px; margin-left: auto; padding: 0 15px; border-radius: 9px; background: var(--st-lime); color: #0b0e0b; font-size: 12.5px; font-weight: 650; white-space: nowrap; transition: background-color .3s, color .3s, box-shadow .4s; }
.st-btn.pressed { background: rgba(215, 255, 63, .1); color: var(--st-lime); box-shadow: inset 0 0 0 1px rgba(215, 255, 63, .38); animation: st-press .5s var(--st-ease); }
.st-btn.pressed::before { content: ''; width: 9px; height: 5px; margin-top: -3px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.st-btn-ghost { margin-left: 0; background: transparent; color: var(--st-text); box-shadow: inset 0 0 0 1px var(--st-line-2); }

.st-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; min-height: 0; padding: 12px; }
.st-split.ops { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
.st-split.batch { grid-template-columns: minmax(0, 1fr) 286px; }
.st-split.del { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.st-split.files-split { grid-template-columns: 280px minmax(0, 1fr); }
.st-panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; padding: 12px 14px; border: 1px solid var(--st-line); border-radius: 11px; background: linear-gradient(180deg, var(--st-panel-2), var(--st-panel)); }
.st-ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--st-muted); }
.st-ph + .st-ph, * + .st-ph { margin-top: 4px; }
.st-ph-n { letter-spacing: .03em; text-transform: none; white-space: nowrap; }
.st-ph > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-slot { min-width: 0; min-height: 0; }

/* Items appear one by one */
.studio .rv { opacity: 0; transform: translateY(6px); transition: opacity .4s var(--st-ease), transform .5s var(--st-ease), background-color .4s, border-color .4s, color .4s; }
.studio .rv.on { opacity: 1; transform: none; }

/* Counting numbers */
@property --num { syntax: '<integer>'; inherits: false; initial-value: 0; }
.num { --num: 0; counter-reset: num var(--num); font-weight: 400; transition: --num 1.2s var(--st-ease); }
.num::after { content: counter(num); }
.num.on, .on .num { --num: var(--to); }

/* Tables */
.st-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.st-table th, .st-table td { height: 31px; padding: 0 8px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; border-bottom: 1px solid var(--st-line); }
.st-table thead th { height: 28px; font-family: var(--mono); font-size: 9.5px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); }
.st-table tbody th { font-weight: 600; color: var(--st-text); }
.st-table td { font-family: var(--mono); font-size: 11.5px; color: var(--st-soft); }
.st-table tfoot td { height: 34px; border-bottom: 0; color: var(--st-text); font-weight: 600; }
.st-table tfoot tr.on td { background: rgba(215, 255, 63, .08); color: var(--st-lime); }

/* ---------- 00 Brief ---------- */
.v-brief { grid-template-rows: minmax(0, 1fr); place-items: center; padding: 24px; }
.brief { width: min(560px, 100%); padding: 28px 30px 30px; border: 1px solid var(--st-line-2); border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05); }
.brief-k { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--st-muted); }
.brief-k b { font-weight: 400; color: var(--st-lime); }
.brief-h { margin-top: 12px; font-size: 25px; font-weight: 640; font-stretch: 106%; line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.brief-p { margin-top: 12px; color: var(--st-soft); font-size: 13.5px; }
.brief-t { width: 100%; margin-top: 18px; border-collapse: collapse; }
.brief-t th, .brief-t td { padding: 8px 0; border-bottom: 1px solid var(--st-line); text-align: left; }
.brief-t th { font-weight: 500; color: var(--st-soft); }
.brief-t td { font-family: var(--mono); font-size: 12px; color: var(--st-muted); }
.brief-t td b { font-weight: 400; color: var(--st-lime); }
.brief-files { display: grid; gap: 6px; margin-top: 16px; }
.brief-files li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--st-line); border-radius: 9px; background: rgba(255, 255, 255, .02); font-family: var(--mono); font-size: 11.5px; }
.brief-files .ti { color: var(--st-muted); width: 15px; height: 15px; }
.brief-files small { margin-left: auto; color: var(--st-muted); }
.brief-facts { display: flex; gap: 26px; margin-top: 18px; }
.brief-facts li { display: grid; font-size: 12px; color: var(--st-muted); }
.brief-facts b { font-size: 27px; font-weight: 640; font-stretch: 108%; line-height: 1.1; letter-spacing: -.03em; color: var(--st-text); }
.brief-play { display: inline-flex; align-items: center; gap: 10px; height: 44px; margin-top: 22px; padding: 0 20px 0 15px; border: 0; border-radius: 999px; background: var(--st-lime); color: #0b0e0b !important; font-size: 14px; font-weight: 650; box-shadow: 0 12px 34px -12px rgba(215, 255, 63, .7); cursor: pointer; transition: background-color .25s, transform .25s; }
.brief-play:hover { background: #e6ff86; transform: translateY(-1px); }
.brief-play .i { width: 16px; height: 16px; fill: currentColor; stroke: none; }

/* ---------- 01 Search & Index ---------- */
.diff tr.chg.on { background: linear-gradient(90deg, rgba(255, 197, 77, .07), transparent 80%); }
.diff tr.add.on { background: linear-gradient(90deg, rgba(215, 255, 63, .07), transparent 80%); }
.diff th { width: 34%; }
.diff td:last-child { width: 72px; }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; }
.pill-chg { background: rgba(255, 197, 77, .13); color: var(--st-amber); }
.pill-add { background: rgba(215, 255, 63, .13); color: var(--st-lime); }
.pill-same { color: var(--st-muted); box-shadow: inset 0 0 0 1px var(--st-line-2); }
.query { display: flex; align-items: center; gap: 8px; height: 36px; margin-bottom: 12px; padding: 0 11px; border: 1px solid var(--st-line-2); border-radius: 9px; background: rgba(0, 0, 0, .28); font-family: var(--mono); font-size: 12px; color: var(--st-text); transition: border-color .3s; }
.query .ti { width: 15px; height: 15px; color: var(--st-muted); }
.q-text { display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .9s steps(11, end); }
.query.on { border-color: rgba(215, 255, 63, .45); }
.query.on .q-text { max-width: 11ch; }
.caret { width: 1.5px; height: 15px; margin-left: -6px; background: var(--st-lime); animation: st-blink 1s steps(1) infinite; }
.used-list { display: grid; gap: 6px; }
.used-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 5px 10px; padding: 8px 10px 9px; border-radius: 9px; background: rgba(255, 255, 255, .025); }
.used-list .ft { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--st-lime); }
.used-list .num { font-family: var(--mono); color: var(--st-text); }
.meter { display: block; grid-column: 1 / -1; height: 3px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .06); }
.meter b { display: block; height: 100%; background: var(--st-lime); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--st-ease) .15s; }
.used-list .rv.on .meter b { transform: scaleX(1); }
.used-list .used-total { grid-template-columns: auto minmax(0, 1fr); background: rgba(215, 255, 63, .08); color: var(--st-soft); }
.used-total .num { font-family: var(--sans); font-size: 22px; font-weight: 640; font-stretch: 108%; line-height: 1; color: var(--st-lime); }
.hits { display: grid; margin-top: 10px; }
.hits li { display: grid; gap: 1px; padding: 6px 2px; border-top: 1px dashed var(--st-line-2); font-family: var(--mono); font-size: 10.5px; }
.hits code { color: var(--st-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hits span { color: var(--st-muted); }

/* ---------- 02 Diagram Studio ---------- */
.insp .num { font-family: var(--mono); color: var(--st-text); letter-spacing: 0; }
.objs, .links { display: grid; gap: 3px; margin-bottom: 12px; }
.objs li { display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-areas: 'k tag' 'k d'; align-items: center; column-gap: 10px; padding: 3px 6px; border-radius: 8px; background: rgba(255, 255, 255, .02); }
.objs b { grid-area: k; display: grid; place-items: center; height: 24px; border: 1px solid rgba(215, 255, 63, .4); border-radius: 6px; font-family: var(--mono); font-size: 10px; font-weight: 400; color: var(--st-lime); }
.objs code { grid-area: tag; overflow: hidden; font-size: 11px; line-height: 1.3; color: var(--st-text); text-overflow: ellipsis; white-space: nowrap; }
.objs small { grid-area: d; font-size: 10.5px; line-height: 1.25; color: var(--st-muted); }
.links li { display: flex; align-items: center; gap: 7px; padding: 2px 6px; font-family: var(--mono); font-size: 11px; }
.links b { font-weight: 400; color: var(--st-text); }
.links i { font-style: normal; color: var(--st-lime); }
.links small { margin-left: auto; font-size: 10px; color: var(--st-muted); white-space: nowrap; }

/* The drawing lives once in the workspace and moves into the slot of the active view */
.st-drawing { position: absolute; z-index: 2; left: 0; top: 0; width: 0; height: 0; display: grid; grid-template-rows: 32px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--st-line-2); border-radius: 11px; background: #0a0e0b; opacity: 0; visibility: hidden;
  transition: left .8s var(--st-ease), top .8s var(--st-ease), width .8s var(--st-ease), height .8s var(--st-ease), opacity .45s var(--st-ease), visibility 0s linear .45s; }
.st-drawing.is-placed { opacity: 1; visibility: visible; transition-delay: 0s; }
.st-canvas-bar { display: flex; align-items: center; gap: 14px; padding: 0 12px; border-bottom: 1px solid var(--st-line); font-family: var(--mono); font-size: 10.5px; color: var(--st-muted); white-space: nowrap; overflow: hidden; }
.st-canvas-bar .zoom { margin-left: auto; }
.st-canvas-bar .rev { position: relative; color: var(--st-text); }
.st-canvas-bar .rev b { font-weight: 400; }
.st-canvas-bar .v-new { display: none; color: var(--st-lime); }
.st-drawing[data-rev="b"] .st-canvas-bar .v-old { display: none; }
.st-drawing[data-rev="b"] .st-canvas-bar .v-new { display: inline; }
.st-drawing .scd { display: block; width: 100%; height: 100%; padding: 6px 8px 8px; }
.st-drawing::after { content: ''; position: absolute; left: 0; right: 0; top: 32px; height: 70px; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent, rgba(215, 255, 63, .14) 85%, rgba(215, 255, 63, .7)); }
.st-drawing[data-detect]::after { animation: st-scan 1.7s var(--st-ease) both; }

.scd text { font-family: var(--mono); font-size: 10px; fill: #a9b2a5; letter-spacing: .02em; }
.scd .title { font-size: 12px; fill: #e9ede5; letter-spacing: .05em; }
.scd .fn { font-family: var(--sans); font-size: 14.5px; font-weight: 680; font-stretch: 106%; fill: #f1f4ee; letter-spacing: -.01em; }
.scd .tag { font-size: 10.5px; fill: #dde3d8; }
.scd .lbl { font-family: var(--sans); font-size: 12.5px; fill: #d4dacf; }
.scd .val { font-size: 12px; fill: #f1f4ee; }
.scd .small { font-size: 9.5px; fill: #8a9487; }
.scd .tiny { font-size: 8.5px; fill: #6f796c; }
.scd .zone-no { font-size: 8.5px; fill: #566053; }
.scd .zone-label { font-size: 9px; fill: #788275; letter-spacing: .12em; }
.scd .note { font-family: var(--sans); font-size: 11px; fill: #8a9487; }
.scd .det-label { font-size: 8.5px; fill: #0b0e0b; letter-spacing: .04em; }
.scd .frame { fill: none; stroke: rgba(236, 240, 230, .36); stroke-width: 1.2; }
.scd .zone { fill: rgba(255, 255, 255, .012); stroke: rgba(236, 240, 230, .16); stroke-width: 1; stroke-dasharray: 4 4; }
.scd .blk, .scd .ref, .scd .port, .scd .inst-circle { fill: #111712; stroke: rgba(236, 240, 230, .6); stroke-width: 1.2; }
.scd .act { fill: #1b231c; }
.scd .rule { fill: none; stroke: rgba(236, 240, 230, .35); stroke-width: 1; }
.scd .rule.faint { stroke: rgba(236, 240, 230, .1); }
.scd .sig { fill: none; stroke: rgba(236, 240, 230, .5); stroke-width: 1.2; transition: stroke .5s, stroke-width .5s; }
.scd > .sig { marker-end: url(#demo-scd-arrow); }
.scd .bin { stroke-dasharray: 5 3.5; }
.scd .proc { fill: none; stroke: rgba(236, 240, 230, .78); stroke-width: 2.4; }
.scd .inst { fill: none; stroke: rgba(236, 240, 230, .6); stroke-width: 1.3; }
.scd .arrowhead { fill: rgba(236, 240, 230, .7); }
.scd text, .scd .mark, .scd .add, .scd .det { transform-box: fill-box; }
.scd .mark { fill: rgba(215, 255, 63, .18); transform: scaleX(0); transform-origin: left center; transition: transform .7s var(--st-ease); }
[data-sheet][data-rev="b"] .scd .mark { transform: scaleX(1); }
.scd [data-param="delay"] .mark { transition-delay: .15s; }
.scd [data-param="priority"] .mark { transition-delay: .3s; }
.scd [data-param="pri2"] .mark { transition-delay: .45s; }
.scd .v-old, .scd .v-new { transition: opacity .45s var(--st-ease), transform .55s var(--st-ease); }
.scd .v-new { opacity: 0; transform: translateY(7px); fill: var(--st-lime); }
[data-sheet][data-rev="b"] .scd .v-old { opacity: 0; transform: translateY(-7px); }
[data-sheet][data-rev="b"] .scd .v-new { opacity: 1; transform: none; }
.scd .det { opacity: 0; transition: opacity .4s calc(var(--i) * 140ms); }
.scd .det rect:first-child { fill: rgba(215, 255, 63, .07); stroke: var(--st-lime); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .8s var(--st-ease) calc(var(--i) * 140ms); }
.scd .det-tag { fill: var(--st-lime); }
[data-sheet][data-detect] .scd .det { opacity: 1; }
[data-sheet][data-detect] .scd .det rect:first-child { stroke-dashoffset: 0; }
[data-sheet][data-trace] .scd .trace-ai, [data-sheet][data-trace] .scd .trace-pv, [data-sheet][data-trace] .scd .trace-wh { stroke: var(--st-lime); stroke-width: 2.4; }
.scd .trace-pv { transition-delay: .35s; }
.scd .trace-wh { transition-delay: .7s; }
.scd .add { opacity: 0; transform: scale(.97); transform-origin: center; transition: opacity .6s var(--st-ease), transform .7s var(--st-ease); }
.scd .new { fill: rgba(215, 255, 63, .09); stroke: var(--st-lime); }
.scd .add .sig { stroke: rgba(215, 255, 63, .8); }
[data-sheet][data-qmon] .scd [data-add="qmon"], [data-sheet][data-evt] .scd [data-add="evt"] { opacity: 1; transform: none; }
.scd .cloud path:first-child { fill: none; stroke: var(--st-amber); stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--st-ease) .4s; }
.scd .cloud .rev-tri, .scd .cloud text { opacity: 0; transition: opacity .4s 1.4s; }
.scd .rev-tri { fill: var(--st-amber); stroke: none; }
.scd .cloud text { fill: #0b0e0b; }
[data-sheet][data-rev="b"] .scd .cloud path:first-child { stroke-dashoffset: 0; }
[data-sheet][data-rev="b"] .scd .cloud .rev-tri, [data-sheet][data-rev="b"] .scd .cloud text { opacity: 1; }

/* ---------- 03 Visio MCP ---------- */
.gate { display: inline-flex; align-items: center; gap: 8px; height: 27px; padding: 0 11px; border: 1px solid rgba(255, 197, 77, .35); border-radius: 999px; color: var(--st-amber); font-size: 11.5px; white-space: nowrap; transition: border-color .4s, color .4s; }
.gate i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.gate-ok { display: none; }
.gate.on { border-color: rgba(215, 255, 63, .45); color: var(--st-lime); }
.gate.on .gate-wait { display: none; }
.gate.on .gate-ok { display: inline; }
.console { background: #070908; }
.log { display: grid; gap: 2px; }
.studio .log .rv { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path .6s steps(28, end); }
.studio .log .rv.on { clip-path: inset(0 0 0 0); }
.log li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; font-family: var(--mono); font-size: 11.5px; }
.log li:nth-child(odd) { background: rgba(255, 255, 255, .018); }
.log .ln { font-size: 10px; color: #4a5348; }
.log code { overflow: hidden; color: var(--st-soft); text-overflow: ellipsis; white-space: nowrap; }
.log code b { font-weight: 400; color: var(--st-lime); }
.log code s { text-decoration: none; color: #f0d58d; }
.log .ok { padding: 1px 6px; border-radius: 4px; background: rgba(215, 255, 63, .1); font-size: 10px; color: var(--st-lime); opacity: 0; transition: opacity .3s .6s; }
.log .on .ok { opacity: 1; }
.log-note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--st-line-2); font-size: 11.5px; color: var(--st-muted); }

/* ---------- 04 SCD Copy ---------- */
.gen th:first-child { width: 52px; }
.gen th:last-child, .gen td:last-child { width: 86px; }
.gen tbody tr { height: 30px; }
.prog { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .07); }
.prog b { display: block; height: 100%; background: var(--st-lime); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--st-ease) .1s; }
.gen .rv.on .prog b { transform: scaleX(1); }
.thumb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--st-line-2); border-radius: 7px; background: #0c110d; opacity: 0; transform: scale(.88); transition: opacity .4s var(--st-ease), transform .55s var(--st-ease), border-color .5s; }
.thumb.on { opacity: 1; transform: none; border-color: rgba(215, 255, 63, .35); }
.thumb i { position: absolute; inset: 14% 12% 36%;
  background: linear-gradient(rgba(236, 240, 230, .35), rgba(236, 240, 230, .35)) 0 0 / 34% 46% no-repeat, linear-gradient(rgba(215, 255, 63, .6), rgba(215, 255, 63, .6)) 46% 0 / 26% 18% no-repeat,
  linear-gradient(rgba(236, 240, 230, .25), rgba(236, 240, 230, .25)) 46% 60% / 54% 2px no-repeat, linear-gradient(rgba(236, 240, 230, .25), rgba(236, 240, 230, .25)) 46% 30% / 54% 2px no-repeat,
  linear-gradient(rgba(236, 240, 230, .45), rgba(236, 240, 230, .45)) 0 100% / 100% 2px no-repeat; }
.thumb b { position: absolute; left: 7px; bottom: 5px; font-family: var(--mono); font-size: 9.5px; font-weight: 400; color: var(--st-soft); }
.thumb.on::after { content: ''; position: absolute; right: 6px; bottom: 7px; width: 7px; height: 4px; border-left: 1.5px solid var(--st-lime); border-bottom: 1.5px solid var(--st-lime); transform: rotate(-45deg); }
.thumb-note { margin-top: 12px; font-size: 11.5px; color: var(--st-muted); }

/* ---------- 05 Validation ---------- */
.mx th:first-child { width: 58px; }
.mx td { text-align: center; }
.mx thead th:not(:first-child) { text-align: center; }
.mx tbody tr { height: 30px; }
.mx th, .mx td { height: 30px; }
.cell { display: inline-block; width: 30px; height: 15px; border-radius: 4px; background: rgba(255, 255, 255, .06); vertical-align: middle; transition: background-color .3s calc(var(--c) * 70ms), box-shadow .3s; }
.mx .rv.on .cell { background: rgba(215, 255, 63, .7); }
.mx .rv.on .cell.bad { background: var(--st-red); box-shadow: 0 0 14px rgba(255, 110, 90, .65); }
.mx .rv.fixed .cell.bad { background: rgba(215, 255, 63, .7); box-shadow: 0 0 14px rgba(215, 255, 63, .5); }
.mx tr.flag { background: rgba(255, 110, 90, .08); }
.mx tr.flag.fixed { background: rgba(215, 255, 63, .06); }
.score { font-family: var(--mono); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--st-soft); opacity: 0; transition: opacity .3s; }
.score b { font-size: 18px; font-weight: 400; color: var(--st-text); }
.score .s2 { display: none; }
.score.on { opacity: 1; }
.v-validate.is-fixed .score .s1 { display: none; }
.v-validate.is-fixed .score .s2 { display: inline; color: var(--st-lime); }
.fault, .src, .fix, .pass, .clean { margin-bottom: 10px; opacity: 0; transform: translateY(8px); transition: opacity .45s var(--st-ease), transform .55s var(--st-ease); }
.fault.on, .src.on, .fix.on, .pass.on, .clean.on { opacity: 1; transform: none; }
.fault { padding: 12px; border: 1px solid rgba(255, 110, 90, .42); border-radius: 10px; background: rgba(255, 110, 90, .08); }
.fault-k { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #ff9b8c; }
.fault-k i { width: 7px; height: 7px; border-radius: 50%; background: var(--st-red); box-shadow: 0 0 10px var(--st-red); }
.fault-v { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 10px; font-family: var(--mono); font-size: 12px; }
.fault-v code:first-child { color: #ff9b8c; }
.fault-v span { color: var(--st-muted); }
.fault .st-btn { height: 28px; font-size: 12px; }
.src { padding: 10px 10px 8px; border: 1px solid var(--st-line-2); border-radius: 10px; background: #070908; }
.src-h { display: flex; justify-content: space-between; margin-bottom: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--st-muted); }
.src-t { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 10.5px; }
.src-t td { padding: 4px 6px; color: var(--st-muted); white-space: nowrap; }
.src-t td:first-child { width: 20px; color: #4a5348; }
.src-t tr.hit td { background: rgba(255, 197, 77, .1); color: var(--st-text); }
.src-t td.bad { box-shadow: inset 0 0 0 1px var(--st-red); color: #ff9b8c; }
.v-validate.is-fixed .src-t td.bad { box-shadow: inset 0 0 0 1px var(--st-lime); color: var(--st-lime); }
.fix { padding: 10px 12px; border: 1px solid rgba(215, 255, 63, .35); border-radius: 10px; background: rgba(215, 255, 63, .06); font-size: 11.5px; color: var(--st-soft); }
.fix p:first-child { margin-bottom: 4px; font-family: var(--mono); font-size: 12px; }
.clean { padding: 12px; border: 1px solid var(--st-line-2); border-radius: 10px; font-size: 12px; color: var(--st-soft); }
.pass { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: 11px; background: var(--st-lime); color: #0b0e0b; font-size: 12.5px; font-weight: 600; box-shadow: 0 16px 40px -16px rgba(215, 255, 63, .7); }
.pass b { font-size: 24px; font-weight: 680; font-stretch: 110%; letter-spacing: -.02em; line-height: 1; }

/* ---------- 06 Delivery ---------- */
.tree { display: grid; gap: 7px; }
.tree li { display: grid; grid-template-columns: 17px auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--st-line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.tree .ti { color: var(--st-lime); }
.tree b { font-weight: 620; }
.tree span { overflow: hidden; font-size: 12px; color: var(--st-muted); text-overflow: ellipsis; white-space: nowrap; }
.tree em { min-width: 26px; padding: 2px 7px; border-radius: 6px; background: rgba(215, 255, 63, .1); font-family: var(--mono); font-size: 11px; font-style: normal; text-align: center; color: var(--st-lime); }
.tree li.on { border-color: rgba(215, 255, 63, .22); }
.hmi { background: linear-gradient(180deg, #0d1513, #0a110f); }
.hmi-bar { display: flex; justify-content: space-between; margin-bottom: 10px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: #6f8a80; }
.hmi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hmi-tile { position: relative; display: grid; gap: 1px; overflow: hidden; padding: 7px 9px 10px; border: 1px solid rgba(111, 224, 184, .16); border-radius: 7px; background: #101b17; opacity: 0; transform: scale(.94); transition: opacity .35s var(--st-ease), transform .45s var(--st-ease); }
.hmi-tile.on { opacity: 1; transform: none; }
.hmi-tile b { font-family: var(--mono); font-size: 9.5px; font-weight: 400; color: #7d998f; }
.hmi-tile em { font-family: var(--mono); font-size: 13.5px; font-style: normal; color: #a6f3d6; }
.hmi-tile small { font-family: var(--mono); font-size: 9px; color: #6a8279; }
.hmi-tile i { position: absolute; left: 0; bottom: 0; width: calc(var(--p) * 100%); height: 2px; background: #6fe0b8; box-shadow: 0 0 8px #6fe0b8; }
.package { position: absolute; z-index: 5; left: 50%; top: 52%; width: min(440px, calc(100% - 40px)); padding: 26px 28px 28px; border: 1px solid rgba(215, 255, 63, .5); border-radius: 18px; background: rgba(11, 15, 12, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 0 6px rgba(215, 255, 63, .05), 0 50px 90px -30px rgba(0, 0, 0, .95), 0 0 90px -20px rgba(215, 255, 63, .35); opacity: 0; transform: translate(-50%, -42%) scale(.94); transition: opacity .6s var(--st-ease), transform .9s var(--st-ease); pointer-events: none; }
.package.on { opacity: 1; transform: translate(-50%, -50%); }
.package-k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--st-lime); }
.package-h { margin-top: 10px; font-size: 32px; font-weight: 650; font-stretch: 108%; line-height: 1; letter-spacing: -.045em; }
.package-v { margin-top: 16px; font-family: var(--mono); font-size: 11.5px; color: var(--st-soft); }

/* ---------- File jobs ---------- */
.srcfiles { display: grid; gap: 8px; }
.srcfile { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 2px 10px; padding: 10px 11px; border: 1px solid var(--st-line); border-radius: 10px; background: rgba(255, 255, 255, .02); opacity: 0; transform: translateX(-10px); transition: opacity .4s var(--st-ease), transform .5s var(--st-ease), border-color .4s; }
.srcfile.on { opacity: 1; transform: none; border-color: var(--st-line-2); }
.srcfile .ti { grid-row: span 3; color: var(--st-lime); width: 16px; height: 16px; }
.sf-name { overflow: hidden; font-family: var(--mono); font-size: 11.5px; color: var(--st-text); text-overflow: ellipsis; white-space: nowrap; }
.srcfile small { font-size: 11px; color: var(--st-muted); }
.sf-cols { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.sf-cols i { padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .05); font-family: var(--mono); font-size: 9.5px; font-style: normal; color: var(--st-soft); }
.checked tr.tone-pass.on td:last-child { color: var(--st-lime); }
.checked tr.tone-warn.on { background: linear-gradient(90deg, rgba(255, 197, 77, .08), transparent 85%); }
.checked tr.tone-warn.on td:last-child { color: var(--st-amber); }
.final tr.tone-pass.on td:last-child { color: var(--st-lime); }
.final tr.tone-warn.on td:last-child { color: var(--st-amber); }
.tally { display: grid; gap: 8px; margin-bottom: 14px; }
.tally li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 9px 10px; border-radius: 9px; background: rgba(255, 255, 255, .025); font-size: 12px; color: var(--st-soft); }
.tally .num { font-family: var(--mono); font-size: 16px; color: var(--st-lime); }
.tally .warn .num { color: var(--st-amber); }
.tally .warn .meter b { background: var(--st-amber); }
.tally.on .meter b { transform: scaleX(var(--p)); }
.exc { display: grid; gap: 4px; }
.exc li { display: grid; gap: 1px; padding: 7px 9px; border-left: 2px solid var(--st-amber); border-radius: 0 7px 7px 0; background: rgba(255, 197, 77, .05); font-size: 11.5px; }
.exc b { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--st-text); }
.exc span { overflow: hidden; color: var(--st-muted); text-overflow: ellipsis; white-space: nowrap; }
.exc-note { margin-top: 10px; font-family: var(--mono); font-size: 10.5px; color: var(--st-soft); }
.banner { padding: 18px 18px 20px; border: 1px solid rgba(215, 255, 63, .45); border-radius: 14px; background: radial-gradient(120% 100% at 0% 0%, rgba(215, 255, 63, .14), transparent 60%), #0d120e; opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .55s var(--st-ease), transform .7s var(--st-ease); }
.banner.on { opacity: 1; transform: none; box-shadow: 0 30px 60px -30px rgba(215, 255, 63, .35); }
.banner-k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--st-lime); }
.banner-h { margin-top: 10px; font-size: 18px; font-weight: 640; font-stretch: 104%; line-height: 1.2; letter-spacing: -.02em; }
.banner-b { margin-top: 10px; font-size: 12.5px; color: var(--st-soft); }
.banner-note { margin-top: 14px; font-size: 12px; color: var(--st-muted); }

/* ---------- Shared pieces for the engineering jobs ---------- */
.prio { display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 5px; border-radius: 4px; font-family: var(--mono); font-size: 9.5px; font-style: normal; letter-spacing: .04em; }
.prio.p1 { background: rgba(255, 110, 90, .18); color: #ff8b79; box-shadow: inset 0 0 0 1px rgba(255, 110, 90, .45); }
.prio.p2 { background: rgba(255, 197, 77, .14); color: var(--st-amber); box-shadow: inset 0 0 0 1px rgba(255, 197, 77, .4); }
.prio.p3 { background: rgba(120, 190, 255, .12); color: #8fc6ff; box-shadow: inset 0 0 0 1px rgba(120, 190, 255, .32); }
.prio.pu { color: var(--st-muted); box-shadow: inset 0 0 0 1px var(--st-line-2); }
.pill-miss { background: rgba(255, 110, 90, .14); color: #ff8b79; }
.note { margin-top: 12px; font-size: 11.5px; color: var(--st-muted); }
@property --ring { syntax: '<number>'; inherits: false; initial-value: 0; }
.ring { position: relative; display: grid; place-content: center; width: 132px; height: 132px; margin: 6px auto 14px; border-radius: 50%; text-align: center; --ring: 0; transition: --ring 1.4s var(--st-ease);
  background: conic-gradient(var(--st-lime) 0 calc(var(--a) * var(--ring) * 360deg), var(--st-amber) 0 calc(var(--b) * var(--ring) * 360deg), var(--st-red) 0 calc(var(--ring) * 360deg), rgba(255, 255, 255, .06) 0); }
.ring::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--st-panel); }
.ring b, .ring small { position: relative; }
.ring b { font-size: 24px; font-weight: 650; font-stretch: 108%; line-height: 1; }
.ring small { font-size: 11px; color: var(--st-muted); }
.on .ring, .ring.on, .match.on .ring { --ring: 1; }
.match-list { display: grid; gap: 6px; }
.match-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .025); font-size: 12px; color: var(--st-soft); }
.match-list b { font-family: var(--mono); font-weight: 400; color: var(--st-text); }
.sw { width: 10px; height: 10px; border-radius: 3px; }
.sw.ok { background: var(--st-lime); }
.sw.diff { background: var(--st-amber); }
.sw.miss { background: var(--st-red); }
.match .match-list li, .cmp-sum .match-list li, .match-note, .cmp-sum .ring { opacity: 0; transform: translateY(6px); transition: opacity .45s var(--st-ease), transform .55s var(--st-ease); }
.match.on .match-list li, .cmp-sum.on .match-list li, .match.on .match-note, .cmp-sum.on .ring { opacity: 1; transform: none; }
.match.on .match-list li:nth-child(2), .cmp-sum.on .match-list li:nth-child(2) { transition-delay: .12s; }
.match.on .match-list li:nth-child(3), .cmp-sum.on .match-list li:nth-child(3) { transition-delay: .24s; }
.match-note { margin-top: 12px; font-size: 11.5px; color: var(--st-muted); transition-delay: .4s; }
.cls-badge, .cons b, .punch b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 400; font-style: normal; }
.cls-a, .cons .cls-a b, .punch .cls-a b { background: rgba(255, 110, 90, .18); color: #ff8b79; }
.cls-b, .cons .cls-b b, .punch .cls-b b { background: rgba(255, 197, 77, .16); color: var(--st-amber); }
.cls-c, .cons .cls-c b { background: rgba(215, 255, 63, .14); color: var(--st-lime); }

/* ---------- Alarm review ---------- */
.hmi-alarms { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: linear-gradient(180deg, #0c1311, #0a100e); }
.flood { display: inline-flex; align-items: baseline; gap: 6px; }
.flood .num { font-family: var(--sans); font-size: 20px; font-weight: 650; font-stretch: 108%; letter-spacing: -.02em; color: #ff8b79; }
.flood em { font-style: normal; }
.alarm-list { display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 22%); mask-image: linear-gradient(transparent, #000 22%); }
.hmi-row { display: grid; flex: none; grid-template-columns: 40px 30px 92px minmax(0, 1fr); align-items: center; gap: 8px; max-height: 0; overflow: hidden; padding: 0 6px; border-radius: 4px; font-size: 11px; opacity: 0; transition: max-height .22s var(--st-ease), opacity .3s, background-color .8s; }
.hmi-row.on { max-height: 25px; padding-block: 3px; opacity: 1; background: rgba(255, 110, 90, .06); }
.hmi-row time, .hmi-row code { font-family: var(--mono); font-size: 10.5px; color: #8fb3a6; }
.hmi-row code { color: var(--st-text); }
.hmi-row span { overflow: hidden; color: #b6c8c0; text-overflow: ellipsis; white-space: nowrap; }
.hist { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); align-items: end; gap: 5px; height: 74px; margin-top: 10px; padding-top: 14px; border-top: 1px solid rgba(111, 224, 184, .12); }
.hist i { position: relative; display: block; height: 100%; }
.hist i::before { content: ''; position: absolute; left: 0; right: 0; bottom: 14px; height: calc((100% - 14px) * var(--h)); border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #ff8b79, rgba(255, 110, 90, .35)); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--st-ease); }
.hist i.on::before { transform: none; }
.hist b { position: absolute; left: 0; right: 0; bottom: calc(16px + (100% - 14px) * var(--h)); font-family: var(--mono); font-size: 9px; font-weight: 400; text-align: center; color: var(--st-soft); opacity: 0; transition: opacity .3s .3s; }
.hist i.on b { opacity: 1; }
.hist small { position: absolute; left: 0; right: 0; bottom: 0; font-family: var(--mono); font-size: 9px; text-align: center; color: var(--st-muted); }
.pareto { display: grid; gap: 4px; }
.pareto li { display: grid; grid-template-columns: 82px minmax(0, 1fr) 26px; grid-template-areas: 'tag text n' 'bar bar bar'; align-items: center; gap: 2px 8px; padding: 4px 6px 6px; border-radius: 7px; background: rgba(255, 255, 255, .02); }
.pareto code { grid-area: tag; font-size: 10.5px; color: var(--st-text); }
.pareto span { grid-area: text; overflow: hidden; font-size: 11px; color: var(--st-muted); text-overflow: ellipsis; white-space: nowrap; }
.pareto b { grid-area: n; font-family: var(--mono); font-size: 11px; font-weight: 400; text-align: right; color: var(--st-text); }
.pareto i { grid-area: bar; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #ff8b79, var(--st-amber)); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--st-ease) .1s; }
.pareto .on i { transform: scaleX(var(--w)); }
.pareto li:nth-child(n + 6) i { background: rgba(236, 240, 230, .3); }
.pareto-sum { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 110, 90, .08); font-size: 12px; color: var(--st-soft); opacity: 0; transform: translateY(6px); transition: opacity .45s var(--st-ease), transform .55s var(--st-ease); }
.pareto-sum.on { opacity: 1; transform: none; }
.pareto-sum b { flex: none; font-size: 22px; font-weight: 650; font-stretch: 108%; white-space: nowrap; color: #ff8b79; }
.mt th:first-child { width: 96px; }
.mt th:nth-child(3), .mt td:nth-child(3) { width: 64px; }
.mt th:nth-child(4), .mt td:nth-child(4) { width: 84px; }
.mt th:last-child { width: 86px; }
.mt tr.diff.on { background: linear-gradient(90deg, rgba(255, 197, 77, .07), transparent 85%); }
.mt tr.orphan.on { background: linear-gradient(90deg, rgba(255, 110, 90, .08), transparent 85%); }
.mt td { font-family: var(--sans); font-size: 11.5px; }
.matrix { display: grid; grid-template-columns: 78px repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 24px; }
.mh { align-self: end; padding: 0 4px 2px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--st-muted); }
.mh.mr { align-self: center; }
.mc { display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 10px; border-radius: 7px; background: rgba(255, 255, 255, .03); opacity: .35; transition: opacity .5s var(--st-ease), background-color .5s, box-shadow .5s; }
.mc b { font-family: var(--mono); font-size: 11px; font-weight: 400; }
.mc em { font-size: 15px; font-style: normal; font-weight: 650; color: var(--st-text); }
.mc.p1 b { color: #ff8b79; }
.mc.p2 b { color: var(--st-amber); }
.mc.p3 b { color: #8fc6ff; }
.matrix.on .mc { opacity: 1; }
.matrix.on .mc.p1 { background: rgba(255, 110, 90, .12); box-shadow: inset 0 0 0 1px rgba(255, 110, 90, .3); }
.matrix.on .mc.p2 { background: rgba(255, 197, 77, .1); box-shadow: inset 0 0 0 1px rgba(255, 197, 77, .26); }
.matrix.on .mc.p3 { background: rgba(120, 190, 255, .08); box-shadow: inset 0 0 0 1px rgba(120, 190, 255, .2); }
.dist p { display: grid; grid-template-columns: 112px minmax(0, 1fr) 64px; align-items: center; gap: 12px; margin-bottom: 13px; font-size: 11.5px; color: var(--st-soft); }
.dist p > b { font-family: var(--mono); font-size: 11px; font-weight: 400; text-align: right; color: var(--st-text); }
.bars { display: flex; height: 18px; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, .05); }
.bars i { width: calc(var(--w) * 1%); height: 100%; transition: width 1.1s var(--st-ease); }
.bars .p1 { background: #ff6e5a; }
.bars .p2 { background: var(--st-amber); }
.bars .p3 { background: #6fb2f5; }
.bars .pu { background: rgba(236, 240, 230, .3); }
.dist .after { opacity: .25; transition: opacity .5s; }
.dist .after .bars i { width: 0; }
.dist.on .after { opacity: 1; }
.dist.on .after .bars i { width: calc(var(--w) * 1%); }
.dist .dist-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 0; font-family: var(--mono); font-size: 9.5px; color: var(--st-muted); }
.dist-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dist-legend i { width: 9px; height: 9px; border-radius: 2px; }
.dist-legend em { margin-left: auto; font-style: normal; color: var(--st-soft); }
.rules { display: grid; gap: 6px; margin-bottom: 12px; }
.rule { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: 'n name' 'n detail'; align-items: center; column-gap: 10px; padding: 7px 10px; border-radius: 9px; background: rgba(255, 255, 255, .025); opacity: 0; transform: translateX(8px); transition: opacity .4s var(--st-ease), transform .5s var(--st-ease); }
.rule.on { opacity: 1; transform: none; }
.rule b { grid-area: n; display: grid; place-items: center; height: 30px; border-radius: 8px; background: rgba(215, 255, 63, .12); font-size: 14px; font-weight: 650; color: var(--st-lime); }
.rule span { grid-area: name; font-size: 12px; font-weight: 600; color: var(--st-text); }
.rule small { grid-area: detail; font-size: 11px; color: var(--st-muted); }
.rule.off.on { opacity: .45; }
.rule.off b { background: rgba(255, 255, 255, .05); color: var(--st-muted); }
.chatter { padding: 10px 10px 8px; border: 1px solid var(--st-line-2); border-radius: 10px; background: #080b09; opacity: 0; transform: translateY(8px); transition: opacity .45s var(--st-ease), transform .55s var(--st-ease); }
.chatter.on { opacity: 1; transform: none; }
.chatter-h { display: flex; gap: 8px; margin-bottom: 8px; font-size: 11px; }
.chatter-h code { font-size: 10.5px; color: var(--st-text); }
.chatter-h span { overflow: hidden; color: var(--st-muted); text-overflow: ellipsis; white-space: nowrap; }
.ticks { display: grid; grid-template-columns: 38px minmax(0, 1fr) 24px; align-items: center; gap: 8px; margin-bottom: 6px; font-family: var(--mono); font-size: 9.5px; color: var(--st-muted); }
.ticks b { font-weight: 400; text-align: right; color: var(--st-text); }
.track { position: relative; height: 16px; border-radius: 3px; background: rgba(255, 255, 255, .04); }
.track i { position: absolute; top: 2px; bottom: 2px; left: calc(var(--x) * 100%); width: max(2px, calc(var(--w) * 100%)); border-radius: 1px; background: #ff8b79; }
.tuned-row { opacity: .2; transition: opacity .5s; }
.tuned-row .track i { background: var(--st-lime); transform: scaleY(0); transition: transform .4s var(--st-ease) .2s; }
.chatter.tuned .tuned-row { opacity: 1; }
.chatter.tuned .tuned-row .track i { transform: none; }
.chatter-k { margin-top: 4px; font-size: 10.5px; color: var(--st-muted); }
.again .big { display: flex; align-items: center; gap: 22px; margin: 8px 0 14px; }
.again .big p { display: grid; }
.again .big .num { font-size: 46px; font-weight: 650; font-stretch: 110%; line-height: 1; letter-spacing: -.04em; color: #ff8b79; }
.again .big .after .num { color: var(--st-lime); }
.again .big span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); }
.again .big > i { font-size: 22px; font-style: normal; color: var(--st-muted); }
.again .num { --num: 0; }
.again.on .num { --num: var(--to); }
.hist.dual { height: 110px; }
.hist.dual i::before { background: rgba(255, 110, 90, .3); transform: none; }
.hist.dual i::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 14px; height: calc((100% - 14px) * var(--h2)); border-radius: 3px 3px 0 0; background: var(--st-lime); box-shadow: 0 0 12px rgba(215, 255, 63, .4); transform: scaleY(0); transform-origin: bottom; transition: transform .9s var(--st-ease); }
.again.on .hist.dual i::after { transform: none; }
.again.on .hist.dual i:nth-child(2n)::after { transition-delay: .1s; }
.again-k { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-family: var(--mono); font-size: 10.5px; color: var(--st-soft); }

/* ---------- Consequence analysis ---------- */
.arch .nd .box { fill: #111712; stroke: rgba(236, 240, 230, .6); stroke-width: 1.2; transition: fill .5s calc(var(--d, 0) * 260ms + 80ms), stroke .5s calc(var(--d, 0) * 260ms + 80ms); }
.arch .nd .twin { fill: #0e130f; stroke: rgba(236, 240, 230, .35); stroke-width: 1; }
.arch .nd-id { font-family: var(--sans); font-size: 13.5px; font-weight: 650; font-stretch: 104%; fill: #f1f4ee; letter-spacing: 0; }
.arch .nd-sub { font-size: 9px; fill: #8a9487; }
.arch .nd-sig { font-size: 9.5px; fill: #8a9487; }
.arch .nd-cn .box { stroke: rgba(236, 240, 230, .75); }
.arch .x { fill: none; stroke: #ff8b79; stroke-width: 2; opacity: 0; transition: opacity .3s .1s; }
.arch .bus { fill: none; stroke: rgba(236, 240, 230, .5); stroke-width: 2.4; transition: stroke .5s; }
.arch .bus-t { font-size: 9px; fill: #8a9487; letter-spacing: .1em; }
.arch .ln { fill: none; stroke: rgba(236, 240, 230, .45); stroke-width: 1.2; transition: stroke .5s .2s, stroke-dasharray .5s; }
.arch .tap { fill: rgba(236, 240, 230, .8); }
.arch .peer { fill: none; stroke: rgba(215, 255, 63, .7); stroke-width: 1.6; stroke-dasharray: 6 5; transition: stroke .5s .6s; }
.arch .peer-t { font-size: 9px; fill: #a9b2a5; }
.arch .lg { opacity: 0; }
.arch .legend text { font-size: 10px; fill: #8a9487; opacity: 0; transition: opacity .4s 1.6s; }
.arch .lg-a { fill: #ff6e5a; }
.arch .lg-b { fill: var(--st-amber); }
.arch .lg-c { fill: var(--st-lime); }
.arch .callout { opacity: 0; transform: translateY(6px); transform-box: fill-box; transition: opacity .5s calc(.4s + var(--k) * .5s), transform .6s calc(.4s + var(--k) * .5s); }
.arch .callout path { fill: none; stroke: var(--st-amber); stroke-width: 1.2; }
.arch .callout rect { fill: rgba(255, 197, 77, .14); stroke: var(--st-amber); stroke-width: 1; }
.arch .callout text { font-size: 10.5px; fill: #ffd98a; }
[data-sheet][data-marked] .arch .callout { opacity: 1; transform: none; }
[data-sheet][data-marked] .arch .lg, [data-sheet][data-marked] .arch .legend text { opacity: 1; transition: opacity .4s 1.6s; }
[data-sheet][data-sim] .arch .nd[data-impact="fail"] .box, [data-sheet][data-sim] .arch .nd[data-impact="lost"] .box { fill: rgba(255, 110, 90, .2); stroke: #ff6e5a; }
[data-sheet][data-sim] .arch .nd[data-impact="fail"] .x { opacity: 1; }
[data-sheet][data-sim] .arch .nd[data-impact="blind"] .box, [data-sheet][data-sim] .arch .nd[data-impact="cascade"] .box { fill: rgba(255, 197, 77, .16); stroke: var(--st-amber); }
[data-sheet][data-sim] .arch .nd[data-impact="degraded"] .box { stroke: rgba(255, 197, 77, .6); }
[data-sheet][data-sim] .arch .nd[data-impact="backup"] .box { fill: rgba(215, 255, 63, .1); stroke: var(--st-lime); }
[data-sheet][data-sim] .arch .nd[data-impact="cascade"] .box { stroke-dasharray: 5 4; }
[data-sheet][data-sim] .arch[data-failed="20-CN-02"] .ln[data-a="20-CN-02"], [data-sheet][data-sim] .arch[data-failed="20-CN-02"] .ln[data-a="IO-20C"] { stroke: #ff6e5a; stroke-dasharray: 4 4; }
[data-sheet][data-sim] .arch[data-failed="SW-A"] .bus-a { stroke: #ff6e5a; }
[data-sheet][data-sim] .arch[data-failed="SW-A"] .ln[data-a="20-CN-02"], [data-sheet][data-sim] .arch[data-failed="SW-A"] .ln[data-a="IO-20C"] { stroke: var(--st-amber); }
[data-sheet][data-sim] .arch[data-failed="SW-A"] .bus-b { stroke: var(--st-lime); }
[data-sheet][data-sim] .arch.cascade-lost .peer { stroke: #ff6e5a; }
.dep th:first-child { width: 104px; }
.dep th:nth-child(2) { width: 128px; }
.dep th:nth-child(3) { width: 56px; }
.dep tr.weak.on { background: linear-gradient(90deg, rgba(255, 110, 90, .08), transparent 85%); }
.cnt { display: grid; gap: 3px; }
.cnt i { height: 3px; border-radius: 2px; background: var(--st-lime); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--st-ease) .15s; }
.dep .on .cnt i { transform: scaleX(var(--w)); }
.dep-flow { display: grid; gap: 6px; margin-top: 14px; }
.dep-flow p { display: grid; grid-template-columns: 84px repeat(4, minmax(0, 1fr)); align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--st-muted); }
.dep-flow b { font-weight: 400; color: var(--st-text); }
.dep-flow span { position: relative; overflow: hidden; padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, .03); text-overflow: ellipsis; white-space: nowrap; }
.dep-flow span + span::before { content: '→'; position: absolute; left: -2px; color: var(--st-lime); opacity: .6; }
.dep-note { margin-top: 12px; padding: 10px 12px; border-left: 2px solid var(--st-lime); border-radius: 0 8px 8px 0; background: rgba(215, 255, 63, .05); font-size: 11.5px; color: var(--st-soft); opacity: 0; transition: opacity .5s; }
.dep-note.on { opacity: 1; }
.sim-node { padding: 2px 8px; border-radius: 5px; background: rgba(255, 110, 90, .14); font-size: 11px; letter-spacing: 0; text-transform: none; color: #ff8b79; }
.cons { display: grid; gap: 6px; margin-bottom: 12px; }
.cons li { display: grid; grid-template-columns: 22px minmax(0, 1fr); grid-template-areas: 'b text' 'b area'; column-gap: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, .025); }
.cons li b { grid-area: b; }
.cons li span { grid-area: text; font-size: 11.5px; line-height: 1.35; color: var(--st-text); }
.cons li small { grid-area: area; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--st-muted); }
.spof { padding: 10px 12px; border: 1px dashed rgba(255, 197, 77, .45); border-radius: 10px; opacity: 0; transition: opacity .5s; }
.spof.on { opacity: 1; }
.spof .st-ph { margin-bottom: 6px; }
.spof .st-ph b { font-size: 16px; font-weight: 650; color: var(--st-amber); }
.spof p:not(.st-ph) { display: flex; flex-wrap: wrap; gap: 6px; }
.spof code { padding: 2px 7px; border-radius: 5px; background: rgba(255, 197, 77, .12); font-size: 10.5px; color: #ffd98a; }
.spof small { display: block; margin-top: 6px; font-size: 10.5px; color: var(--st-muted); }
.page { background: #eef0e8; color: #141714; border-color: rgba(255, 255, 255, .2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.page .rv { transform: translateY(4px); }
.page-k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #5b6158; }
.page-h { margin: 6px 0 8px; font-size: 19px; font-weight: 680; font-stretch: 106%; line-height: 1.1; letter-spacing: -.02em; }
.page-cls { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; font-weight: 600; }
.page .cls-a { background: #ffd9d2; color: #b3321e; }
.page .cls-b { background: #ffeec2; color: #8a5a00; }
.page .cls-c { background: #e3f5b0; color: #4a6200; }
.page-list { display: grid; gap: 5px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(20, 23, 20, .12); }
.page-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 11.5px; line-height: 1.35; }
.page-actions { display: grid; gap: 4px; margin-top: 6px; padding-left: 18px; list-style: decimal; font-size: 11.5px; }
.page-actions li::marker { font-family: var(--mono); color: #5b6158; }

/* ---------- Loop check ---------- */
.loop .strong { fill: #f1f4ee; }
.loop > .sig { marker-end: none; }
.loop .trace { stroke: rgba(236, 240, 230, .55); stroke-width: 1.4; }
[data-sheet][data-trace] .loop .trace { stroke: var(--st-lime); stroke-width: 2.2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: st-draw 1.2s var(--st-ease) forwards; }
.loop .on-term { transition: fill .5s, stroke .5s; }
[data-sheet][data-trace] .loop .on-term { fill: rgba(215, 255, 63, .14); stroke: var(--st-lime); }
.loop .ch rect { fill: #0f1410; stroke: rgba(236, 240, 230, .2); }
.loop .on-ch rect { fill: rgba(215, 255, 63, .1); stroke: rgba(215, 255, 63, .6); }
.cmp3 th:first-child { width: 88px; }
.cmp3 th:last-child, .cmp3 td:last-child { width: 108px; }
.cmp3 td.bad { color: #ffd98a; background: rgba(255, 197, 77, .1); box-shadow: inset 0 0 0 1px rgba(255, 197, 77, .35); }
.cmp3 tr.diff.on th { color: var(--st-amber); }
.extract-note { font-size: 11.5px; color: var(--st-muted); }
.rack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px; border: 1px solid var(--st-line-2); border-radius: 10px; background: repeating-linear-gradient(90deg, #0c100d 0 2px, #0e130f 2px 4px); }
.card { padding: 10px 10px 14px; border: 1px solid rgba(236, 240, 230, .12); border-radius: 7px; background: #0a0e0b; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.card-h { display: flex; justify-content: space-between; margin-bottom: 8px; font-family: var(--mono); font-size: 9.5px; color: var(--st-muted); }
.card-h b { font-weight: 400; color: var(--st-text); }
.leds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 8px; }
.led { display: grid; grid-template-columns: 10px 16px minmax(0, 1fr); align-items: center; gap: 6px; font-family: var(--mono); font-size: 9.5px; color: var(--st-muted); }
.led i { width: 10px; height: 10px; border-radius: 50%; background: #1f261f; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); transition: background-color .25s, box-shadow .25s; }
.led small { color: #59625a; }
.led code { overflow: hidden; color: #9aa596; text-overflow: ellipsis; white-space: nowrap; }
.led.on[data-st="ok"] i { background: var(--st-lime); box-shadow: 0 0 8px rgba(215, 255, 63, .7); }
.led.on[data-st="doc"] i { background: var(--st-amber); box-shadow: 0 0 8px rgba(255, 197, 77, .7); }
.led.on[data-st="fail"] i { background: var(--st-red); box-shadow: 0 0 10px rgba(255, 110, 90, .9); }
.led.on[data-st="untested"] i { background: #3a423a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.led.on[data-st="fail"] code { color: #ff8b79; }
.led.on[data-st="doc"] code { color: #ffd98a; }
.rack-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 11.5px; color: var(--st-soft); opacity: 0; transition: opacity .5s; }
.rack-sum.on { opacity: 1; }
.rack-sum span { display: inline-flex; align-items: center; gap: 7px; }
.rack-sum i { width: 9px; height: 9px; border-radius: 50%; }
.rack-sum b { font-family: var(--mono); font-weight: 400; color: var(--st-text); }
.rack-sum [data-st="ok"] i { background: var(--st-lime); }
.rack-sum [data-st="doc"] i { background: var(--st-amber); }
.rack-sum [data-st="fail"] i { background: var(--st-red); }
.rack-sum [data-st="untested"] i { background: #3a423a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.ma { margin-bottom: 10px; padding: 6px; border: 1px solid var(--st-line); border-radius: 9px; background: #080b09; opacity: .25; transition: opacity .5s; }
.ma.on { opacity: 1; }
.ma-chart { width: 100%; height: auto; }
.ma-chart text { font-family: var(--mono); font-size: 8.5px; fill: #6f796c; }
.ma-chart .band { fill: rgba(215, 255, 63, .1); stroke: rgba(215, 255, 63, .35); stroke-dasharray: 3 3; }
.ma-chart .axis { stroke: rgba(236, 240, 230, .35); }
.ma-chart .grid { stroke: rgba(236, 240, 230, .07); }
.ma-chart .meas { fill: none; stroke: #ff8b79; stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--st-ease) .2s; }
.ma.on .meas { stroke-dashoffset: 0; }
.ma-chart .pt { fill: var(--st-lime); opacity: 0; transition: opacity .3s calc(.3s + var(--k) * .2s); }
.ma-chart .pt.out { fill: var(--st-red); }
.ma.on .pt { opacity: 1; }
.fails { display: grid; gap: 4px; }
.fails li { display: flex; justify-content: space-between; padding: 6px 9px; border-left: 2px solid var(--st-red); border-radius: 0 7px 7px 0; background: rgba(255, 110, 90, .06); font-size: 11.5px; }
.fails code { font-size: 11px; color: var(--st-text); }
.fails span { font-family: var(--mono); font-size: 10.5px; color: #ff8b79; }
.fails .none { border-color: var(--st-lime); background: rgba(215, 255, 63, .06); color: var(--st-soft); }
.punch { display: grid; gap: 6px; }
.punch li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, .025); }
.punch span { font-size: 11.5px; line-height: 1.35; color: var(--st-text); }
.punch small { font-family: var(--mono); font-size: 9.5px; color: var(--st-muted); }
.ready { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding: 12px; border: 1px solid rgba(255, 197, 77, .35); border-radius: 12px; background: rgba(255, 197, 77, .06); opacity: 0; transform: translateY(6px); transition: opacity .5s var(--st-ease), transform .6s var(--st-ease); }
.ready.on { opacity: 1; transform: none; }
.ready.yes { border-color: rgba(215, 255, 63, .45); background: rgba(215, 255, 63, .07); }
.ready p { font-size: 13px; font-weight: 600; color: var(--st-text); }
.gauge { position: relative; display: grid; flex: none; place-content: center; width: 78px; height: 78px; border-radius: 50%; text-align: center; --ring: 0; transition: --ring 1.4s var(--st-ease);
  background: conic-gradient(var(--st-lime) 0 calc(var(--p) * var(--ring) * 360deg), rgba(255, 255, 255, .07) 0); }
.gauge::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--st-panel); }
.gauge b, .gauge small { position: relative; }
.gauge b { font-size: 16px; font-weight: 650; line-height: 1; }
.gauge small { font-size: 9px; color: var(--st-muted); }
.ready.on .gauge { --ring: 1; }

@keyframes st-draw { to { stroke-dashoffset: 0; } }

/* ---------- Pointer ---------- */
.st-cursor { position: absolute; z-index: 30; left: 0; top: 0; width: 22px; height: 22px; pointer-events: none; opacity: 0; transition: transform .76s cubic-bezier(.5, .05, .2, 1), opacity .35s; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .65)); }
.st-cursor.on { opacity: 1; }
.st-cursor svg { display: block; width: 22px; height: 22px; transform-origin: 6px 4px; transition: transform .14s; }
.st-cursor path { fill: #fff; stroke: #0b0e0b; stroke-width: 1.3; stroke-linejoin: round; }
.st-cursor.down svg { transform: scale(.8); }
.st-cursor::before { content: ''; position: absolute; left: -9px; top: -8px; width: 28px; height: 28px; border: 2px solid var(--st-lime); border-radius: 50%; opacity: 0; transform: scale(.3); }
.st-cursor.down::before { animation: st-ripple .55s var(--st-ease); }

/* ---------- Caption and timeline ---------- */
.demo-caption { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 26px; }
.demo-tool { display: flex; align-items: center; gap: 13px; min-width: 0; }
.demo-mono { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid rgba(215, 255, 63, .35); border-radius: 13px; background: rgba(215, 255, 63, .08); color: var(--lime); }
.demo-mono .ti { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.demo-mono .ti path:only-child { fill: currentColor; stroke: none; }
.demo-tool-text { display: grid; min-width: 0; }
.demo-tool-text strong { overflow: hidden; font-size: 1.04rem; font-weight: 620; font-stretch: 104%; text-overflow: ellipsis; white-space: nowrap; }
.demo-tool-text small { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.demo-title { max-width: 66ch; min-height: 2.9em; font-size: clamp(1.05rem, 1.35vw, 1.24rem); line-height: 1.45; color: var(--text); text-wrap: pretty; }
.demo-io { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 26px; margin-top: 12px; font-family: var(--mono); font-size: .66rem; letter-spacing: .03em; color: var(--muted); }
.demo-io span { padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; }
.demo-io span:last-child { border-color: rgba(215, 255, 63, .4); color: var(--lime); }
.demo-io i { font-style: normal; }

.demo-rail { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: stretch; margin-top: 24px; }
.demo-play { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 999px; background: var(--lime); color: var(--ink) !important; font-size: .94rem; font-weight: 650; white-space: nowrap; transition: background-color .25s, box-shadow .4s; }
.demo-play:hover { background: var(--lime-hover); box-shadow: 0 14px 40px -14px var(--lime-glow); }
.demo-play .i { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 2.2; }
.demo-play .ic-pause { fill: none; }
.demo-play .ic-again { fill: none; }
.demo-play .ic-pause, .demo-play .ic-again, .demo-play[data-state="pause"] .ic-play, .demo-play[data-state="again"] .ic-play { display: none; }
.demo-play[data-state="pause"] .ic-pause, .demo-play[data-state="again"] .ic-again { display: inline; }
.demo-chapters { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; }
.demo-chapters button { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; height: 56px; padding: 0 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02); color: var(--muted); text-align: left; transition: border-color .3s, color .3s, background-color .3s; }
.demo-chapters button:hover { border-color: var(--line-3); color: var(--text); }
.ch-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.ch-bar b { display: block; width: 100%; height: 100%; background: var(--lime); box-shadow: 0 0 10px var(--lime); transform: scaleX(0); transform-origin: left; }
.demo-chapters .is-current .ch-bar b { animation: ch-fill var(--dur) linear forwards; }
.demo.is-paused .is-current .ch-bar b { animation-play-state: paused; }
.demo-chapters .is-done .ch-bar b { transform: scaleX(1); opacity: .4; box-shadow: none; }
.ch-mono { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 9px; transition: background-color .3s, border-color .3s, color .3s; }
.ch-mono .ti { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ch-text { display: grid; min-width: 0; }
.ch-name { overflow: hidden; font-size: .84rem; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.ch-verb { font-family: var(--mono); font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; }
.demo-chapters button.is-current { border-color: rgba(215, 255, 63, .5); background: rgba(215, 255, 63, .06); color: var(--text); }
.demo-chapters .is-current .ch-mono { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.demo-chapters button.is-done { color: var(--soft); }
.demo-chapters .is-done .ch-mono { border-color: rgba(215, 255, 63, .45); color: var(--lime); }
.demo-noscript { margin-top: 16px; color: var(--muted); }

/* Jumping and the final state: no transitions inside the workspace */
.demo.instant .studio *, .demo.instant .studio *::before, .demo.instant .studio *::after { transition: none !important; animation-duration: 0s !important; }
.demo.is-paused .studio *, .demo.is-paused .studio *::before, .demo.is-paused .studio *::after { animation-play-state: paused; }

/* Full screen */
.demo:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 3vh 4vw; overflow: auto; background: var(--bg); }
.demo:fullscreen .studio { height: min(74vh, 900px); }

@keyframes st-pulse { 50% { opacity: .45; } }
@keyframes st-blink { 50% { opacity: 0; } }
@keyframes st-press { 0% { transform: scale(1); } 30% { transform: scale(.93); box-shadow: 0 0 0 8px rgba(215, 255, 63, .22); } 100% { transform: none; } }
@keyframes st-ripple { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes st-scan { 0% { top: 32px; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: calc(100% - 70px); opacity: 0; } }
@keyframes ch-fill { to { transform: scaleX(1); } }

/* ---------- Responsive (container) ---------- */
@container demo (max-width: 1080px) {
  .st-body { grid-template-columns: 60px minmax(0, 1fr); }
  .st-side { align-items: center; padding: 14px 8px; }
  .st-side > .st-h, .st-name, .st-proj { display: none; }
  .st-tools li { grid-template-columns: 17px; justify-content: center; width: 40px; padding: 0; }
  .st-tools .st-dot { position: absolute; top: 6px; right: 5px; width: 6px; height: 6px; }
  .st-tools li[data-state="run"]::before { left: -8px; }
  .st-split { grid-template-columns: minmax(0, 1fr) 270px; }
  .st-split.batch { grid-template-columns: minmax(0, 1fr) 250px; }
  .st-split.ops { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
  .st-split.files-split { grid-template-columns: 240px minmax(0, 1fr); }
}
@container demo (max-width: 900px) {
  .st-chrome { grid-template-columns: minmax(0, 1fr) auto; }
  .st-search { display: none; }
  .st-files { display: none; }
  .gen th:nth-child(2), .gen td:nth-child(2) { display: none; }
  .demo-caption { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ch-text { display: none; }
  .demo-chapters button { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 0; }
}
@container demo (max-width: 680px) {
  .demo-top { flex-wrap: wrap; }
  .demo-jobs { order: 2; width: 100%; }
  .demo-actions { margin-left: auto; }
  .demo-btn { height: 42px; }
  .demo-full { width: 42px; }
  .studio { grid-template-rows: 40px minmax(0, 1fr) 28px; height: 660px; font-size: 12px; border-radius: 14px; }
  .st-chrome .st-path::before { margin-right: 6px; }
  .st-win { gap: 14px; }
  .st-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 46px minmax(0, 1fr); }
  .st-side { flex-direction: row; align-items: center; padding: 0 8px; border-right: 0; border-bottom: 1px solid var(--st-line); }
  .st-tools { display: flex; justify-content: space-between; width: 100%; }
  .st-tools li { width: 42px; height: 34px; }
  .st-tools li[data-state="run"]::before { left: 9px; right: 9px; top: auto; bottom: -6px; width: auto; height: 2px; border-radius: 2px; }
  .st-bar { gap: 10px; height: 48px; padding: 0 10px 0 12px; }
  .st-title span { display: none; }
  .gate { padding: 0 8px; font-size: 10.5px; }
  .gate span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .st-btn { height: 30px; padding: 0 12px; font-size: 12px; }
  .st-split, .st-split.ops, .st-split.batch, .st-split.del, .st-split.files-split { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr); gap: 10px; padding: 10px; }
  .st-split.ops > .console { order: 2; }
  .st-panel { padding: 10px 11px; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
  .st-table th, .st-table td { height: 26px; padding: 0 6px; }
  .mx th, .mx td, .mx tbody tr, .gen tbody tr { height: 24px; }
  .st-table td { font-size: 10.5px; }
  .diff td:last-child, .diff th:last-child { display: none; }
  .gen th:nth-child(3), .gen td:nth-child(3) { display: none; }
  .thumb-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .thumb-note { display: none; }
  .hmi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .hmi-tile { padding: 5px 6px 7px; }
  .hmi-tile em { font-size: 11.5px; }
  .hmi-tile small { display: none; }
  .tree li { padding: 8px 10px; }
  .brief { padding: 20px 18px 22px; }
  .brief-h { font-size: 20px; }
  .brief-facts { gap: 18px; }
  .brief-facts b { font-size: 22px; }
  .used-list li { padding: 6px 9px 7px; }
  .package { padding: 20px; }
  .package-h { font-size: 25px; }
  .st-data { display: none; }
  .demo-title { min-height: 4.35em; }
  .demo-io { min-height: 58px; align-content: flex-start; }
  .demo-rail { grid-template-columns: minmax(0, 1fr); }
  .demo-play { justify-self: start; height: 50px; }
  .demo-chapters button { height: 46px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-cursor { display: none; }
  .caret, .st-tools li[data-state="run"] .st-dot, .studio.is-running .st-run i { animation: none; }
}
@container demo (max-width: 1080px) {
  .dep-flow p { grid-template-columns: 76px repeat(2, minmax(0, 1fr)); }
  .dep-flow span:nth-child(n + 4) { display: none; }
  .led code { display: none; }
  .led { grid-template-columns: 9px minmax(0, 1fr); }
}
@container demo (max-width: 680px) {
  .hmi-row { grid-template-columns: 34px 26px minmax(0, 1fr); }
  .hmi-row span { display: none; }
  .hist { height: 52px; gap: 3px; }
  .hist b { display: none; }
  .pareto li { grid-template-columns: 82px minmax(0, 1fr) 24px; }
  .pareto span { display: none; }
  .pareto code { grid-column: 1 / 3; }
  .pareto li:nth-child(n + 7) { display: none; }
  .mt th:nth-child(2), .mt td:nth-child(2) { display: none; }
  .matrix { grid-template-columns: 58px repeat(3, minmax(0, 1fr)); gap: 3px; margin-bottom: 10px; }
  .mc { height: 30px; padding: 0 7px; }
  .mc em { font-size: 13px; }
  .dist p { grid-template-columns: 78px minmax(0, 1fr) 46px; gap: 8px; }
  .dist-legend em { display: none; }
  .rule { padding: 5px 8px; }
  .rule b { height: 26px; font-size: 13px; }
  .chatter-h span { display: none; }
  .again .big { margin: 2px 0 8px; gap: 14px; }
  .again .big .num { font-size: 34px; }
  .hist.dual { height: 70px; }
  .ring { width: 96px; height: 96px; margin-bottom: 8px; }
  .ring b { font-size: 18px; }
  .dep th:nth-child(2), .dep td:nth-child(2), .dep th:nth-child(6), .dep td:nth-child(6) { display: none; }
  .dep-flow { display: none; }
  .cons li { padding: 6px 8px; }
  .page-h { font-size: 15px; }
  .page-list li, .page-actions { font-size: 10.5px; }
  .cmp3 th:last-child, .cmp3 td:last-child, .cmp3 th:nth-child(2), .cmp3 td:nth-child(2) { display: none; }
  .rack { gap: 5px; padding: 6px; }
  .card { padding: 6px 5px 7px; }
  .card-h span { display: none; }
  .leds { gap: 3px; }
  .led small { font-size: 8px; }
  .rack-sum { gap: 4px 10px; font-size: 10.5px; }
  .ma { margin-bottom: 6px; }
  .punch li { padding: 6px 8px; }
  .punch small { display: none; }
  .ready { padding: 8px; gap: 10px; margin-bottom: 8px; }
  .gauge { width: 62px; height: 62px; }
}
