/* Engineering jobs (engdesign.js) */
.engv .eng-head { margin: 0 0 14px; }
.engv .eng-h1 { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.engv .eng-h1 h2 { margin: 0 0 2px; font-size: 1.15rem; }
.engv .eng-review { margin: 8px 0 0; font-size: .8rem; color: var(--warn, #9a6700); }
.engv tr.tap { cursor: pointer; }
.engv tr.tap:hover td { background: var(--hover, rgba(0,0,0,.03)); }
.engv .grid2, .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.eng-devs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0 0 12px; }
.eng-devs .chk { display: flex; gap: 6px; align-items: center; font-size: .9rem; }
.eng-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.eng-stats div { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 8px 10px; }
.eng-stats b { display: block; font-size: 1.15rem; }
.eng-stats span { font-size: .78rem; color: var(--muted, #667); }
.eng-plot { border: 1px solid var(--line, #ddd); border-radius: 12px; background: var(--card, #fff); overflow-x: auto; }
.eng-plot svg { width: 100%; min-width: 640px; height: auto; display: block; touch-action: none; }
.eng-plot .ep-unit { fill: none; stroke: var(--line, #ccc); stroke-dasharray: 6 4; }
.eng-plot .ep-rack { fill: rgba(120,130,150,.18); stroke: rgba(120,130,150,.6); }
.eng-plot .ep-lab { font: 600 10px system-ui, sans-serif; fill: var(--muted, #667); }
.eng-plot .ep-eq { cursor: grab; }
.eng-plot .ep-eq rect { stroke: rgba(0,0,0,.45); stroke-width: .8; }
.eng-plot .ep-tag { font: 600 8px system-ui, sans-serif; text-anchor: middle; fill: var(--ink, #222); pointer-events: none; }
.eng-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; font-size: .78rem; }
.eng-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.engv .eng-live { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.engv .eng-who { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--acc, #e85d04); color: #fff; font: 700 11px system-ui, sans-serif; }
.engv .eng-who.me { outline: 2px solid var(--ink, #222); outline-offset: 1px; }
.engv .eng-units { display: flex; flex-wrap: wrap; gap: 8px; }
.engv .eng-unit { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 6px 10px; }
.engv td.nowrap { white-space: nowrap; }
.eng-cmts { margin-top: 14px; border-top: 1px solid var(--line, #ddd); padding-top: 8px; }
.eng-cmt { padding: 6px 0; border-bottom: 1px dashed var(--line, #ddd); font-size: .9rem; }
.eng-cmt.done { opacity: .55; }
.eng-cadd { display: flex; gap: 6px; margin-top: 8px; }
.eng-cadd input { flex: 1; }
.eng-revs .eng-rev { border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
.eng-revs .eng-rev h3 { margin: 0; display: flex; gap: 8px; align-items: center; }
.eng-revs ul { margin: 6px 0 0 18px; padding: 0; font-size: .88rem; }
.engv .eng-quick { margin: 0 0 14px; }
.eng-tpls { display: grid; gap: 8px; margin: 0 0 12px; }
.eng-tpl { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.eng-tpl span { display: flex; flex-direction: column; gap: 2px; }
.eng-tpl small { color: var(--muted, #667); font-size: .78rem; }
.eng-draft { margin: 6px 0; padding-left: 18px; font-size: .88rem; columns: 2; }
.engv .eng-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; }
.engv .eng-pick .chk { display: flex; gap: 6px; align-items: center; font-size: .9rem; }
.engv .eng-code { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin-top: 12px; padding: 12px; border: 2px dashed var(--acc, #e85d04); border-radius: 12px; }
.engv .eng-code b { font: 700 1.6rem ui-monospace, Menlo, monospace; letter-spacing: .08em; }
.engv .eng-codein { display: flex; gap: 8px; max-width: 420px; }
.engv .eng-codein input { flex: 1; font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; }
.engv .eng-prev { margin-top: 12px; border-color: var(--acc, #e85d04); }
.engv .eng-red { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; }
.engv .eng-red.done { opacity: .6; }
.engv .eng-pkg { margin: 0 0 10px; }
.engv .eng-sent { margin: 8px 0 0 18px; padding: 0; font-size: .88rem; }

/* Plot plan (Oct 26): true scale on a footage grid, draggable equipment and racks, 3D under it */
.ep-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 6px; }
.ep-bar select { width: auto; }
.ep-zoom { display: inline-flex; align-items: center; gap: 6px; }
.ep-zoom span { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }
.eng-plot.ep-scroll { overflow: auto; max-height: 70vh; background: #fbfcfd; }
.eng-plot.ep-scroll svg { width: auto; min-width: 0; max-width: none; }
.eng-plot .ep-gm { stroke: rgba(80,100,130,.10); stroke-width: 1; }
.eng-plot .ep-gM { stroke: rgba(80,100,130,.28); stroke-width: 1; }
.eng-plot .ep-gl { fill: #6b7686; font-family: system-ui, sans-serif; font-weight: 600; pointer-events: none; }
.eng-plot .ep-rackrun { fill: rgba(120,130,150,.10); stroke: rgba(120,130,150,.35); stroke-width: 1; }
.eng-plot .ep-rack { fill: rgba(120,130,150,.22); stroke: rgba(90,100,120,.7); stroke-width: 1.2; }
.eng-plot .ep-rack.ep-drag { cursor: ew-resize; }
.eng-plot .ep-unit { fill: none; stroke: rgba(90,100,120,.45); stroke-width: 1; stroke-dasharray: 6 4; pointer-events: none; }
.eng-plot .ep-ul { fill: #3b4554; font-family: system-ui, sans-serif; font-weight: 700; pointer-events: none; }
.eng-plot .ep-rl { fill: #4b5563; font-family: system-ui, sans-serif; font-weight: 600; text-anchor: middle; pointer-events: none; opacity: .8; }
.eng-plot .ep-eq rect, .eng-plot .ep-eq circle { stroke: rgba(0,0,0,.55); stroke-width: 1; }
.eng-plot .ep-eq.ep-drag { cursor: grab; }
.eng-plot .ep-eq.sel rect, .eng-plot .ep-eq.sel circle { stroke: #1d4ed8; stroke-width: 2.5; }
.eng-plot .ep-eq.bad rect, .eng-plot .ep-eq.bad circle { stroke: #c0392b; stroke-width: 2.5; stroke-dasharray: 4 2; }
.eng-plot .ep-tag { font-family: system-ui, sans-serif; font-weight: 700; text-anchor: middle; fill: #1f2937; pointer-events: none; }
.ep-st { font-weight: 600; }
.ep-st.ok { color: #1e7d45; } .ep-st.bad { color: #b42318; } .ep-st.run { color: #8a5a00; }
.ep-tip { position: fixed; z-index: 9999; background: rgba(20,24,32,.92); color: #fff; font: 600 12px system-ui, sans-serif; padding: 4px 8px; border-radius: 6px; pointer-events: none; }
.ep-panel { margin-top: 10px; }
.ep-3d { position: relative; height: 440px; margin-top: 10px; border: 1px solid var(--line, #ddd); border-radius: 12px; overflow: hidden; background: #eef1f4; }
.ep-3d canvas { display: block; width: 100% !important; height: 100% !important; }
.ep-3d .ep-3dmsg { position: absolute; left: 12px; top: 8px; margin: 0; }
.eng-plot .ep-rack.sel { stroke: #1d4ed8; stroke-width: 2.5; fill: rgba(29,78,216,.18); }
.eng-plot .ep-rack.ep-drag { cursor: move; }
.eng-plot .ep-bridge { fill: none; stroke: #2563eb; stroke-width: 2; stroke-dasharray: 6 4; opacity: .8; }
.eng-plot .ep-bridge:hover { opacity: 1; stroke-width: 3; }

/* still working on the model / drawings (Oct 27): stays in the corner on every screen */
.eng-busy { position: fixed; right: 16px; bottom: 16px; z-index: 9998; width: min(340px, calc(100vw - 32px)); background: #1f2633; color: #fff;
  border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(0,0,0,.28); font: 13px/1.35 system-ui, sans-serif; }
.eng-busy .eb-top { display: flex; align-items: center; gap: 8px; }
.eng-busy b { font-weight: 700; }
.eng-busy .eb-msg { margin: 6px 0 8px; opacity: .92; }
.eng-busy .eb-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; margin-bottom: 8px; }
.eng-busy .eb-bar i { display: block; height: 100%; width: 0; background: #f59e0b; transition: width .3s; }
.eng-busy .eb-note { font-size: 11.5px; opacity: .7; }
.eng-busy .eb-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #f59e0b; animation: ebspin .8s linear infinite; flex: none; }
@keyframes ebspin { to { transform: rotate(360deg); } }
.eng-plot .ep-snap { fill: #fff; stroke: #1d4ed8; stroke-width: 1.5; pointer-events: none; }
.eng-plot .ep-snaphi { fill: rgba(16,185,129,.25); stroke: #059669; stroke-width: 2.5; pointer-events: none; }
.ep-snapchk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ep-snapchk input { width: auto; }
.ep-3dbar { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: rgba(255,255,255,.95);
  border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 6px 10px; font-size: 13px; max-width: calc(100% - 20px); }
.ep-3dbar span { color: #667; }
.m3-hide { margin: 6px 0; gap: 6px; }

/* ---- code check (Oct 27, engcode.js) */
.eng-cc .sect-h .pill{margin-left:8px;white-space:normal}
.ec-disc{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.ec-d{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line,#ddd);border-radius:999px;padding:2px 8px;font-size:12px}
.ec-d i{font-style:normal;font-weight:600;border-radius:999px;padding:0 6px;background:var(--chip,#eef0f2)}
.ec-d i.bad{background:#fde7e6;color:#a50e0e}.ec-d i.warn{background:#fef3dc;color:#8a5a00}
.ec-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.ec-list{display:flex;flex-direction:column;gap:4px;max-height:420px;overflow:auto}
.ec-row{display:flex;gap:8px;align-items:flex-start;text-align:left;width:100%;background:none;border:1px solid var(--line,#e3e5e8);border-left-width:4px;border-radius:6px;padding:6px 8px;cursor:pointer;font:inherit;color:inherit}
.ec-row.error{border-left-color:#d93025}.ec-row.warning{border-left-color:#f29900}.ec-row.advice{border-left-color:#9aa0a6}
.ec-row:hover,.ec-row:focus{background:var(--hover,#f5f6f7)}
.ec-msg{flex:1;min-width:0;font-size:13px;line-height:1.35}.ec-msg small{display:block;color:var(--muted,#6b7177);font-size:11px;margin-top:2px}
.ec-nc{margin-top:8px;font-size:13px}.ec-nc ul{margin:4px 0 0 18px;padding:0}
.ec-rules table td{vertical-align:top}
.ec-rev{margin-top:6px}.ec-rev details{margin-top:4px}.ec-errs{margin:4px 0 0 18px;padding:0;font-size:13px}
.ep-codekey{display:inline-flex;align-items:center;gap:4px;font-size:12px}.ep-codekey i{display:inline-block;width:10px;height:10px;border-radius:2px;background:#f29900}.ep-codekey i.bad{background:#d93025}
@media (prefers-color-scheme: dark){.ec-d i.bad{background:#5c1b17;color:#ffb4ab}.ec-d i.warn{background:#4a3606;color:#ffd88a}}
/* Oct 27: equipment design data (engmech.js) */
.ee-mech { margin: 10px 0; border: 1px solid var(--line, #d0d4da); border-radius: 8px; padding: 6px 10px; }
.ee-mech > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.ee-mech .hint { font-size: 12px; opacity: .8; margin: 4px 0 8px; }
#eeMechOut { font-variant-numeric: tabular-nums; }
/* Oct 27: changes since the last revision (plot plan + Revisions) */
.ep-st.pend { color: #8a5a00; background: #fff4dc; border: 1px solid #f0c36d; border-radius: 10px; padding: 1px 8px; cursor: pointer; white-space: nowrap; }
.ep-ghost rect, .ep-ghost circle { fill: none; stroke: #8b94a1; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.ep-ghost line { stroke: #8b94a1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.eng-pend { border-left: 4px solid #f0c36d; }
.eng-pend.none { border-left-color: #1e7d45; }
.eng-pend ul { margin: 4px 0 0; padding-left: 18px; }
@media (prefers-color-scheme: dark) { .ep-st.pend { background: #3a2c0c; color: #f3c868; border-color: #7a5a14; } }
