/* Utopia web revamp v3 — engine figure. Engraved ink on paper (D5 Fig. 1) with the D2 prism light on hover. */
.eng{position:relative;color:var(--ink);font-family:var(--f-body)}
.eng-fig{position:relative}
.eng-lay{position:relative;margin:0 auto}
.eng-lay--d{display:none}
.eng-lay--m{max-width:460px}
@media (min-width:1100px){
  .eng-lay--d{display:block;max-width:1160px}
  .eng-lay--m{display:none}
}
.eng-svg{display:block;width:100%;height:auto;overflow:visible;-webkit-tap-highlight-color:transparent}

/* type (SVG units; the desktop figure renders at ~0.85-1x, the mobile figure at ~0.9-1.25x) */
.eng-k,.eng-dk{font-family:var(--f-display);font-weight:600;letter-spacing:-.01em;fill:var(--ink);font-size:19px}
.eng-dk{font-size:20px}
.eng-s{font-family:var(--f-body);font-weight:400;font-size:15.5px;fill:var(--mute)}
.eng-ctl-t{font-family:var(--f-body);font-weight:500;font-size:15.5px;fill:var(--ink-2)}
.eng-lay--m .eng-k,.eng-lay--m .eng-dk{font-size:16.5px}
.eng-lay--m .eng-s,.eng-lay--m .eng-ctl-t{font-size:15px}

/* engraved icons */
.eng-ic path,.eng-ic rect,.eng-ic circle{stroke:var(--ink);stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;transition:stroke var(--d1) ease}
.eng-paper{fill:var(--linen)}
.eng .eng-ic .eng-inkfill{fill:var(--ink);stroke:none}
.eng-dot{fill:var(--blue)}

/* ribbons: hatched band + ink core; ray, glow and light dashes appear when lit */
.eng-band{fill:none;stroke-linecap:butt;opacity:.55;transition:opacity var(--d3) var(--ease)}
.eng-core{fill:none;stroke:var(--blue);stroke-width:1.3;opacity:.6;transition:opacity var(--d3) var(--ease)}
.eng-glow{fill:none;stroke:var(--blue-pale);stroke-linecap:round;opacity:0;transition:opacity var(--d3) var(--ease)}
.eng-ray{fill:none;stroke:var(--blue-deep);stroke-width:2.2;stroke-linecap:round;opacity:0;transition:opacity var(--d2) var(--ease)}
.eng-spark{fill:none;stroke:var(--white);stroke-width:2.2;stroke-linecap:round;stroke-dasharray:.035 .215;opacity:0;transition:opacity var(--d2) ease}
.eng-lay--m .eng-ray,.eng-lay--m .eng-spark{stroke-width:2}

/* the prism */
.eng-tri-fill{transition:opacity var(--d3) var(--ease)}
.eng-tri-shade{opacity:.55}
.eng-tri-edge{fill:none;stroke:var(--blue-darker);stroke-width:1.6;stroke-linejoin:round}
.eng-tri-glow{fill:var(--linen);opacity:0;transition:opacity 500ms var(--ease)}
.eng-inner{opacity:0;transition:opacity var(--d2) var(--ease)}
.eng-halo{fill:none;stroke:var(--linen);stroke-width:6;stroke-linecap:round}
.eng-inner .eng-ray,.eng-inner .eng-spark{opacity:1}

/* people in control */
.eng-link{fill:none;stroke:var(--blue-darker);stroke-width:1.4;stroke-dasharray:2 4;stroke-linecap:round}
.eng-link-tip{fill:none;stroke:var(--blue-darker);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}

/* nodes */
.eng-node{cursor:pointer;outline:none;transition:opacity var(--d2) var(--ease)}
.eng-hit{fill:transparent}
.eng-focus{fill:none;stroke:var(--blue);stroke-width:2;opacity:0}
.eng-node:focus-visible .eng-focus{opacity:1}
.eng-node text{transition:fill var(--d1) ease}

/* lit state (hover, tap, focus, idle tour) */
.eng.has-lit .eng-path:not(.is-lit) .eng-band{opacity:.13}
.eng.has-lit .eng-path:not(.is-lit) .eng-core{opacity:.16}
.eng-path.is-lit .eng-band{opacity:.85}
.eng-path.is-lit .eng-glow{opacity:.55}
.eng-path.is-lit .eng-ray{opacity:1}
.eng-path.is-lit .eng-spark{opacity:1;animation:eng-flow 1.15s linear infinite}
.eng-inner.is-lit{opacity:1}
.eng.has-lit .eng-tri-glow{opacity:.42}
/* resting labels stay readable (4.5:1 or better on the paper); the dimmed ribbons carry the emphasis */
.eng.has-lit .eng-node:not(.is-lit){opacity:.88}
.eng-node.is-lit .eng-ic path,.eng-node.is-lit .eng-ic rect,.eng-node.is-lit .eng-ic circle{stroke:var(--blue-deep)}
.eng-node.is-lit .eng-k,.eng-node.is-lit .eng-dk{fill:var(--blue-deep)}
.eng-node.is-lit .eng-dot{fill:var(--blue-deep)}
.eng.has-lit .eng-ctl .eng-ic path,.eng.has-lit .eng-ctl .eng-ic rect,.eng.has-lit .eng-ctl .eng-ic circle{stroke:var(--blue-deep)}
.eng.is-off .eng-path.is-lit .eng-spark,body.paused .eng .eng-path.is-lit .eng-spark{animation-play-state:paused}
@keyframes eng-flow{from{stroke-dashoffset:0}to{stroke-dashoffset:-.25}}

