/* Shared engines module. Page classes are scoped under .m-eng; drawer classes (rendered outside the page) use the e- prefix. */
.m-eng .vh, #drawer .e-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- engine switcher: one hairline ribbon that is also the tab list ---------- */
.m-eng .e-sw { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 32px; }
.m-eng .e-sw button { all: unset; box-sizing: border-box; position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 15px; cursor: pointer; box-shadow: 1px 0 0 var(--line); transition: background var(--t-fast); min-width: 0; }
.m-eng .e-sw button:hover { background: var(--panel-2); }
.m-eng .e-sw button:focus-visible { outline: 2px solid var(--tc); outline-offset: -2px; }
.m-eng .e-sw button::after { content: ''; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--tc); transform: scaleX(0); transform-origin: left; transition: transform var(--t) var(--ease); }
.m-eng .e-sw button.on::after { transform: scaleX(1); }
.m-eng .e-sw-l { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.35; font-weight: 500; color: var(--ink-3); }
.m-eng .e-sw-l .ic { margin-top: 1px; flex: none; }
.m-eng .e-sw-l .ic { width: 15px; height: 15px; }
.m-eng .e-sw button.on .e-sw-l { color: var(--tc); }
.m-eng .e-sw b { font-size: 22px; font-weight: 500; letter-spacing: -.03em; color: var(--ink-2); margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-eng .e-sw button.on b { color: var(--ink); }
.m-eng .e-sw small { font-size: 12px; color: var(--ink-3); }
.m-eng #e-body:focus { outline: none; }
.m-eng .e-k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m-eng code, #drawer .e-rules code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.m-eng .e-nowrap { white-space: nowrap; }

/* ---------- application icon stack ---------- */
.e-stack { display: inline-flex; align-items: center; }
.e-stack a { display: inline-flex; border-radius: 7px; box-shadow: 0 0 0 2px var(--panel); margin-left: -4px; transition: transform var(--t-fast); }
.e-stack a:first-child { margin-left: 0; }
.e-stack a:hover, .e-stack a:focus-visible { transform: translateY(-2px); z-index: 1; }
.e-stack .app-ic.xs { background: color-mix(in srgb, var(--c) 12%, white); }
.e-stack em { font-style: normal; font-size: 12px; color: var(--ink-3); margin-left: 8px; font-variant-numeric: tabular-nums; }

/* ---------- rules: ring-fence hero with a fan-out rail ---------- */
.m-eng .e-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 30px; }
.m-eng .e-hero h2 { font-size: 22px; font-weight: 600; letter-spacing: -.025em; margin: 0 0 8px; }
.m-eng .e-hero-l > p { margin: 0 0 20px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.m-eng .e-spec { font-size: 13px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.m-eng .e-spec dd { font-weight: 500; }
.m-eng .e-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }
.m-eng .e-trio > div { padding-right: 12px; }
.m-eng .e-trio > div + div { padding-left: 16px; box-shadow: -1px 0 0 var(--line); }
.m-eng .e-trio b { display: block; font-size: 34px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; color: var(--tc); font-variant-numeric: tabular-nums; }
.m-eng .e-trio span { font-size: 12.5px; color: var(--ink-3); }
.m-eng .e-trio-sm { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.m-eng .e-trio-sm b { font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.m-eng .e-fan { position: relative; display: flex; flex-direction: column; gap: 10px; padding-left: 28px; }
.m-eng .e-fan::before { content: ''; position: absolute; left: 6px; top: 22px; bottom: 22px; width: 1px; background: linear-gradient(var(--tc-line), var(--line-2)); }
.m-eng .e-fan-r { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color var(--t-fast), background var(--t-fast); }
.m-eng .e-fan-r::before { content: ''; position: absolute; left: -22px; top: 26px; width: 22px; height: 1px; background: var(--line-2); }
.m-eng .e-fan-r::after { content: ''; position: absolute; left: -26px; top: 22px; width: 7px; height: 7px; border-radius: 50%; background: var(--panel); box-shadow: 0 0 0 1.5px var(--c); }
.m-eng .e-fan-r:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); background: color-mix(in srgb, var(--c) 3%, white); }
.m-eng .e-fan-h { display: flex; align-items: center; gap: 10px; }
.m-eng .e-nm, #drawer .e-nm { flex: 1; min-width: 0; line-height: 1.3; }
.m-eng .e-nm b, #drawer .e-nm b { display: block; font-size: 13.5px; font-weight: 600; }
.m-eng .e-nm small, #drawer .e-nm small { display: block; font-size: 12px; color: var(--ink-3); }
.m-eng .e-fan-p { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.m-eng .e-fan-t { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.m-eng .e-inline { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: -4px 0 16px; }
.m-eng .e-inline b { font-size: 20px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-right: 6px; }
.m-eng .e-inline span { font-size: 12.5px; color: var(--ink-3); }
.m-eng .e-ex { display: block; max-width: 340px; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }

.m-eng .e-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.m-eng .e-steps li { counter-increment: s; position: relative; padding: 0 0 20px 40px; font-size: 13px; line-height: 1.5; }
.m-eng .e-steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--tc-line); color: var(--tc); background: var(--panel); display: grid; place-items: center; font-weight: 600; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.m-eng .e-steps li:not(:last-child)::after { content: ''; position: absolute; left: 12px; top: 27px; bottom: 3px; width: 1px; background: var(--line-2); }
.m-eng .e-steps b { display: block; font-weight: 600; }
.m-eng .e-steps span { color: var(--ink-2); }

/* ---------- workflow: decision timeline, flow rail, master-detail ---------- */
.m-eng .e-run { padding: 24px 26px; }
.m-eng .e-tl { list-style: none; margin: 4px 0 0; padding: 0; }
.m-eng .e-tl li { display: grid; grid-template-columns: 92px 20px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 16px; }
.m-eng .e-tl time { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-3); text-align: right; padding-top: 1px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.m-eng .e-tl i { position: relative; }
.m-eng .e-tl i::before { content: ''; position: absolute; left: 6px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 14%, white); }
.m-eng .e-tl li:not(:last-child) i::after { content: ''; position: absolute; left: 9.5px; top: 19px; bottom: -14px; width: 1px; background: var(--line-2); }
.m-eng .e-tl-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-eng .e-tl-h b { font-size: 13.5px; font-weight: 600; }
.m-eng .e-tl-h span { font-size: 12px; color: var(--ink-3); }
.m-eng .e-tl p { margin: 3px 0 2px; font-size: 13px; color: var(--ink-2); line-height: 1.5; max-width: 820px; }
.m-eng .e-tl small { font-size: 11.5px; color: var(--ink-3); }

.e-fl-wrap { padding: 2px 0 0; }
.e-fl { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.e-fl-n { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; padding-bottom: 14px; }
.e-fl-n::before { content: ''; grid-row: 1 / 3; width: 9px; height: 9px; margin: 4px 0 0 6px; border-radius: 50%; background: var(--panel); box-shadow: inset 0 0 0 2px var(--c); }
.e-fl-n:not(:last-child)::after { content: ''; position: absolute; left: 10px; top: 17px; bottom: 1px; width: 1px; background: var(--line-2); }
.e-fl-n small { grid-column: 2; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.e-fl-n small .ic { width: 12px; height: 12px; }
.e-fl-n .app-ic.xs { width: 16px; height: 16px; border-radius: 5px; }
.e-fl-n .app-ic.xs .ic { width: 10px; height: 10px; }
.e-fl-n b { grid-column: 2; display: block; font-size: 13.5px; font-weight: 500; line-height: 1.4; color: var(--ink); margin-top: 1px; }
.e-fl-n b em { font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-right: 8px; font-variant-numeric: tabular-nums; }
.e-fl-trig::before { background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, white); }
.e-fl-trig small .ic { color: var(--c); }
.e-fl-trig b { font-weight: 600; }

.m-eng .e-wf { display: grid; grid-template-columns: 260px minmax(0, 1fr); overflow: hidden; }
.m-eng .e-wf-list { border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.m-eng .e-wf-list button { all: unset; box-sizing: border-box; display: block; padding: 10px 12px; border-radius: 9px; cursor: pointer; position: relative; }
.m-eng .e-wf-list button:hover { background: var(--panel-2); }
.m-eng .e-wf-list button:focus-visible { outline: 2px solid var(--tc); outline-offset: -2px; }
.m-eng .e-wf-list button.on { background: var(--tc-bg); }
.m-eng .e-wf-list button.on b { color: var(--tc-ink); }
.m-eng .e-wf-list b { display: block; font-size: 13px; font-weight: 500; color: var(--ink); }
.m-eng .e-wf-list span { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.m-eng .e-wf-body { padding: 22px 24px; min-width: 0; }
.m-eng .e-wf-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.m-eng .e-wf-id { display: flex; align-items: center; gap: 8px; }
.m-eng .e-wf-h h3 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }
.m-eng .e-wf-m { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.m-eng .e-wf-m div { padding: 12px 14px 12px 0; }
.m-eng .e-wf-m div + div { padding-left: 14px; box-shadow: -1px 0 0 var(--line); }
.m-eng .e-wf-m span { display: block; font-size: 12px; color: var(--ink-3); }
.m-eng .e-wf-m b { font-size: 18px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.m-eng .e-req { display: block; min-width: 220px; max-width: 420px; line-height: 1.45; }
.m-eng .e-acts { display: inline-flex; gap: 6px; }

/* ---------- AI ---------- */
.m-eng .e-gov { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.m-eng .e-gv { padding: 22px 22px 22px 0; }
.m-eng .e-gv + .e-gv { padding-left: 22px; box-shadow: -1px 0 0 var(--line); }
.m-eng .e-gv-i { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--tc); background: var(--tc-bg); margin-bottom: 12px; }
.m-eng .e-gv-i .ic { width: 16px; height: 16px; }
.m-eng .e-gv h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.m-eng .e-gv p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.m-eng .e-mx-wrap { margin: -4px 0; }
.m-eng .e-mx { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 13px; }
.m-eng .e-mx thead th { font-size: 11.5px; font-weight: 500; color: var(--ink-3); padding: 4px 2px 12px; vertical-align: bottom; text-align: center; line-height: 1.25; }
.m-eng .e-mx thead th span { display: inline-block; max-width: 80px; }
.m-eng .e-mx tbody th { text-align: left; font-weight: 500; padding: 9px 12px 9px 0; white-space: nowrap; border-top: 1px solid var(--line); }
.m-eng .e-mx td { text-align: center; border-top: 1px solid var(--line); padding: 9px 2px; }
.m-eng .e-mx td i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, white); vertical-align: middle; }
.m-eng .e-mx tbody tr:hover td, .m-eng .e-mx tbody tr:hover th { background: var(--panel-2); }
.m-eng .e-mx .num { text-align: right; padding-right: 4px; font-variant-numeric: tabular-nums; }

/* ---------- notifications ---------- */
.m-eng .e-ch { margin-bottom: 8px; }
.m-eng .e-chn { display: flex; align-items: flex-start; gap: 10px; }
.m-eng .e-chn > i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-top: 6px; flex: none; }
.m-eng .e-chn b { display: block; font-weight: 500; }
.m-eng .e-chn small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.4; max-width: 280px; }
.m-eng .e-sent { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 5px; font-variant-numeric: tabular-nums; }
.m-eng .e-sent .meter { width: 64px; height: 3px; }
.m-eng .e-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.m-eng .e-total b { font-size: 16px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.m-eng .e-qw { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.m-eng .e-day { position: relative; display: inline-block; width: 96px; height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; flex: none; }
.m-eng .e-day i { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--tc) 55%, white); }
.m-eng .e-day b { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.9); }

