/* =============================================================
   QMerse: product page
   A dark node canvas: workflows drawn as nodes and wires, the run plays live.
   The close (FAQ + call) eases to paper with the shared tone shift.
   ============================================================= */
.qm-page { --qm-in: #8ec5ff; --qm-ag: #e9a566; --qm-tool: #5dd2a6; --qm-hu: #f2c94c; --qm-out: #f0987a;
  --qm-panel: #0e1621; --qm-node: #131d29; }
.k-in   { --c: var(--qm-in);   --ca: rgba(142,197,255,0.16); }
.k-ag   { --c: var(--qm-ag);   --ca: rgba(233,165,102,0.16); }
.k-tool { --c: var(--qm-tool); --ca: rgba(93,210,166,0.16); }
.k-hu   { --c: var(--qm-hu);   --ca: rgba(242,201,76,0.16); }
.k-out  { --c: var(--qm-out);  --ca: rgba(240,152,122,0.16); }

.qm-h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.8vw, 54px); line-height: 1.06;
  letter-spacing: -0.03em; text-wrap: balance; max-width: 15em; }
.qm-h2 em { font-style: normal; color: var(--copper-hi); }
.qm-c-head { text-align: center; }
.qm-c-head .section-label { justify-content: center; }
.qm-c-head .qm-h2 { margin: 0 auto; }

/* ---------- Hero ---------- */
.qm-hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(40px, 5vw, 64px) 0 clamp(44px, 5vw, 72px);
  background: radial-gradient(80% 60% at 50% 0%, rgba(93,210,166,0.08), transparent 60%),
              radial-gradient(70% 50% at 50% 100%, rgba(201,123,61,0.10), transparent 60%), var(--ink);
  border-bottom: 1px solid var(--line); }
.qm-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.075) 1px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 30%, #000 25%, transparent 78%); mask-image: radial-gradient(90% 70% at 50% 30%, #000 25%, transparent 78%); }
.qm-hc { text-align: center; max-width: 1080px; margin: clamp(30px, 4vw, 56px) auto 0; }
.qm-hc .section-label { justify-content: center; margin-bottom: 22px; }
.qm-live { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgba(93,210,166,0.5); animation: qmBlink 2.2s ease infinite; }
.qm-hc .section-label::before { display: none; }
.qm-hc h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 4.8vw, 68px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.qm-hc h1 em { font-style: normal; color: var(--copper-hi); display: block; text-wrap: balance; }
.qm-sub { margin: 22px auto 0; max-width: 34em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--text-mute); }
.qm-sub strong { color: var(--text); font-weight: 500; }
.qm-btns { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.qm-play { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #e0524f; color: #fff; font-size: 8px; padding-inline-start: 2px; }
.qm-btns .btn-ghost { color: var(--text); border-color: var(--line-2); }
.qm-btns .btn-ghost:hover { color: var(--ink); }

/* the run window */
.qm-stage { margin-top: clamp(40px, 5vw, 64px); }
.qm-win { position: relative; background: var(--qm-panel); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; overflow: hidden;
  box-shadow: 0 50px 120px -50px rgba(0,0,0,0.95), 0 0 0 6px rgba(255,255,255,0.015); }
.qm-bar { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.015); }
.qm-lights { display: flex; gap: 7px; }
.qm-lights i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.qm-title { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.qm-title b { font-weight: 500; color: var(--text); }
.qm-status { margin-inline-start: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); border: 1px solid rgba(93,210,166,0.4); border-radius: 30px; padding: 6px 12px; transition: color .3s, border-color .3s; }
.qm-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: qmBlink 1.6s ease infinite; }
.qm-status.is-wait { color: var(--qm-hu); border-color: rgba(242,201,76,0.5); }
.qm-status.is-done::before { animation: none; }