/* "Utopia AI" engine name (HTML so AI can carry the --ai-glow gradient) */
.eng-name{position:absolute;margin:0;transform:translate(-50%,-50%);font:700 28px/1 var(--f-display);letter-spacing:-.02em;color:var(--ink);white-space:nowrap;pointer-events:none}
.eng-lay--m .eng-name{font-size:23px}
.eng-ai{background:var(--ai-glow);-webkit-background-clip:text;background-clip:text;color:transparent}

/* scroll draw-in: labels settle once the ribbons are drawn (JS adds .is-armed only when it can animate) */
.eng-t,.eng-ctl{transition:opacity var(--d3) var(--ease),transform var(--d3) var(--ease),fill var(--d1) ease;transform-box:fill-box}
.eng.is-armed .eng-t,.eng.is-armed .eng-ctl{opacity:.3;transform:translateY(6px)}
.eng.is-armed .eng-name{transform:translate(-50%,calc(-50% + 6px))}

/* result line */
.eng-out{margin-top:clamp(18px,2.6vw,30px);text-align:center}
.eng-lines{list-style:none;margin:0 auto;padding:0;display:grid;gap:8px;max-width:640px}
.eng-line{font:500 15px/1.45 var(--f-body);color:var(--ink-2)}
.eng-ln-k{font-family:var(--f-display);font-weight:600;color:var(--blue-deep)}
.eng-ln-k::after{content:" \2014"}
.eng-line--sig,.eng-line--prompt{display:none}
.eng.is-js .eng-lines{grid-template-areas:"a";min-height:3.2em;align-items:center}
.eng.is-js .eng-line{grid-area:a;display:block;opacity:0;visibility:hidden;transform:translateY(4px);transition:opacity var(--d2) var(--ease),transform var(--d2) var(--ease),visibility 0s linear var(--d2);pointer-events:none}
.eng.is-js .eng-line.is-on{opacity:1;visibility:visible;transform:none;transition-delay:0s}
.eng.is-js .eng-line--dep .eng-ln-t,.eng.is-js .eng-line--sig .eng-ln-t{font:600 clamp(19px,2vw,26px)/1.3 var(--f-display);letter-spacing:-.015em;color:var(--ink)}
.eng.is-js .eng-ln-k{display:block;font-size:15px;margin-bottom:4px}
.eng.is-js .eng-ln-k::after{content:none}
.eng.is-js .eng-line--prompt .eng-ln-t{font:500 16px/1.4 var(--f-body);color:var(--mute)}
.eng:not(.is-js) .eng-line.is-on .eng-ln-t{color:var(--ink);font-weight:600}
/* phone: the result next to the tapped row */
.eng-pop{position:absolute;left:4px;right:4px;margin:0;z-index:2;padding:10px 14px;background:var(--surface);border-radius:var(--r-card);box-shadow:var(--shadow-lift);text-align:left;pointer-events:none;opacity:0;transform:translateY(4px);transition:opacity var(--d1) var(--ease),transform var(--d1) var(--ease)}
.eng-pop.is-on{opacity:1;transform:none}
.eng-pop .eng-ln-k{display:block;font:600 14px/1.3 var(--f-display);color:var(--blue-deep)}
.eng-pop .eng-ln-k::after{content:none}
.eng-pop .eng-ln-t{display:block;font:600 18px/1.3 var(--f-display);letter-spacing:-.01em;color:var(--ink)}
.eng-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0}

@media (prefers-reduced-motion:reduce){
  .eng *,.eng *::before{transition-duration:150ms!important;transition-delay:0s!important}
  .eng-spark{display:none}
  .eng.is-armed .eng-t,.eng.is-armed .eng-ctl{opacity:1;transform:none}
}

/* round 6: the outcome of each department, highlighted under its line */
.eng-ln-o{display:inline-block;margin:6px 0 0 6px;padding:5px 12px;border-radius:999px;background:var(--wa-wash,color-mix(in srgb,var(--wa) 20%,var(--white)));color:var(--wa-ink);font:700 14px/1.25 var(--f-display);letter-spacing:-.005em;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--wa-deep) 26%,transparent)}
.eng.is-js .eng-ln-o{display:table;margin:12px auto 0;padding:8px 16px;font-size:clamp(15px,1.4vw,17px)}
.eng.is-js .eng-lines{min-height:6.4em}
.eng-pop .eng-ln-o{display:inline-block;margin:8px 0 0;font-size:14px;padding:5px 12px}

/* phone figure: the result shows in the card beside the tapped row (.eng-pop), so the line under the figure only
   keeps its one-line prompt and holds no empty band open */
@media (max-width:1099px){
  .eng.is-js .eng-lines{min-height:0}
  .eng.is-js .eng-line--dep,.eng.is-js .eng-line--sig{display:none}
  .eng.is-js .eng-line--prompt{opacity:1;visibility:visible;transform:none}
}