/* ---------- reporting ---------- */
.m-eng .e-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.m-eng .e-out-c { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; transition: border-color var(--t-fast); }
.m-eng .e-out-c:hover { border-color: var(--ink-4); }
.m-eng .e-out-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-eng .e-out-h b { font-size: 14px; font-weight: 600; }
.m-eng .e-out-m { font-size: 12.5px; color: var(--ink-3); }
.m-eng .e-out-c .chips { gap: 4px; }
.m-eng .e-out-c small { font-size: 12px; color: var(--ink-3); }
.m-eng .e-facts { list-style: none; margin: 16px 0 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.m-eng .e-facts li { position: relative; padding: 8px 0 8px 18px; border-top: 1px solid var(--line); line-height: 1.5; }
.m-eng .e-facts li::before { content: ''; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok-dot); }
.m-eng .e-formula { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; color: var(--ink-2); background: var(--panel-2); border-radius: 6px; padding: 3px 7px; display: inline-block; line-height: 1.5; }
.m-eng .e-in { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ---------- drawers (rendered in #drawer) ---------- */
.e-rules { margin: 0; padding: 0; list-style: none; }
.e-rules li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.e-rules li:first-child { border-top: 0; }
.e-rules code { color: var(--ink-3); padding-top: 1px; }
.e-fine { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
.e-enf small { white-space: normal; }
.e-draft { margin-top: 20px; }
.e-draft-st { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); }
.e-draft-st .grow { flex: 1; }
.e-ro p { margin: 6px 0 0; }
.e-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.e-form .fld { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.e-form .fld > span, .e-form legend { font-size: 12.5px; font-weight: 500; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.e-form textarea.inp, .e-form input.inp { width: 100%; min-width: 0; }
.e-form .fld-err { color: var(--bad); font-size: 12px; }
.e-form [aria-invalid="true"] { border-color: var(--bad-dot); }
.e-radio { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; cursor: pointer; border-top: 1px solid var(--line); min-height: 40px; }
.e-radio:first-of-type { border-top: 0; }
.e-radio input { width: 16px; height: 16px; accent-color: var(--tc); margin: 0; }
.e-confirm { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 10px; border: 1px solid #F4C9C4; background: var(--bad-bg); }
.e-confirm span { font-size: 12.5px; color: var(--ink-2); }
.e-confirm .row { margin-top: 6px; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.bad:hover { background: #9E2117; border-color: #9E2117; }
.e-note { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); font-size: 13px; color: var(--ink-2); }
.e-out { font-size: 14px; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .m-eng .e-sw b { font-size: 19px; }
  .m-eng .e-gov { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-eng .e-gv:nth-child(3) { padding-left: 0; box-shadow: none; }
  .m-eng .e-gv:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 1100px) {
  .m-eng .e-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .m-eng .e-sw { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .m-eng .e-sw button { box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
}
@media (max-width: 860px) {
  .m-eng .e-k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-eng .e-wf { grid-template-columns: minmax(0, 1fr); }
  .m-eng .e-wf-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
  .m-eng .e-wf-list button { flex: 0 0 auto; }
  .m-eng .e-wf-m { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-eng .e-wf-m div:nth-child(3) { padding-left: 0; box-shadow: none; border-top: 1px solid var(--line); }
  .m-eng .e-wf-m div:nth-child(4) { border-top: 1px solid var(--line); }
  .m-eng .e-out { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .m-eng .e-sw { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; }
  .m-eng .e-sw button { padding: 12px 14px; }
  .m-eng .e-sw button:last-child { grid-column: 1 / -1; }
  .m-eng .e-sw b { font-size: 17px; margin-top: 4px; }
  .m-eng .e-hero { padding: 20px 18px; border-radius: var(--r); }
  .m-eng .e-hero h2 { font-size: 19px; }
  .m-eng .e-trio b { font-size: 26px; }
  .m-eng .e-trio-sm { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .m-eng .e-trio-sm > div + div { padding-left: 0; box-shadow: none; }
  .m-eng .e-fan { padding-left: 20px; }
  .m-eng .e-fan-r::before { left: -14px; width: 14px; }
  .m-eng .e-fan-r::after { left: -18px; }
  .m-eng .e-fan::before { left: 2px; }
  .m-eng .e-run { padding: 18px 16px; }
  .m-eng .e-tl li { grid-template-columns: 70px 16px minmax(0, 1fr); gap: 8px; }
  .m-eng .e-tl time { font-size: 11px; }
  .m-eng .e-tl i::before { left: 4px; }
  .m-eng .e-tl li:not(:last-child) i::after { left: 7.5px; }
  .m-eng .e-k4 .kv { font-size: 22px; }
  .m-eng .e-gov { grid-template-columns: minmax(0, 1fr); }
  .m-eng .e-gv, .m-eng .e-gv + .e-gv { padding: 18px 0; box-shadow: none; }
  .m-eng .e-gv + .e-gv { border-top: 1px solid var(--line); }
  .m-eng .e-wf-body { padding: 18px 16px; }
  .e-rules li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-eng .e-sw button::after, .e-stack a { transition: none; }
}
.m-eng .tbl-wrap { position: relative; }
@media (max-width: 600px) { .m-eng .tbl-wrap .tbl { min-width: 720px; } .m-eng .e-ex { min-width: 220px; } }
.e-form [hidden], #drawer .e-form [hidden] { display: none !important; }

/* ==========================================================================
   V2 visuals and V3 motion (module-local). Entrance keyframes start hidden but the resting
   state is always visible, so prefers-reduced-motion simply removes the animation.
   ========================================================================== */
.m-eng { --e-d1: var(--dur-1, 150ms); --e-d2: var(--dur-2, 250ms); --e-d3: var(--dur-3, 400ms); --e-out: var(--ease-out, cubic-bezier(.2,.7,.2,1)); --e-spring: var(--ease-spring, cubic-bezier(.34,1.56,.64,1)); }
@keyframes e-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes e-pop { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
@keyframes e-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes e-dash { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes e-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes e-pulse { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.m-eng .e-draw { stroke-dasharray: 1; animation: e-dash 360ms var(--e-out) backwards; animation-delay: var(--d, 0ms); }
.m-eng #e-body > * { animation: e-rise var(--e-d3) var(--e-out) backwards; }
.m-eng #e-body > *:nth-child(2) { animation-delay: 60ms; } .m-eng #e-body > *:nth-child(3) { animation-delay: 120ms; } .m-eng #e-body > *:nth-child(n+4) { animation-delay: 120ms; }
.m-eng .e-vt-p.e-in { animation: e-fade var(--e-d2) var(--e-out) backwards; }
.m-eng .lift { transition: transform var(--e-d2) var(--e-out), box-shadow var(--e-d2) var(--e-out), border-color var(--e-d1); }
.m-eng .lift:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -14px rgba(11,15,25,.22); }
.m-eng .e-sw button:active, .m-eng .btn:active { transform: scale(.97); }
.m-eng .e-sw button { transition: background var(--e-d1), transform var(--e-d1) var(--e-spring); }
.m-eng .e-sw button:hover .ic { transform: translateY(-1px) rotate(-6deg); }
.m-eng .e-sw .ic { transition: transform var(--e-d2) var(--e-spring); }
.m-eng .e-vt-seg { flex: none; }
.m-eng .e-vt-seg .ic { width: 14px; height: 14px; }
.m-eng .e-vt-seg button { display: inline-flex; align-items: center; gap: 6px; }
.m-eng .sec-h > .row { gap: 12px; }
.m-eng .card-h > .row { gap: 8px; flex: none; }
.m-eng .e-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-3); margin-top: 12px; }
.m-eng .e-leg span { display: inline-flex; align-items: center; gap: 7px; }
.m-eng .e-leg .sq { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.m-eng .e-fine { font-size: 12.5px; color: var(--ink-3); margin: 14px 0 0; }
.m-eng svg [data-open], .m-eng svg [data-tip] { cursor: pointer; outline: none; }
.m-eng svg [data-open]:focus-visible, .m-eng svg [data-tip]:focus-visible { stroke: var(--ink); stroke-width: 2px; }

/* sunburst */
.m-eng .e-sb-card { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 36px; align-items: center; padding: 28px 30px; }
.m-eng .e-sb-fig { display: flex; flex-direction: column; align-items: center; }
.m-eng .e-sb { width: 100%; max-width: 380px; height: auto; overflow: visible; }
.m-eng .e-arc { transform-box: view-box; transform-origin: 50% 50%; animation: e-pop 360ms var(--e-spring) backwards; animation-delay: var(--d, 0ms); transition: opacity var(--e-d1), transform var(--e-d2) var(--e-out); stroke: var(--panel); stroke-width: 1px; }
.m-eng .e-arc-o { opacity: .78; }
.m-eng .e-sb:hover .e-arc { opacity: .45; }
.m-eng .e-sb .e-arc:hover, .m-eng .e-sb .e-arc:focus-visible { opacity: 1; transform: scale(1.025); }
.m-eng .e-sb-v { font-size: 40px; font-weight: 500; letter-spacing: -.04em; fill: var(--ink); font-variant-numeric: tabular-nums; }
.m-eng .e-sb-l { font-size: 12px; fill: var(--ink-3); }
.m-eng .e-sb-key { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); column-gap: 28px; }
.m-eng .e-sb-key li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.m-eng .e-sb-key li > i { width: 10px; height: 10px; border-radius: 3px; }
.m-eng .e-sb-n { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-eng .e-sb-n .lnk { font-weight: 500; font-size: 13.5px; }
.m-eng .e-sb-n small, .m-eng .e-sb-r small { font-size: 11.5px; color: var(--ink-3); }
.m-eng .e-sb-r { text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.m-eng .e-sb-r b { font-size: 17px; font-weight: 500; letter-spacing: -.02em; }

/* radial bars */
.m-eng .e-rbars { width: 100%; height: auto; max-height: 300px; display: block; }
.m-eng .e-rb-bg { fill: none; stroke: var(--panel-3); stroke-linecap: round; }
.m-eng .e-rb { fill: none; stroke-linecap: round; transition: stroke-width var(--e-d1); }
.m-eng .e-rb:hover, .m-eng .e-rb:focus-visible { stroke-width: 12px; }
.m-eng .e-rb-t { font-size: 11.5px; fill: var(--ink-2); }
.m-eng .e-rb-t tspan { font-weight: 600; fill: var(--ink); }

/* pipeline */
.m-eng .e-pipe { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; position: relative; }
.m-eng .e-pipe li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 16px; border: 1px solid var(--line); border-radius: 12px; animation: e-rise var(--e-d3) var(--e-out) backwards; animation-delay: var(--d, 0ms); }
.m-eng .e-pipe li::after { content: ''; position: absolute; top: 50%; right: -24px; width: 24px; height: 1px; background: var(--line-2); }
.m-eng .e-pipe li:nth-child(2n)::after { display: none; }
.m-eng .e-pipe-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--tc); background: var(--tc-bg); margin-bottom: 6px; }
.m-eng .e-pipe b { font-size: 13.5px; font-weight: 600; }
.m-eng .e-pipe li > span:last-child { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.m-eng .e-pipe li:hover { border-color: var(--tc-line); }
.m-eng .e-pipe li:hover .e-pipe-n { background: var(--tc); color: #fff; transform: scale(1.1); }
.m-eng .e-pipe-n { transition: background var(--e-d2), color var(--e-d2), transform var(--e-d2) var(--e-spring); }
.m-eng .e-pipe-pulse { display: none; }

/* swimlane */
.m-eng .e-sl-wrap { overflow-x: auto; margin: 4px -4px 0; }
.m-eng .e-sl { width: 100%; min-width: 720px; height: auto; display: block; }
.m-eng .e-sl-a { fill: var(--panel-2); } .m-eng .e-sl-b { fill: var(--panel); }
.m-eng .e-sl-l { font-size: 12px; fill: var(--ink-3); font-weight: 500; }
.m-eng .e-sl-path { fill: none; stroke: var(--tc-line); stroke-width: 2; }
.m-eng .e-sl-m { animation: e-pop 360ms var(--e-spring) backwards; animation-delay: var(--d, 0ms); transform-box: fill-box; transform-origin: center; }
.m-eng .e-sl-m circle { fill: var(--panel); stroke: var(--c); stroke-width: 2; transition: fill var(--e-d1); }
.m-eng .e-sl-m text { font-size: 11px; font-weight: 600; fill: var(--ink); pointer-events: none; }
.m-eng .e-sl-m:hover circle, .m-eng .e-sl-m:focus-visible circle { fill: var(--c); }
.m-eng .e-sl-m:hover text, .m-eng .e-sl-m:focus-visible text { fill: #fff; }
.m-eng .e-sl-gap line { stroke: var(--warn-dot); stroke-width: 1.5; stroke-dasharray: 3 3; }
.m-eng .e-sl-gap text { font-size: 11px; fill: var(--warn); font-weight: 500; }
.m-eng .e-sl-key { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 20px; }
.m-eng .e-sl-key li { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 8px; font-size: 12.5px; }
.m-eng .e-sl-key em { grid-row: 1 / 4; font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-3); padding-top: 1px; }
.m-eng .e-sl-key time { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.m-eng .e-sl-key b { font-weight: 500; }

/* sankey + approvals */
.m-eng .e-appr-card { padding: 24px 26px; }
.m-eng .e-sk-wrap { overflow-x: auto; }
.m-eng .e-sk { width: 100%; min-width: 620px; height: auto; display: block; }
.m-eng .e-sk-l { fill: none; stroke-opacity: .32; stroke-dasharray: 1; animation: e-dash 360ms var(--e-out) backwards; animation-delay: var(--d, 0ms); transition: stroke-opacity var(--e-d1); }
.m-eng .e-sk-l:hover, .m-eng .e-sk-l:focus-visible { stroke-opacity: .9; }
.m-eng .e-sk-t { font-size: 12.5px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.m-eng .e-sk-s { font-size: 11px; fill: var(--ink-3); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.m-eng .e-appr-q { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }

/* bubbles */
.m-eng .e-bub { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 4px; }
.m-eng .e-bub-i { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 8px 14px; border-radius: 14px; color: var(--ink); text-decoration: none; animation: e-pop 360ms var(--e-spring) backwards; animation-delay: var(--d, 0ms); transition: background var(--e-d1); }
.m-eng .e-bub-i:hover, .m-eng .e-bub-i:focus-visible { background: var(--panel-2); }
.m-eng .e-bub-c { fill: color-mix(in srgb, var(--tc) 10%, white); stroke: var(--tc-line); transition: fill var(--e-d2); }
.m-eng .e-bub-i:hover .e-bub-c { fill: color-mix(in srgb, var(--tc) 18%, white); }
.m-eng .e-bub-p { fill: none; stroke: var(--warn-dot); stroke-width: 2; stroke-dasharray: 3 3; }
.m-eng .e-bub text { font-size: 15px; font-weight: 600; fill: var(--tc-ink); font-variant-numeric: tabular-nums; }
.m-eng .e-bub-i b { font-size: 13px; font-weight: 500; }
.m-eng .e-bub-i small { font-size: 11.5px; color: var(--ink-3); }
.m-eng .e-warn { color: var(--warn); } .m-eng .e-bad { color: var(--bad); }

/* model tiles */
.m-eng .e-mt { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.m-eng .e-mt-i { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; animation: e-rise var(--e-d3) var(--e-out) backwards; animation-delay: var(--d, 0ms); }
.m-eng .e-mt-i header { display: flex; justify-content: space-between; align-items: center; }
.m-eng .e-mt-i h3 { font-size: 14.5px; font-weight: 600; margin-top: 4px; }
.m-eng .e-mt-i h3 .lnk { color: var(--ink); }
.m-eng .e-mt-i h3 .lnk:hover { color: var(--tc); }
.m-eng .e-mt-k { margin: 0; font-size: 12px; color: var(--ink-3); }
.m-eng .e-mt-v { display: flex; align-items: center; gap: 14px; margin: 8px 0 4px; }
.m-eng .e-mt-v small { display: block; font-size: 11px; color: var(--ink-3); }
.m-eng .e-g-bg { fill: none; stroke: var(--panel-3); stroke-width: 5; }
.m-eng .e-g-fg { fill: none; stroke-width: 5; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 28px 28px; transition: stroke-dasharray var(--e-d3) var(--e-out); }
.m-eng .e-mt-v svg text { font-size: 12px; font-weight: 600; fill: var(--ink); font-variant-numeric: tabular-nums; }
.m-eng .e-spark { display: block; overflow: visible; }
.m-eng .e-thr { stroke: var(--bad-dot); stroke-dasharray: 2 3; stroke-width: 1; opacity: .7; }
.m-eng .e-mt-i dl { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 10px; margin: 6px 0 4px; font-size: 12.5px; }
.m-eng .e-mt-i dt { color: var(--ink-3); } .m-eng .e-mt-i dd { margin: 0; }
.m-eng .e-mt-i footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }

/* waffle */
.m-eng .e-waf-in { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 28px; align-items: start; }
.m-eng .e-waf-g { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; aspect-ratio: 1; }
.m-eng .e-waf-g i { border-radius: 3px; animation: e-pop 300ms var(--e-spring) backwards; animation-delay: var(--d, 0ms); }
.m-eng .e-waf-l { list-style: none; margin: 0; padding: 0; }
.m-eng .e-waf-l li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 38px; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.m-eng .e-waf-l li:first-child { border-top: 0; }
.m-eng .e-waf-l i { width: 10px; height: 10px; border-radius: 3px; }
.m-eng .e-waf-l b { font-weight: 500; font-variant-numeric: tabular-nums; }
.m-eng .e-waf-l span { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* routing matrix */
.m-eng .e-rm { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.m-eng .e-rm th, .m-eng .e-rm td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.m-eng .e-rm thead th { font-size: 12px; font-weight: 500; color: var(--ink-3); text-align: center; }
.m-eng .e-rm thead th:first-child, .m-eng .e-rm thead th:last-child { text-align: left; }
.m-eng .e-rm tbody th { text-align: left; font-weight: 400; }
.m-eng .e-rm tbody th b { display: block; font-weight: 500; }
.m-eng .e-rm small { font-size: 11.5px; color: var(--ink-3); }
.m-eng .e-rm td { text-align: center; }
.m-eng .e-rm td:last-child { text-align: left; }
.m-eng .e-rm .dot { width: 9px; height: 9px; }
.m-eng .e-rm tbody tr { animation: e-rise var(--e-d3) var(--e-out) backwards; animation-delay: var(--d, 0ms); }
.m-eng .e-rm tbody tr:hover { background: var(--panel-2); }

/* quiet rings */
.m-eng .e-qr { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.m-eng .e-qr-i { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; animation: e-pop 360ms var(--e-spring) backwards; animation-delay: var(--d, 0ms); }
.m-eng .e-qr-bg { fill: none; stroke: var(--panel-3); stroke-width: 8; }
.m-eng .e-qr-q { fill: none; stroke: var(--tc); stroke-width: 8; stroke-linecap: round; opacity: .75; }
.m-eng .e-qr-tk { stroke: var(--ink-4); stroke-width: 1.5; }
.m-eng .e-qr-v { font-size: 16px; font-weight: 600; fill: var(--ink); }
.m-eng .e-qr-s { font-size: 11px; fill: var(--ink-3); }
.m-eng .e-qr-i figcaption { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-3); }
.m-eng .e-qr-i figcaption small { font-size: 12px; }
.m-eng .e-qr-i figcaption b { font-size: 13px; color: var(--ink); font-weight: 600; }

/* treemap */
.m-eng .e-tm { position: relative; height: 330px; border-radius: 12px; overflow: hidden; }
.m-eng .e-tm-c { position: absolute; box-sizing: border-box; border: 2px solid var(--panel); border-radius: 8px; padding: 10px 12px; background: color-mix(in srgb, var(--c) 14%, white); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; animation: e-pop 360ms var(--e-spring) backwards; animation-delay: var(--d, 0ms); transition: background var(--e-d2); }
.m-eng .e-tm-c::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c); }
.m-eng .e-tm-c:hover, .m-eng .e-tm-c:focus-visible { background: color-mix(in srgb, var(--c) 26%, white); }
.m-eng .e-tm-c b { font-size: 20px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.m-eng .e-tm-c span { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* formula cards */
.m-eng .e-fc { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.m-eng .e-fc-i { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; animation: e-rise var(--e-d3) var(--e-out) backwards; animation-delay: var(--d, 0ms); }
.m-eng .e-fc-i h3 { font-size: 14.5px; font-weight: 600; }
.m-eng .e-frac { display: flex; flex-direction: column; align-items: flex-start; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; color: var(--ink-2); }
.m-eng .e-frac span { padding: 4px 0; }
.m-eng .e-frac span:first-child { border-bottom: 1.5px solid var(--ink-2); }
.m-eng .e-frac1 { margin: 0; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.m-eng .e-fc-i footer { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-3); }
.m-eng .e-fc-n b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.m-eng .e-fc-i .meter { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 0; }
.m-eng .e-fc-i .meter i { transform-origin: left; animation: e-grow 360ms var(--e-out) backwards; animation-delay: var(--d, 0ms); }

/* lollipop */
.m-eng .e-lp { list-style: none; margin: 0; padding: 0; }
.m-eng .e-lp li { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) 56px; gap: 16px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); animation: e-rise var(--e-d3) var(--e-out) backwards; animation-delay: var(--d, 0ms); }
.m-eng .e-lp li:first-child { border-top: 0; }
.m-eng .e-lp-n { min-width: 0; display: flex; flex-direction: column; }
.m-eng .e-lp-n b { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-eng .e-lp-n small { font-size: 11.5px; color: var(--ink-3); }
.m-eng .e-lp-b { position: relative; height: 10px; }
.m-eng .e-lp-b i { position: absolute; left: 0; top: 4px; height: 2px; background: color-mix(in srgb, var(--c) 45%, white); border-radius: 2px; transform-origin: left; animation: e-grow 360ms var(--e-out) backwards; animation-delay: calc(var(--d, 0ms) + 60ms); }
.m-eng .e-lp-b i::after { content: ''; position: absolute; right: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, white); }
.m-eng .e-lp li:hover .e-lp-b i::after { transform: scale(1.25); }
.m-eng .e-lp-b i::after { transition: transform var(--e-d2) var(--e-spring); }
.m-eng .e-lp-v { text-align: right; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* workflow steps light in sequence */
.e-fl-n { animation: e-rise var(--dur-3, 360ms) var(--ease-out, ease) backwards; }
.e-fl-n:nth-child(2) { animation-delay: 40ms; } .e-fl-n:nth-child(3) { animation-delay: 80ms; } .e-fl-n:nth-child(4) { animation-delay: 120ms; } .e-fl-n:nth-child(5) { animation-delay: 120ms; } .e-fl-n:nth-child(6) { animation-delay: 140ms; }
.e-fl-n::before { animation: e-light 360ms var(--ease-out, ease) backwards; animation-delay: inherit; }
@keyframes e-light { from { box-shadow: inset 0 0 0 2px var(--line-2); } to { box-shadow: inset 0 0 0 2px var(--c); } }
.e-fl-trig::before { animation: none; }

@media (max-width: 1100px) {
  .m-eng .e-sb-card { grid-template-columns: minmax(0, 1fr); }
  .m-eng .e-sl-key { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .m-eng .e-sb-card, .m-eng .e-appr-card { padding: 18px 16px; }
  .m-eng .e-pipe { grid-template-columns: minmax(0, 1fr); }
  .m-eng .e-pipe li::after { display: none; }
  .m-eng .e-waf-in { grid-template-columns: minmax(0, 1fr); }
  .m-eng .e-waf-g { max-width: 220px; }
  .m-eng .e-tm { height: 420px; }
  .m-eng .e-lp li { grid-template-columns: minmax(0, 1fr) 56px; }
  .m-eng .e-lp-b { grid-column: 1 / -1; grid-row: 2; }
  .m-eng .sec-h > .row { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .m-eng *, .m-eng *::before, .m-eng *::after, .e-fl-n, .e-fl-n::before { animation: none !important; transition: none !important; }
  .m-eng .e-draw { stroke-dasharray: none; }
  .m-eng .e-sk-l { stroke-dasharray: none; }
}

.m-eng .e-leg .dot { width: 8px; height: 8px; }
.m-eng .e-bub-i b { line-height: 1.3; }
.m-eng .card-h { flex-wrap: wrap; } .m-eng .card-h > div:first-child { flex: 1 1 280px; min-width: 0; }
.m-eng .e-vt-p { display: block; } .m-eng .e-vt-p[hidden] { display: none; } .m-eng .e-vt-p .tbl-wrap { width: 100%; }
.m-eng .e-wf-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.m-eng .e-wf-side .e-wf-list { border-right: 0; flex: 1; }
.m-eng .e-wf-pg { padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.m-eng .e-wf-pg .pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-eng .e-wf-pg .pg-range { font-size: 12px; color: var(--ink-3); }
@media (max-width: 860px) { .m-eng .e-wf-side { border-right: 0; border-bottom: 1px solid var(--line); } }
.m-eng .e-tm-k { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 18px; font-size: 12.5px; }
.m-eng .e-tm-k li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 0; }
.m-eng .e-tm-k i { width: 10px; height: 10px; border-radius: 3px; }
.m-eng .e-tm-k b { font-weight: 500; font-variant-numeric: tabular-nums; }
.m-eng .e-tm-c span { white-space: normal; display: block; overflow: hidden; text-overflow: clip; line-height: 1.25; overflow-wrap: normal; }
.m-eng .e-tm-c span[hidden] { display: none; }
.m-eng .e-mx thead th span { max-width: 92px; }
.m-eng .e-rb-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.m-eng .e-rb-list li { display: grid; grid-template-columns: 10px minmax(12ch, 1fr) 7ch 5ch; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.m-eng .e-rb-list em { font-style: normal; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.m-eng .e-rb-list b { text-align: right; }
.m-eng .e-rb-list .e-rb-h { border-top: 0; font-size: 12px; color: var(--ink-3); padding-top: 0; }
.m-eng .e-rb-list .e-rb-h b { font-weight: 500; color: var(--ink-3); }

.m-eng .e-rbw { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 24px; align-items: center; }
@container (max-width: 520px) { .m-eng .e-rbw > .e-rbars { max-width: 240px; margin: 0 auto; } }
.m-eng .e-rb-list i { width: 10px; height: 10px; border-radius: 3px; }
.m-eng .e-rb-list b { font-weight: 600; font-variant-numeric: tabular-nums; }

#drawer .e-nowrap { white-space: nowrap; }

/* Narrow screens: the decision swimlane and approvals flow become lists (no hidden side-scrolling). */
.m-eng .e-sl-own { grid-column: 2; font-size: 12px; color: var(--ink-3); }
.m-eng .e-sk-list { display: none; list-style: none; margin: 0; padding: 0; }
.m-eng .e-sk-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.m-eng .e-sk-list li:first-child { border-top: 0; }
.m-eng .e-sk-ln { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.m-eng .e-sk-ln .dot { margin: 0 4px 0 2px; vertical-align: middle; }
.m-eng .e-sk-list small { font-size: 12px; color: var(--ink-3); }
/* The flow diagram needs about 860px of card width; narrower cards show the same flow as a list. */
.m-eng .e-appr-card { container-type: inline-size; container-name: eapcard; }
@container eapcard (max-width: 860px) {
  .m-eng .e-sk-wrap { display: none; }
  .m-eng .e-sk-list { display: block; margin-bottom: 8px; }
}
@media (max-width: 760px) {
  .m-eng .e-sl-wrap { display: none; }
  .m-eng .e-sl-key { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .m-eng .e-wf-list { flex-direction: column; overflow-x: visible; }
  .m-eng .e-wf-list button { flex: none; }
}
.m-eng .e-waf-l li > * { min-width: 0; }
.m-eng .e-waf-l a { overflow-wrap: anywhere; }
.m-eng .e-waf-in > * { min-width: 0; }
@media (max-width: 860px) {
  .m-eng .e-wf-list { flex-direction: column; overflow-x: visible; }
  .m-eng .e-wf-list button { flex: none; }
  .m-eng .e-sl { min-width: 0; }
}

/* Tab labels may wrap to two lines; reserve the second line so every figure stays on one baseline. */
@media (max-width: 1440px) { .m-eng .e-sw-l { min-height: 2.7em; } }
/* Approvals in a narrow card: each request becomes a stacked row so status and decision actions are always in view.
   Follows the card's own width, so 1024 laptops with the sidebar open get the stacked form too. */
.m-eng .e-appr-q { container-type: inline-size; container-name: eappr; }
@container eappr (max-width: 900px) {
  .m-eng .e-appr-q .tbl-wrap { overflow: visible; }
  .m-eng .e-appr-q table, .m-eng .e-appr-q tbody { display: block; width: 100%; min-width: 0 !important; }
  .m-eng .e-appr-q thead tr { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .m-eng .e-appr-q thead th { display: block; border: 0; padding: 0 0 6px; }
  .m-eng .e-appr-q tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 14px 0; border-top: 1px solid var(--line); }
  .m-eng .e-appr-q tbody td { display: block; padding: 0; border: 0; text-align: left; }
  .m-eng .e-appr-q tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .m-eng .e-appr-q tbody td:nth-child(5) { grid-column: 2; grid-row: 1; justify-self: end; }
  .m-eng .e-appr-q tbody td:nth-child(2) { grid-column: 1 / -1; }
  .m-eng .e-appr-q tbody td:nth-child(3) { grid-column: 1; color: var(--ink-2); }
  .m-eng .e-appr-q tbody td:nth-child(4) { grid-column: 2; justify-self: end; color: var(--ink-2); }
  .m-eng .e-appr-q tbody td:nth-child(3)::before { content: 'Approver '; color: var(--ink-3); }
  .m-eng .e-appr-q tbody td:nth-child(4)::before { content: 'Raised '; color: var(--ink-3); }
  .m-eng .e-appr-q tbody td:nth-child(6) { grid-column: 1 / -1; }
  .m-eng .e-appr-q tbody td:only-child { grid-column: 1 / -1; }
}
/* By application: the legend needs room for full names; below that the waffle stacks above the legend.
   Name column never narrower than 12ch and wraps only between words; count and share columns are fixed. */
.m-eng .e-waf { container-type: inline-size; container-name: ewaf; }
.m-eng .e-waf-l li { grid-template-columns: 10px minmax(12ch, 1fr) 6ch 4.5ch; }
.m-eng .e-waf-l a { overflow-wrap: normal; word-break: normal; hyphens: none; }
.m-eng .e-waf-l b { text-align: right; }
@container ewaf (max-width: 520px) {
  .m-eng .e-waf-in { grid-template-columns: minmax(0, 1fr); }
  .m-eng .e-waf-in .e-waf-g { max-width: 220px; }
}
.m-eng .e-mt-q { display: flex; flex-direction: column; }
.m-eng .e-mt-q b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-eng .e-mt-q small { font-size: 11.5px; color: var(--ink-3); }
.m-eng .e-tm-c .app-ic { position: absolute; top: 8px; right: 8px; }
.m-eng .e-sl { min-width: 0; }
.m-eng .e-out-h { flex-wrap: wrap; }
.m-eng .e-out-c, .m-eng .e-out-h > * { min-width: 0; }
/* Notifications: the channel and application cards sit side by side only when each has room for a readable table. */
@media (max-width: 1180px) { .m-eng .e-nt2 { grid-template-columns: minmax(0, 1fr); } }
.m-eng .e-chn small { max-width: none; }
/* Hyphenated names and codes never break at their hyphen. */
.m-eng .e-waf-l a, .m-eng .e-tm-c span, .m-eng .e-tm-k a, .m-eng .e-chn b, .m-eng .e-rb-list span, .m-eng .e-lp-n b, .m-eng .e-lp-n small, .m-eng .tbl td b, .m-eng code { hyphens: manual; }
.m-eng .nwh { white-space: nowrap; display: inline !important; color: inherit !important; background: none !important; width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; font: inherit !important; text-align: inherit !important; }
.m-eng .e-rbw-o { container-type: inline-size; }
@container (max-width: 520px) { .m-eng .e-rbw { grid-template-columns: minmax(0, 1fr); } }
.m-eng .e-sk-n { fill: color-mix(in srgb, var(--c) 9%, var(--panel)); stroke: color-mix(in srgb, var(--c) 30%, var(--panel)); stroke-width: 1; }
.m-eng .e-sk-t, .m-eng .e-sk-s { stroke: none; }