.qm-graph { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: center; gap: 0 clamp(26px, 3.6vw, 60px);
  padding: clamp(30px, 3.4vw, 46px) clamp(22px, 2.6vw, 36px);
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1.2px); background-size: 18px 18px; }
.qm-wires { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.qm-wire { fill: none; stroke: rgba(255,255,255,0.16); stroke-width: 1.4; stroke-dasharray: 3 4; transition: stroke .4s; }
.qm-wire.is-live { stroke: rgba(93,210,166,0.85); stroke-dasharray: none; }
.qm-wire.is-done { stroke: rgba(93,210,166,0.34); stroke-dasharray: none; }
.qm-pulse { position: absolute; left: 0; top: 0; width: 7px; height: 7px; margin: 0; border-radius: 50%; background: #b9f5dc;
  box-shadow: 0 0 10px 2px rgba(93,210,166,0.7); offset-rotate: 0deg; offset-distance: 0%; opacity: 0; pointer-events: none; }
.qm-pulse.is-live { opacity: 1; animation: qmMove 1.15s linear infinite; }
.qm-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: relative; z-index: 1; }

.qm-node { position: relative; display: block; width: 100%; text-align: start; font: inherit; color: var(--text); cursor: pointer;
  background: var(--qm-node); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 10px 12px 11px;
  transition: border-color .35s, box-shadow .35s, background .35s, transform .35s var(--ease); }
.qm-node:hover { border-color: var(--c); transform: translateY(-2px); }
.qm-node::before, .qm-node::after { content: ''; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--qm-panel); border: 1.5px solid var(--c); }
.qm-node::before { inset-inline-start: -4.5px; }
.qm-node::after { inset-inline-end: -4.5px; }
.qm-col.qm-c1 .qm-node::before, .qm-col.qm-c6 .qm-node::after { display: none; }
.qn-h { display: flex; align-items: center; gap: 8px; min-width: 0; height: 17px; }
.qn-t { display: block; margin-top: 8px; font-size: 13.5px; font-weight: 500; line-height: 1.25; }
.qn-k { flex: none; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c);
  background: var(--ca); border-radius: 4px; padding: 3px 5px; }
.qn-s { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 10.5px; line-height: 1.35; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qn-s b { font-weight: 500; color: var(--text); }
.qn-p { display: block; height: 2px; margin-top: 9px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; }
.qn-p i { display: block; height: 100%; width: 100%; background: var(--c); transform-origin: left; }
html[dir="rtl"] .qn-p i { transform-origin: right; }
.qm-graph.js .qn-p i { transform: scaleX(0); }
.qm-node.is-run { border-color: var(--c); box-shadow: 0 0 0 3px var(--ca), 0 14px 34px -14px var(--c); }
.qm-node.is-run .qn-p i { animation: qmFill var(--dur, 1.2s) linear forwards; }
.qm-graph.js .qm-node.is-done .qn-p i { transform: none; background: var(--qm-tool); }
.qm-node.is-done { border-color: rgba(93,210,166,0.4); }
.qm-node.is-wait { border-color: var(--qm-hu); animation: qmGate 1.2s ease infinite; }
.qm-node.is-wait .qn-p i { transform: scaleX(0.5); animation: none; background: var(--qm-hu); }
.qm-node.is-sel { outline: 1px dashed var(--c); outline-offset: 4px; }
.qn-ok { display: none; flex: none; margin-inline-start: auto; color: var(--qm-tool); font-size: 12px; line-height: 1; }
.qm-node.is-done .qn-ok { display: inline; }

/* inspector: the selected (or running) node, what it does and what it records */
.qm-insp { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.6fr; gap: clamp(18px, 2.4vw, 34px); padding: 22px clamp(22px, 2.6vw, 36px) 24px;
  border-top: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.012); min-height: 168px; }
.qi-k { display: inline-block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); background: var(--ca); border-radius: 4px; padding: 4px 7px; }
.qi-t { margin-top: 11px; font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -0.015em; }
.qi-d { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--text-mute); }
.qi-follow { margin-top: 12px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal);
  background: none; border: 1px solid rgba(93,210,166,0.4); border-radius: 30px; padding: 6px 12px; cursor: pointer; }
