:root {
  --bg: #eef1f5; --panel: #0B2A55; --card: #ffffff; --card-2: #f3f5f9; --line: #e1e6ed; --line-2: #cfd7e2;
  --text: #17212f; --text-2: #4a5668; --muted: #7b8696; --brand: #0B3B75; --brand-600: #14539C;
  --sage: #1f5fbf; --sage-2: #5b93d6; --sage-bg: #dce8f8; --sage-ink: #12305a;
  --sand: #d9a866; --sand-bg: #f4e7d1; --sand-ink: #5a3b12;
  --lilac: #a493c7; --red: #c0392b; --red-bg: #fdecea; --ok-bg: #e3edfb;
  --radius: 14px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.55 "DM Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
.app { display: grid; grid-template-columns: 290px 1fr; height: 100vh; }

/* sidebar */
.side { --card: #123A6E; --card-2: #174683; --line: #1d3f70; --line-2: #2a5490; --text: #ffffff; --text-2: #d3e0f2; --muted: #8fa8cc; --sage: #8fbcf2;
  background: var(--panel); color: var(--text); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.logo { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.logo .bars { display: flex; gap: 3px; align-items: flex-end; height: 22px; } .logo .bars i { width: 5px; border-radius: 2px; background: var(--sage); }
.logo .bars i:nth-child(1) { height: 9px; opacity: .6; } .logo .bars i:nth-child(2) { height: 15px; opacity: .8; } .logo .bars i:nth-child(3) { height: 22px; }
.logo b { font-size: 16px; } .logo span { display: block; font-size: 11.5px; color: var(--muted); }
.side .new { margin: 0 14px 10px; }
.search { margin: 0 14px 10px; }
.tree { overflow-y: auto; overflow-x: hidden; padding: 0 8px 12px; flex: 1; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.tree:hover { scrollbar-color: rgba(255,255,255,.18) transparent; }
.tree::-webkit-scrollbar { width: 6px; } .tree::-webkit-scrollbar-track { background: transparent; }
.tree::-webkit-scrollbar-button { display: none; height: 0; }
.tree::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; } .tree:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }
.tree .grp { font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted); margin: 12px 10px 4px; }
.tree details > summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; color: var(--text-2); display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.tree details > summary::-webkit-details-marker { display: none; }
.tree details > summary::before { content: "›"; color: var(--muted); width: 10px; transition: transform .15s; }
.tree details[open] > summary::before { transform: rotate(90deg); }
.tree summary:hover, .tree a:hover { background: var(--card); }
.tree .code { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tree .occ { padding-left: 14px; } .tree .occ > summary { font-size: 13px; }
.tree a { display: block; color: var(--text-2); text-decoration: none; padding: 5px 10px 5px 34px; border-radius: 8px; font-size: 13px; }
.tree a.on { background: var(--card-2); color: var(--text); }
.side-foot { border-top: 1px solid var(--line); padding: 10px 14px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.side-foot a { color: var(--text-2); }

/* main */
main { min-width: 0; overflow: auto; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 28px 0; }
.head h1 { margin: 0; font-size: 22px; font-weight: 650; } .head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.chip.sage { background: var(--ok-bg); border-color: #bcd3f2; color: #1b4f9c; } .chip.sand { background: #fbf1e2; border-color: #ecd3a8; color: #8a5a17; } .chip.red { background: var(--red-bg); border-color: #f3c1bc; color: #b42318; }
.tabs { display: flex; gap: 8px; padding: 16px 28px 0; flex-wrap: wrap; }
.tab { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--text-2); cursor: pointer; font-weight: 550; }
.tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.body { padding: 18px 28px 40px; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16,24,40,.04); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.card h2 { margin: 0 0 10px; font-size: 15.5px; font-weight: 650; } .card h3 { margin: 0 0 6px; font-size: 14px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.stat .v { font-size: 24px; font-weight: 700; } .stat .l { color: var(--muted); font-size: 12.5px; }
.rows .r { display: flex; gap: 12px; padding: 9px 0; align-items: flex-start; border-bottom: 1px solid var(--line); } .rows .r:last-child { border-bottom: 0; }
.ic { width: 30px; height: 30px; border-radius: 8px; background: var(--card-2); display: grid; place-items: center; flex: none; color: var(--sage); font-size: 14px; }
.rows .k { font-weight: 600; } .rows .d { color: var(--text-2); font-size: 13.5px; }
button.btn { padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--text); cursor: pointer; white-space: nowrap; }
button.btn:hover { border-color: var(--muted); } button.btn:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 650; } button.primary:hover { background: var(--brand-600); }
.side button.btn { background: var(--card); color: var(--text); }
.side button.primary { background: #fff; border-color: #fff; color: var(--panel); box-shadow: 0 1px 2px rgba(0,0,0,.15); } .side button.primary:hover { background: #e8f0fb; border-color: #e8f0fb; }
button.ghost { background: transparent; } button.danger { color: #b42318; border-color: #f3c1bc; background: #fff; }
button.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
input, select, textarea { background: #fff; border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, .pm:focus-visible { outline: 2px solid var(--sage); outline-offset: 1px; }
.side input, .side select { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff; } .side input::placeholder { color: #9fb4d3; }
.side input:focus { outline: 2px solid rgba(255,255,255,.35); outline-offset: 0; }
textarea { min-height: 84px; resize: vertical; }
label.f { display: block; font-size: 12.5px; color: var(--text-2); margin: 10px 0 4px; font-weight: 550; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--muted); font-weight: 550; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td input, td textarea { padding: 6px 8px; font-size: 13px; } td textarea { min-height: 40px; }
.err { color: var(--red); font-size: 13px; margin-top: 6px; min-height: 18px; }
.mono { font-family: var(--mono); font-size: 12px; }

/* home */
.hero { max-width: 980px; margin: 0 auto; padding: 36px 28px; }
.hero h1 { font-size: 28px; margin: 0 0 6px; } .hero p.lead { color: var(--text-2); margin: 0 0 22px; }
.hero { max-width: 760px; }
.spec { padding: 22px 24px; }
.spec label.f:first-child { margin-top: 0; font-size: 14px; color: var(--text); }
input.big { font-size: 17px; padding: 12px 14px; }
.matches .match { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; margin-top: 6px; text-decoration: none; color: var(--text); font-size: 14px; }
.matches .match:hover { border-color: var(--sage); background: var(--ok-bg); }
.matches .code { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; margin-top: 14px; color: var(--sage); font-weight: 550; cursor: pointer; font-size: 13.5px; }
.linkbtn:hover { text-decoration: underline; }
#stepsBox textarea { margin-top: 10px; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
a.chip.ex { text-decoration: none; background: #fff; padding: 5px 12px; font-size: 13px; color: var(--text-2); } a.chip.ex:hover { border-color: var(--sage); color: var(--sage); }

/* process editor */
.editor { display: grid; grid-template-columns: 1fr 300px; gap: 14px; }
.canvas { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius); height: 560px; position: relative; overflow: hidden; }
.canvas .hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--muted); pointer-events: none; }
.canvas .mode { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: var(--sand-bg); color: var(--sand-ink); padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; display: none; }
.canvas .mode.show { display: block; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.toolbar .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
svg.pm { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; user-select: none; }
svg.pm.panning { cursor: grabbing; }
.pm-node { cursor: pointer; } .pm-node .shape { stroke-width: 1.5; transition: filter .15s; }
.pm-node.sel .shape { stroke: var(--brand) !important; stroke-width: 2.5; } .pm-node.src .shape { stroke: var(--sand) !important; stroke-width: 3; stroke-dasharray: 5 3; }
.pm-node.on .shape { filter: drop-shadow(0 0 8px rgba(31,95,191,.6)); stroke: var(--brand) !important; stroke-width: 2.5; }
.pm-node.bad .shape { stroke: var(--red) !important; stroke-width: 2.5; }
.t-agent .shape { fill: var(--sage-bg); stroke: #86ade0; } .pm-label { font-size: 13px; font-weight: 600; text-anchor: middle; fill: var(--sage-ink); pointer-events: none; }
.pm-owner { font-size: 11px; text-anchor: middle; fill: #4f6a8f; pointer-events: none; }
.t-human .shape { fill: var(--sand-bg); stroke: #c99a5b; } .t-human .pm-label { fill: var(--sand-ink); } .t-human .pm-owner { fill: #8a6232; }
.t-decision .shape { fill: #ece6f5; stroke: var(--lilac); } .t-decision .pm-label { fill: #3b2d5c; } .t-decision .pm-owner { fill: #6b5c8f; }
.t-start .shape, .t-end .shape { fill: #e6ebf2; stroke: #a3afbf; } .t-start .pm-label, .t-end .pm-label { fill: #25303f; }
.pm-lock { fill: #d0683c; }
.pm-edge { cursor: pointer; } .pm-edge .hit { stroke: transparent; stroke-width: 14; fill: none; } .pm-edge .line { stroke: #8796ab; stroke-width: 1.6; fill: none; }
.pm-edge.sel .line { stroke: var(--brand); stroke-width: 2.4; } .pm-elabel { font-size: 12px; fill: #4a5668; font-weight: 600; }
.inspector .empty { color: var(--muted); font-size: 13px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-2); vertical-align: -2px; margin-right: 5px; }
.tools-list label { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 2px 0; } .tools-list input { width: auto; }

/* checks, runs */
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); } .check:last-child { border-bottom: 0; }
.dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; margin-top: 1px; }
.dot.ok { background: var(--ok-bg); color: var(--sage); } .dot.no { background: var(--red-bg); color: var(--red); }
.log { font-size: 13px; max-height: 420px; overflow: auto; } .log div { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.log .h { color: #9a6a1f; } .log .x { color: #b42318; } .log .a { color: #1b4f9c; }
.skill h3 { display: flex; justify-content: space-between; align-items: center; }
.skill ol { margin: 6px 0 10px 18px; padding: 0; color: var(--text-2); } .skill li { margin: 2px 0; }
.ask { background: var(--sand-bg); color: var(--sand-ink); border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
.ask b { display: block; margin-bottom: 8px; } .ask button.btn { background: #fff8ec; color: var(--sand-ink); border-color: #d7b27a; }
.ask button.primary { background: var(--sage-2); color: #fff; border-color: var(--sage-2); }
#toast { position: fixed; right: 18px; bottom: 18px; background: var(--text); color: var(--bg); padding: 9px 14px; border-radius: 9px; font-size: 13.5px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 10; }
#toast.show { opacity: 1; }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--line-2); border-top-color: var(--sage); border-radius: 50%; animation: s .8s linear infinite; vertical-align: -2px; }
@keyframes s { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; height: auto; } .side { max-height: 340px; } .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* modals */
.modal { position: fixed; inset: 0; background: rgba(11,42,85,.35); display: grid; place-items: center; z-index: 20; padding: 20px; }
.sheet { background: #fff; border-radius: 14px; padding: 20px 22px; width: min(620px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 50px rgba(11,42,85,.25); }
.sheet h2 { margin: 0 0 8px; font-size: 18px; }
.sheet a.btn { text-decoration: none; display: inline-block; color: var(--text); padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font-size: 14px; }
.sheet a.btn:hover { border-color: var(--muted); } .sheet a.btn.ghost { background: transparent; }
.sheet a.btn.primary { background: var(--brand); border-color: var(--brand); }
.sheet a.btn.primary { color: #fff; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* public results page */
.pub { max-width: 1100px; margin: 0 auto; padding: 30px 28px 50px; }
.pub .eyebrow { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--sage); font-weight: 650; }
.pub h1 { font-size: 34px; margin: 6px 0 4px; color: var(--brand); letter-spacing: -.6px; }
.pub-task { font-size: 18px; font-weight: 600; margin-bottom: 18px; }
.pub-grid { grid-template-columns: 1.3fr 1fr 0.8fr; }
.verdict { border-left: 4px solid var(--sage); } .verdict.t-s { border-left-color: var(--sand); } .verdict.t-a { border-left-color: var(--lilac); }
.vl { font-size: 22px; font-weight: 700; color: var(--brand); margin: 4px 0 6px; }
ul.plain { margin: 8px 0 0; padding: 0 0 0 18px; } ul.plain li { margin: 4px 0; font-size: 13.5px; }
.pub-cta { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--ok-bg); border-color: #bcd3f2; }
@media (max-width: 900px) { .pub-grid { grid-template-columns: 1fr; } }

.spec textarea.big { font-size: 17px; padding: 13px 15px; min-height: 0; resize: none; line-height: 1.45; }
.specbar { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 10px; align-items: center; }
.specbar #f_occ_other { grid-column: 1; grid-row: 2; }
.specbar select, .specbar input { font-size: 13.5px; padding: 7px 10px; }
select.guess { border-color: #bcd3f2; background-color: var(--ok-bg); }
.spec-foot { justify-content: space-between; margin-top: 6px; }
.linkbtn.inline { margin: 0; font-size: 13px; }
@media (max-width: 640px) { .specbar { grid-template-columns: 1fr; } .specbar #f_occ_other { grid-row: auto; } }

/* deploy */
.warn { background: #fbf1e2; border: 1px solid #ecd3a8; color: #6b4614; border-radius: 9px; padding: 9px 12px; font-size: 13.5px; }
.warn a { color: inherit; font-weight: 600; }
.okline { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
pre.code { background: #0B2A55; color: #e6eef9; border-radius: 10px; padding: 14px 16px; font-size: 12.5px; line-height: 1.6; overflow: auto; margin: 0; white-space: pre; }
table.tree-t td { padding: 6px 8px; } table.tree-t td.mono { white-space: nowrap; color: var(--brand); }

/* ---------- premium polish (Forage-inspired) ---------- */
.card { border-color: #e6eaf0; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.04); }
.head { padding: 26px 32px 0; align-items: flex-end; }
.head-l { min-width: 0; }
.crumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.crumb a { color: var(--sage); text-decoration: none; font-weight: 600; } .crumb .ti { font-size: 13px; }
.head h1 { font-size: 30px; letter-spacing: -.6px; color: var(--brand); font-weight: 700; line-height: 1.15; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; color: var(--text-2); font-size: 13.5px; }
.meta .ti { color: var(--sage); font-size: 16px; vertical-align: -3px; }
.head-r { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.head-r > .btn.primary { padding: 11px 20px; font-size: 15px; border-radius: 11px; }
.btn .ti { font-size: 16px; vertical-align: -3px; }
.tabs { padding: 20px 32px 0; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 32px; padding-left: 0; padding-right: 0; }
.tab { border: 0; border-radius: 0; background: none; padding: 10px 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab .ti { font-size: 16px; vertical-align: -3px; margin-right: 2px; }
.tab:hover { color: var(--brand); }
.tab.on { background: none; color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }
.body { padding: 22px 32px 48px; }

/* gallery */
.gallery { max-width: 1100px; margin: 0 auto; padding: 4px 28px 50px; }
.gallery h2 { margin: 0; font-size: 22px; color: var(--brand); letter-spacing: -.3px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 16px; }
.simcard { background: #fff; border: 1px solid #e6eaf0; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 18px rgba(16,24,40,.05); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.simcard:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(11,42,85,.12); }
.simcard .cov { height: 112px; position: relative; }
.simcard .cov::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff); }
.simcard .tag { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); color: var(--brand); font: 700 11px/1 var(--mono); padding: 5px 8px; border-radius: 6px; }
.sc-b { padding: 4px 16px 16px; text-align: center; display: flex; flex-direction: column; flex: 1; }
.sc-t { font-weight: 700; font-size: 16px; color: var(--brand); line-height: 1.3; }
.sc-o { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sc-m { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--text-2); }
.sc-m .ti { color: var(--muted); font-size: 14px; vertical-align: -2px; }

/* simulation */
.sim-hero { padding: 26px 28px; background: linear-gradient(120deg, #fff 55%, #eef4fd); }
.sim-hero .eyebrow { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--sage); font-weight: 700; }
.sim-hero h2 { font-size: 26px; color: var(--brand); margin: 6px 0 6px; letter-spacing: -.4px; }
.sim-hero p { max-width: 640px; margin: 0; }
.sim-h { margin: 22px 0 10px; font-size: 16px; color: var(--brand); }
.scen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.scen { text-align: left; background: #fff; border: 1px solid #e6eaf0; border-radius: 14px; padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; font: inherit; color: var(--text); transition: border-color .15s, transform .15s; }
.scen:hover { border-color: var(--sage); transform: translateY(-2px); }
.scen-n { font-weight: 700; color: var(--brand); } .scen-t { font-size: 13px; color: var(--text-2); }
.scen-l { color: var(--sage); font-size: 14px; letter-spacing: -2px; } .scen-l .off { color: #cfd7e2; }
.scen-go { color: var(--sage); font-weight: 600; font-size: 13px; margin-top: 6px; }
.sim-play { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; }
.sim-rail { display: flex; flex-direction: column; min-height: 520px; }
.rail-t { font-weight: 700; color: var(--brand); margin: 2px 0 10px; }
ol.rail { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 2px; }
ol.rail li { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-radius: 9px; font-size: 13px; color: var(--muted); }
ol.rail li .ti { font-size: 15px; margin-top: 1px; }
ol.rail li.human, ol.rail li.decision { color: #8a6232; }
ol.rail li.now { background: var(--ok-bg); color: var(--brand); font-weight: 600; }
ol.rail li.done { color: var(--text-2); } ol.rail li.done .ti::before { content: "\ea5e"; color: #2f8f5b; }
#spd.on { background: var(--ok-bg); border-color: #bcd3f2; }
.sim-main { display: grid; gap: 14px; align-content: start; }
.scene { position: relative; padding: 18px; display: grid; gap: 16px; background: #fbfcfe; }
.lane-t { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.lane-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stn { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid #e1e6ed; background: #fff; min-width: 150px; transition: box-shadow .3s, border-color .3s, transform .3s; }
.stn .ti { font-size: 22px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.stn b { display: block; font-size: 13.5px; } .stn span { font-size: 11.5px; color: var(--muted); }
.stn.pp .ti { background: #fbf1e2; color: #a0681f; } .stn.ag .ti { background: #e3edfb; color: #1f5fbf; } .stn.sy .ti { background: #eef1f5; color: #4a5668; }
.stn.locked .ti { background: #fdecea; color: #b42318; }
.stn.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,95,191,.15); transform: translateY(-2px); }
.tok { position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(11,42,85,.35); transition: left .65s cubic-bezier(.5,0,.2,1), top .65s cubic-bezier(.5,0,.2,1); z-index: 2; }
.tok .ti { font-size: 16px; }
.cap { padding: 16px 18px; min-height: 104px; border-left: 4px solid var(--sage); }
.cap.you { border-left-color: var(--sand); background: #fffaf2; } .cap.warn { border-left-color: #d0683c; }
.cap-who { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; } .cap-who .ti { font-size: 15px; vertical-align: -2px; }
.cap-t { font-size: 16px; margin-top: 4px; color: var(--text); }
.cap-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; } .cap-act:empty { display: none; }
.cap.result .cap-t { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; }
.cap.result .score { grid-row: span 2; font-size: 34px; font-weight: 800; color: var(--brand); letter-spacing: -1px; }
.cap.result.good { border-left-color: #2f8f5b; } .cap.result.good .score { color: #2f8f5b; }
.cap.result.bad { border-left-color: #b42318; } .cap.result.bad .score { color: #b42318; }
.cap.result.meh { border-left-color: var(--sand); } .cap.result.meh .score { color: #a0681f; }
@media (max-width: 900px) { .sim-play { grid-template-columns: 1fr; } .sim-rail { min-height: 0; } .head { flex-direction: column; align-items: flex-start; } .head-r { align-items: flex-start; } .tabs { overflow-x: auto; flex-wrap: nowrap; } }

/* illustrated scene */
.scene { padding: 0; overflow: hidden; background: #f2f6fb; }
svg.office { display: block; width: 100%; height: auto; }
svg.office text { font-family: "DM Sans", system-ui, sans-serif; }
.office .spot { fill: transparent; transition: fill .35s; }
.office .stn.on .spot { fill: rgba(31,95,191,.20); }
.office .stn.on .plate rect { stroke: #1f5fbf; stroke-width: 1.5; }
.office .doc { transition: transform .75s cubic-bezier(.5,0,.2,1); }
.office .bubble { transition: opacity .25s; pointer-events: none; }
.office .eyes, .office .bob, .office .code, .office .ant, .office .lap { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .office .eyes { animation: blink 4.5s infinite; }
  .office .stn.on .bob { animation: nod 1.2s ease-in-out infinite; transform-origin: bottom center; }
  .office .stn.on .code { animation: type .8s steps(2) infinite; }
  .office .stn.on .ant { animation: pulse 1s ease-in-out infinite; }
  .office .stn.on .lap rect:first-child { fill: #9fc0ea; }
  .office .stn.shake { animation: shake .45s; }
  .office .stn.on .you { animation: bounce 1s ease-in-out infinite; transform-box: fill-box; }
}
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes nod { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2deg) translateY(1px); } }
@keyframes type { 50% { opacity: .45; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes bounce { 50% { transform: translateY(-4px); } }

/* ---------- clean process editor ---------- */
.mapwrap { position: relative; }
.canvas.big { height: calc(100vh - 250px); min-height: 520px; border-radius: 16px; background: #fbfcfe radial-gradient(#dfe6ef 1px, transparent 1px) 0 0 / 22px 22px; }
.ib { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 9px; cursor: pointer; color: var(--text-2); padding: 0; }
.ib:hover { background: #eef3fa; color: var(--brand); }
.ib .ti { font-size: 18px; }
.ib.lg { width: 40px; height: 40px; border: 1px solid var(--line-2); background: #fff; border-radius: 11px; }
.ib.amber { color: #a0681f; } .ib.amber:hover { background: #fbf1e2; }
.ib.red { color: #b42318; } .ib.red:hover { background: #fdecea; }
.dock { position: absolute; left: 14px; top: 14px; display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 4px; box-shadow: 0 4px 14px rgba(16,24,40,.07); }
.dsep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.checkpill { position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid; background: #fff; box-shadow: 0 4px 14px rgba(16,24,40,.07); }
.checkpill.ok { color: #2f8f5b; border-color: #cfe8d9; } .checkpill.bad { color: #b42318; border-color: #f3c1bc; background: #fff8f7; }
.checkpill .ti { font-size: 16px; }
.menu { position: absolute; left: 14px; top: 58px; z-index: 6; background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 6px; min-width: 250px; max-height: 60vh; overflow: auto; box-shadow: 0 14px 34px rgba(11,42,85,.14); }
.menu.right { left: auto; right: 14px; }
.hacts { position: relative; } .hacts .menu.right { right: 0; top: 48px; }
.menu-h { font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted); font-weight: 700; padding: 8px 10px 4px; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.mi { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; }
.mi:hover { background: #eef3fa; } .mi .ti { font-size: 16px; color: var(--muted); } .mi.red { color: #b42318; } .mi.red .ti { color: #b42318; }
.mrow { display: flex; gap: 10px; padding: 7px 10px; font-size: 13px; align-items: flex-start; }
.hovbar { position: absolute; z-index: 5; display: flex; gap: 2px; background: #0B2A55; border-radius: 11px; padding: 4px; box-shadow: 0 8px 22px rgba(11,42,85,.3); }
.hovbar .ib { color: #d3e0f2; width: 32px; height: 32px; } .hovbar .ib:hover { background: rgba(255,255,255,.12); color: #fff; }
.hovbar .ib.amber { color: #f0d3a6; } .hovbar .ib.red { color: #f3b0a9; }
.hovbar::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: #0B2A55; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.pop { position: absolute; z-index: 7; }
.pop.rename input { font-size: 14px; font-weight: 600; text-align: center; border: 2px solid var(--sage); box-shadow: 0 8px 22px rgba(11,42,85,.18); }
.pop.card { width: 280px; padding: 14px 16px; box-shadow: 0 14px 34px rgba(11,42,85,.16); }
.maphint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 12px; color: var(--muted); background: rgba(255,255,255,.85); padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.legend.floating { position: absolute; right: 14px; bottom: 12px; margin: 0; background: rgba(255,255,255,.9); padding: 6px 10px; border-radius: 10px; }
.canvas .mode { top: 62px; }
.pm-node:hover .shape { filter: drop-shadow(0 4px 10px rgba(11,42,85,.18)); }
.pm-edge:hover .line { stroke: var(--brand); stroke-width: 2.2; }
.pop.card .tools-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; } .pop.card .tools-list label { font-size: 12.5px; }