.qi-follow:hover { background: rgba(93,210,166,0.1); }
.qm-insp .qi-h { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.qm-insp ul { list-style: none; }
.qm-insp li { position: relative; padding-inline-start: 16px; font-size: 13.5px; line-height: 1.5; color: rgba(232,229,223,0.82); margin-bottom: 7px; }
.qm-insp li::before { content: ''; position: absolute; inset-inline-start: 0; top: 7px; width: 6px; height: 6px; border-radius: 2px; background: var(--copper); }
.qi-rec li::before { background: var(--signal); }
.qi-log { align-self: stretch; background: #0a1018; border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 11px 13px; min-width: 0;
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.85; color: rgba(232,229,223,0.8); overflow: hidden; }
.qi-log .ln { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: qmLn .35s ease; }
.qi-log .ln::before { content: '› '; color: rgba(232,229,223,0.35); }
html[dir="rtl"] .qi-log .ln::before { content: '‹ '; }
.qi-log .ln.old { color: rgba(232,229,223,0.4); }
.qi-log .ln b { font-weight: 500; color: var(--copper-hi); }
.qi-log .ln.ok, .qi-log .ln.ok b { color: var(--signal); }
.qi-log .ln.amber { color: var(--qm-hu); }
.qi-log .ln.old.ok, .qi-log .ln.old.amber { opacity: 0.6; }
.qi-pane { animation: qmLn .35s ease; }

.qm-foot { display: flex; align-items: center; gap: clamp(18px, 3vw, 44px); padding: 14px clamp(22px, 2.6vw, 36px); border-top: 1px solid rgba(255,255,255,0.07); }
.qm-foot > div { display: flex; align-items: baseline; gap: 9px; }
.qm-foot b { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.qm-foot span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.qm-foot .qm-ill { margin-inline-start: auto; }
.qm-stamp { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); border: 1px solid rgba(93,210,166,0.45);
  border-radius: 6px; padding: 6px 10px; background: rgba(93,210,166,0.06); opacity: 0; transform: scale(0.92); transition: opacity .45s, transform .45s var(--ease); }
.qm-stamp.show { opacity: 1; transform: none; }

/* the tools it drives */
.qm-tools { margin-top: clamp(26px, 3vw, 38px); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; }
.qm-tools > span:first-child { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); margin-inline-end: 6px; }
.qm-tools i { font-style: normal; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 30px; padding: 7px 13px; background: rgba(255,255,255,0.02); }
.qm-tools i::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--qm-tool); }

/* ---------- Co-pilot: the engineer asks in QMerse, PSCAD does the work ---------- */
.qm-cp { padding: clamp(80px, 10vw, 136px) 0; background: var(--ink); }
.cp-win { margin-top: clamp(40px, 5vw, 64px); background: var(--qm-panel); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; overflow: hidden;
  box-shadow: 0 50px 120px -50px rgba(0,0,0,0.95), 0 0 0 6px rgba(255,255,255,0.015); }
.cp-conn { margin-inline-start: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--copper-hi); border: 1px solid rgba(233,165,102,0.4); border-radius: 30px; padding: 6px 12px; }
.cp-conn::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.cp-body { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); }
.cp-pilot { display: flex; flex-direction: column; gap: 14px; padding: 22px clamp(18px, 2vw, 26px); border-inline-end: 1px solid rgba(255,255,255,0.07); background: rgba(233,165,102,0.025); }
.cp-k { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper-hi); }
.cp-msg { align-self: flex-end; max-width: 94%; min-height: 4.6em; background: rgba(233,165,102,0.1); border: 1px solid rgba(233,165,102,0.3); border-radius: 12px; border-end-end-radius: 4px;
  padding: 10px 14px 12px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.cp-me { display: block; margin-bottom: 4px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-hi); }
.cp-caret { display: none; width: 2px; height: 1em; margin-inline-start: 2px; vertical-align: -2px; background: var(--copper-hi); animation: cpBlink 1s steps(1) infinite; }
.cp-win.typing .cp-caret { display: inline-block; }
.cp-plan { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.cp-plan li { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; font-size: 13.5px; line-height: 1.35; color: var(--text-dim); transition: background .3s, color .3s; }
.cp-plan li i { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.22); display: grid; place-items: center;
  font-style: normal; font-size: 9px; font-weight: 700; color: var(--ink); }
.cp-plan li.on { background: rgba(93,210,166,0.07); color: var(--text); }
.cp-plan li.on i { border-color: var(--signal); border-top-color: transparent; animation: cpSpin .8s linear infinite; }
.cp-plan li.done { color: rgba(232,229,223,0.82); }
.cp-plan li.done i { background: var(--signal); border-color: var(--signal); }
.cp-plan li.done i::before { content: '✓'; }
.cp-plan li.g.done { color: var(--qm-hu); }
.cp-plan li.g.done i { background: var(--qm-hu); border-color: var(--qm-hu); }
.cp-plan li.g.done i::before { content: '!'; }
.cp-plan code, .cp-plan b { margin-inline-start: auto; flex: none; font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--signal); }
.cp-plan b { font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.cp-gate { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 11px 12px; border: 1px dashed rgba(242,201,76,0.45); border-radius: 10px; transition: opacity .45s, transform .45s var(--ease); }
.cp-gate > span { margin-inline-end: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--qm-hu); }
.cp-gate em { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; padding: 6px 11px; border-radius: 30px; border: 1px solid rgba(255,255,255,0.18); color: var(--text); }
.cp-gate em.ok { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.cp-gate em.cp-done { display: none; border-color: rgba(93,210,166,0.5); color: var(--signal); }
.cp-win.is-ok .cp-gate em.cp-ask { display: none; }
.cp-win.is-ok .cp-gate em.cp-done { display: inline-block; }
.cp-win.is-ok .cp-gate { border-color: rgba(93,210,166,0.45); border-style: solid; }
.cp-win.is-flag:not(.is-ok) .cp-gate em.ok { animation: cpPress 1.1s ease infinite; }
.cp-input { margin-top: auto; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--text-dim); }
.cp-input span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-input kbd { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); border: 1px solid rgba(255,255,255,0.15); border-radius: 5px; padding: 2px 6px; }

.cp-ps { display: flex; flex-direction: column; gap: 12px; padding: 16px clamp(16px, 2vw, 24px) 18px; min-width: 0; }
.ps-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.ps-tabs span { font-family: var(--font-mono); font-size: 10.5px; padding: 6px 11px; border-radius: 6px 6px 0 0; color: var(--text-dim); }
.ps-tabs span.on { color: var(--text); background: rgba(255,255,255,0.05); }
.ps-sch, .ps-plot { display: block; width: 100%; height: auto; background: #0a1018; border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; transition: opacity .5s; }
.ps-ln { fill: none; stroke: rgba(232,229,223,0.55); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ps-bus { stroke: var(--text); stroke-width: 3.5; }
.ps-t { font-family: var(--font-mono); font-size: 10px; fill: rgba(232,229,223,0.62); }
.ps-fault path { fill: var(--qm-hu); stroke: none; }
.ps-fault text { fill: var(--qm-hu); }
.ps-ax { fill: none; stroke: rgba(232,229,223,0.35); stroke-width: 1; }
.ps-gl { fill: none; stroke: rgba(232,229,223,0.08); stroke-width: 1; }
.ps-env { fill: none; stroke: #ef8a87; stroke-width: 1.6; stroke-dasharray: 5 4; transition: opacity .5s; }
.ps-case { fill: none; stroke: rgba(93,210,166,0.28); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ps-main { fill: none; stroke: var(--signal); stroke-width: 2.2; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ps-iq { fill: none; stroke: var(--qm-in); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ps-near { fill: none; stroke: var(--qm-hu); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ps-near-l { fill: var(--qm-hu); }
.ps-status { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--text-dim); }
.ps-st { display: none; white-space: nowrap; }
.ps-st.done { display: inline; color: var(--signal); }
.ps-prog { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.07); overflow: hidden; }
.ps-prog i { display: block; height: 100%; background: var(--signal); transform-origin: left; }
html[dir="rtl"] .ps-prog i { transform-origin: right; }
.cp-ill { white-space: nowrap; text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; }
/* the staged run (qmerse.js adds .js, then the stage classes one by one) */
.cp-win.js:not(.is-open) .ps-sch { opacity: 0.3; }
.cp-win.js:not(.is-fault) .ps-fault, .cp-win.js:not(.is-fault) .ps-env { opacity: 0; }
.ps-fault { transition: opacity .5s; }
.cp-win.js:not(.is-run) .ps-case { stroke-dashoffset: 1; }
.cp-win.js.is-run .ps-case { animation: psDraw .85s linear backwards; animation-delay: calc(var(--i) * 0.38s); }
.cp-win.js:not(.is-check) :is(.ps-main, .ps-iq, .ps-near) { stroke-dashoffset: 1; }
.cp-win.js:not(.is-check) .ps-near-l { opacity: 0; }
.cp-win.js.is-check :is(.ps-main, .ps-iq, .ps-near) { animation: psDraw 1.2s ease backwards; }
.ps-near-l { transition: opacity .4s 1s; }
.cp-win.js:not(.is-flag) .cp-gate { opacity: 0; transform: translateY(6px); }
.cp-win.js:not(.is-run) .ps-st.idle, .cp-win.js.is-run:not(.is-check) .ps-st.run { display: inline; }
.cp-win.js:not(.is-check) .ps-st.done { display: none; }
.cp-win.js:not(.is-run) .ps-prog i { transform: scaleX(0); }
.cp-win.js.is-run:not(.is-check) .ps-prog i { animation: qmFill 2.9s linear backwards; }
.cp-chips { margin-top: clamp(24px, 3vw, 34px); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cp-chips span { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); border: 1px solid rgba(255,255,255,0.12); border-radius: 30px; padding: 8px 15px; background: rgba(255,255,255,0.02); }
.cp-chips span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--copper-hi); }
.cp-chips span:last-child::before { background: var(--qm-hu); }
@keyframes psDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes cpSpin { to { transform: rotate(360deg); } }
@keyframes cpBlink { 50% { opacity: 0; } }
@keyframes cpPress { 0%, 100% { box-shadow: 0 0 0 0 rgba(93,210,166,0.5); } 50% { box-shadow: 0 0 0 6px rgba(93,210,166,0); } }
.qm-tag { margin-top: clamp(30px, 4vw, 48px); text-align: center; font-family: var(--font-mono); font-size: clamp(12px, 1.1vw, 14px); letter-spacing: 0.08em; color: var(--text-mute); }
.qm-tag b { font-weight: 500; color: var(--signal); }
.qm-tag em { font-style: normal; color: var(--qm-hu); }

/* ---------- Use cases: workflows as step lists (paper) ---------- */
.qm-uc { padding: clamp(80px, 10vw, 136px) 0; }
.qm-uc .qm-h2 { color: var(--tp-ink); }
.qm-uc .qm-h2 em { color: var(--tp-acc); }
.qm-uc .section-label { color: var(--tp-acc); }
.qm-uc .section-label::before { background: var(--tp-acc); }
.qm-ucg { margin-top: clamp(40px, 5vw, 60px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.qm-ucg:focus-visible { outline: 2px solid var(--tp-acc); outline-offset: 6px; border-radius: 16px; }
.qm-ucc { background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: 14px; padding: 20px 18px 18px; display: flex; flex-direction: column; min-width: 0; }
.qm-ucc .uk { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tp-dim); }
.qm-ucc h3 { margin-top: 8px; font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 1.25; letter-spacing: -0.01em; color: var(--tp-ink); min-height: 2.5em; }
.qm-ucc ol { list-style: none; margin-top: 16px; position: relative; }
.qm-ucc ol::before { content: ''; position: absolute; inset-inline-start: 3.5px; top: 8px; bottom: 10px; width: 1px; background: var(--tp-line); }
.qm-ucc li { position: relative; padding-inline-start: 20px; font-size: 13.5px; line-height: 1.4; color: var(--tp-mute); padding-block: 6px; }
.qm-ucc li::before { content: ''; position: absolute; inset-inline-start: 0; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--tp-acc);
  box-shadow: 0 0 0 3px var(--tp-bg); animation: qmStep 9s ease infinite; animation-delay: calc(var(--i) * 0.55s + var(--k) * 1.1s); }
.qm-ucc li.hu::before { background: var(--tp-ok); }
.qm-ucc li.out { color: var(--tp-ink); font-weight: 600; }
.qm-ucc li.out::before { background: var(--tp-ink); }
.qm-ucc li code { display: inline-block; margin-inline-start: 6px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; color: var(--tp-ok);
  border: 1px solid var(--tp-line); border-radius: 4px; padding: 1px 5px; vertical-align: 1px; }
.qm-note { margin-top: 18px; text-align: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tp-dim); }

/* ---------- Governance: the audit trail ---------- */
.qm-gov { padding: clamp(80px, 10vw, 136px) 0; background: radial-gradient(70% 60% at 0% 100%, rgba(93,210,166,0.06), transparent 60%), var(--ink); }
.qm-gov-grid { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.qm-audit { background: var(--qm-panel); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; overflow: hidden; }
.qa-h { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.07); font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); }
.qa-h b { font-weight: 500; color: var(--text); }
.qa-seal { margin-inline-start: auto; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); border: 1px solid rgba(93,210,166,0.4); border-radius: 30px; padding: 5px 11px; }
.qm-audit ol { list-style: none; padding: 10px 20px 16px; position: relative; }
.qm-audit li { position: relative; display: grid; grid-template-columns: 52px 18px minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px 0; font-size: 14px; line-height: 1.45; color: rgba(232,229,223,0.85); }
.qm-audit li time { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); padding-top: 1px; direction: ltr; }
.qm-audit li i { position: relative; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px var(--ca); }
.qm-audit li:not(:last-child) i::after { content: ''; position: absolute; left: 4.5px; top: 16px; width: 1px; height: calc(100% + 20px); background: rgba(255,255,255,0.1); }
.qm-audit li span b { font-weight: 500; color: var(--text); }
.qm-audit li.ok span { color: var(--signal); }
.qm-audit.js li { opacity: 0; transform: translateY(6px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.qm-audit.in li { opacity: 1; transform: none; transition-delay: var(--d, 0s); }
.qm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qm-tile { border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 20px; background: rgba(255,255,255,0.015); display: flex; flex-direction: column; gap: 10px; transition: border-color .3s, transform .3s var(--ease); }
.qm-tile:hover { border-color: rgba(201,123,61,0.5); transform: translateY(-2px); }
.qm-tile svg { width: 34px; height: 34px; padding: 7px; border-radius: 9px; color: var(--copper-hi); background: rgba(201,123,61,0.1); }
.qm-tile h3 { font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 1.25; margin-top: 4px; }
.qm-tile p { font-size: 14px; line-height: 1.5; color: var(--text-mute); }
.qm-tile.hot { border-color: rgba(201,123,61,0.45); background: linear-gradient(160deg, rgba(201,123,61,0.1), rgba(201,123,61,0.02)); }

/* ---------- The platform: qmerse.com ---------- */
.qm-plat { padding: clamp(80px, 10vw, 136px) 0; background: var(--ink-2); border-top: 1px solid var(--line); }
.qp-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(30px, 5vw, 72px); align-items: center; }
.qp-copy .qm-h2 { font-size: clamp(30px, 3.4vw, 48px); max-width: 12em; }
.qp-copy p { margin-top: 18px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: var(--text-mute); max-width: 26em; }
.qp-copy .btn { margin-top: 28px; }
.qp-win { background: #fbfaf7; border-radius: 16px; overflow: hidden; color: #1a2230; box-shadow: 0 40px 100px -40px rgba(0,0,0,0.9); }
.qp-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 16px; border-bottom: 1px solid rgba(11,17,24,0.08); background: #f2efe9; }
.qp-bar .qm-lights i { background: rgba(11,17,24,0.14); }
.qp-bar span:last-child { font-family: var(--font-mono); font-size: 12px; color: rgba(26,34,48,0.7); }
.qp-flow { display: flex; align-items: center; padding: clamp(30px, 4vw, 48px) clamp(18px, 2.4vw, 30px);
  background-image: radial-gradient(rgba(11,17,24,0.1) 1px, transparent 1.2px); background-size: 16px 16px; }
.qp-n { flex: 1 1 0; min-width: 0; background: #fff; border: 1px solid rgba(11,17,24,0.12); border-top: 3px solid var(--d); border-radius: 9px; padding: 10px 11px 11px; box-shadow: 0 8px 20px -14px rgba(11,17,24,0.4); }
.qp-n b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--d); }
.qp-n span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.3; color: #1a2230; }
.qp-w { flex: 0 0 clamp(14px, 2vw, 26px); height: 2px; position: relative; overflow: hidden; background: rgba(11,17,24,0.14); }
.qp-w::after { content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: #2f7d63; animation: qpRun 1.8s linear infinite; }
html[dir="rtl"] .qp-w::after { animation-name: qpRunR; }
.qp-demos { margin-top: clamp(40px, 5vw, 60px); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qp-demo { border: 1px solid var(--line-2); border-radius: 14px; padding: 22px 22px 20px; background: rgba(255,255,255,0.015); }
.qp-demo .uk { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-hi); }
.qp-demo h3 { margin-top: 10px; font-family: var(--font-display); font-weight: 500; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.2; letter-spacing: -0.015em; }
.qp-demo p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--text-mute); }

/* ---------- Close: FAQ + call, on paper ---------- */
.qm-close .app-section, .qm-close .cta-c { background: transparent; }
.qm-close .faq-section { padding: clamp(72px, 9vw, 120px) 0 clamp(48px, 6vw, 80px); }
.faq-section .cf-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.faq-section .cf-head { position: sticky; top: 110px; }
.faq-section .cf-head h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.faq-section .cf-grid .faq { max-width: none; margin-top: 0; }
[data-tone="paper"] .faq-section summary { color: var(--tp-ink); }
[data-tone="paper"] .faq-section .faq-item { border-color: var(--tp-line); }
[data-tone="paper"] .faq-section .faq-a { color: var(--tp-mute); opacity: 1; }
.qm-close .cta-c { border-top: 1px solid var(--tp-line); padding: clamp(70px, 8vw, 110px) 0; }
.qm-steps { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.qm-steps span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tp-mute); border: 1px solid var(--tp-line); border-radius: 30px; padding: 8px 14px; }
.qm-steps span i { font-style: normal; color: var(--tp-acc); margin-inline-end: 7px; }
.qm-steps b { font-weight: 400; color: var(--tp-acc); }
html[dir="rtl"] .qm-steps b { transform: scaleX(-1); display: inline-block; }

/* ---------- Motion ---------- */
@keyframes qmBlink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(93,210,166,0.45); } 50% { opacity: 0.55; box-shadow: 0 0 0 6px rgba(93,210,166,0); } }
@keyframes qmMove { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes qmFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes qmGate { 0%, 100% { box-shadow: 0 0 0 3px rgba(242,201,76,0.14); } 50% { box-shadow: 0 0 0 8px rgba(242,201,76,0.03); } }
@keyframes qmLn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes qmStep { 0%, 5% { transform: scale(1); } 2.5% { transform: scale(1.7); } }
@keyframes qpRun { to { left: 100%; } }
@keyframes qpRunR { from { left: 100%; } to { left: -40%; } }
.is-offscreen, .is-offscreen * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .qm-pulse.is-live { animation: none; opacity: 0; }
  .qm-live, .qm-status::before, .qm-node.is-wait, .qm-ucc li::before, .qp-w::after, .cp-caret, .cp-plan li.on i { animation: none; }
  .qm-node.is-run .qn-p i { animation-duration: 0.01s; }
}

/* ---------- Arabic ---------- */
html[dir="rtl"] :is(.qn-k, .qi-k, .qm-status, .qm-insp .qi-h, .qm-foot span, .qm-tools > span:first-child, .cp-k, .cp-me, .cp-conn, .cp-gate > span, .cp-gate em, .ps-status, .cp-ill,
  .qm-ucc .uk, .qm-note, .qa-seal, .qp-n b, .qp-demo .uk, .qm-steps span, .qi-follow, .qm-stamp, .qm-tag) { letter-spacing: 0; }
html[dir="rtl"] .qn-k, html[dir="rtl"] .qi-k { font-size: 10px; }
html[dir="rtl"] .qm-foot span, html[dir="rtl"] .cp-k, html[dir="rtl"] .qm-ucc .uk { font-size: 11.5px; }
html[dir="rtl"] .qm-hc h1 { line-height: 1.3; }
html[dir="rtl"] .qm-h2, html[dir="rtl"] .faq-section .cf-head h2 { line-height: 1.35; }
html[dir="rtl"] .qm-play { padding-inline-start: 0; padding-left: 2px; }
html[dir="rtl"] .qm-audit li:not(:last-child) i::after { left: auto; right: 4.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .qm-ucg { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .qm-ucc { flex: 0 0 260px; scroll-snap-align: start; }
  .qm-insp { grid-template-columns: 1fr 1fr; }
  .qn-s { white-space: normal; }
  .qm-foot { flex-wrap: wrap; row-gap: 10px; }
  .qm-foot span { white-space: nowrap; }
  .qi-log { grid-column: 1 / -1; order: -1; min-height: 0; }
}
@media (max-width: 980px) {
  .qm-gov-grid, .qp-grid, .cp-body { grid-template-columns: minmax(0, 1fr); }
  .cp-pilot { border-inline-end: 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .cp-msg { min-height: 0; }
  .qm-graph { gap: 0 22px; padding-inline: 18px; }
  .qn-t { font-size: 12.5px; }
  .faq-section .cf-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-section .cf-head { position: static; }
}
@media (max-width: 820px) {
  .qm-graph { grid-template-columns: minmax(0, 1fr); gap: 22px 0; padding: 22px 14px; }
  .qm-col.qm-c3 { flex-direction: row; gap: 8px; }
  .qm-col.qm-c3 .qm-node { flex: 1 1 0; min-width: 0; padding: 9px 9px 10px; }
  .qm-node::before, .qm-node::after { top: auto; margin-top: 0; inset-inline-start: 50%; margin-inline-start: -3.5px; inset-inline-end: auto; }
  .qm-node::before { top: -4.5px; }
  .qm-node::after { bottom: -4.5px; }
  .qm-node { padding: 9px 12px 10px; }
  .qm-node .qn-h { position: absolute; top: 9px; inset-inline-end: 10px; height: auto; }
  .qm-node .qn-t { margin-top: 0; padding-inline-end: 70px; }
  .qm-col.qm-c3 .qn-k { display: none; }
  .qm-col.qm-c3 .qn-h { display: none; }
  .qm-col.qm-c3 .qn-t { padding-inline-end: 0; font-size: 12px; }
  .qm-col.qm-c3 .qn-s { white-space: normal; }
  .qn-s { margin-top: 4px; }
  .qn-p { margin-top: 8px; }
  .qm-foot { flex-wrap: wrap; gap: 10px 22px; }
  .qm-foot .qm-ill { width: 100%; margin-inline-start: 0; }
  .qp-demos { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .qm-bar { padding: 0 12px; gap: 10px; }
  .qm-lights { display: none; }
  .qm-insp { grid-template-columns: minmax(0, 1fr); padding: 18px 16px 20px; gap: 14px; }
  .qi-d { font-size: 13.5px; }
  .qi-b, .qi-c { display: none; }
  .qm-hc .section-label { display: block; line-height: 1.8; }
  .qm-hc .qm-live { display: inline-block; vertical-align: 1px; margin-inline-end: 10px; }
  .qm-tools > span:first-child { width: 100%; text-align: center; margin: 0 0 4px; }
  .qm-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .qm-tile { padding: 15px 14px; gap: 8px; }
  .qm-tile h3 { font-size: 15px; }
  .qm-tile p { font-size: 13px; }
  .qm-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 360px; margin-inline: auto; }
  .qm-steps b { display: none; }
  .qm-steps span { padding: 8px 10px; font-size: 10px; text-align: center; }
  .qp-n { padding: 8px 11px 9px; }
  .qp-n span { margin-top: 3px; }
  .qi-log { order: 0; }
  .qm-foot b { font-size: 19px; }
  .qm-flow-sm { display: none; }
  .qp-flow { flex-direction: column; align-items: stretch; padding: 22px 18px; }
  .qp-w { flex: 0 0 18px; width: 2px; height: 18px; align-self: center; }
  .qp-w::after { left: 0; top: -40%; width: 100%; height: 40%; animation-name: qpRunV; }
  html[dir="rtl"] .qp-w::after { animation-name: qpRunV; }
  .cp-plan li { font-size: 13px; }
  .ps-tabs { display: none; }
  .cp-chips span { font-size: 13px; padding: 7px 12px; }
  .ps-status .cp-ill { display: none; }
  .qm-ucc { flex-basis: 78vw; }
  .qm-audit li { grid-template-columns: 44px 16px minmax(0, 1fr); font-size: 13.5px; }
}
@keyframes qpRunV { from { top: -40%; } to { top: 100%; } }
@media (max-width: 360px) { .qm-tiles { grid-template-columns: minmax(0, 1fr); } }
