/* WAHAJ prototype — connected missions, projects and Lab (docs/DECISIONS.md V6G-43). Same components and tokens as the
   builder, Projects and Lab; no gradients, no shadows. */

/* ---------- a project open in the builder: its card in the left column ---------- */
.pw-card { max-height: 690px}
.pw-card h2 { margin: 6px 0 4px}
.pw-goal { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; color: #d1d1d6}
.pw-why { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: rgba(139, 92, 246, 0.14); font-size: 12.5px; line-height: 1.45; color: #e5e5ea}
.pw-why svg { flex: none; margin-top: 2px; color: #b79cff}
.pw-ks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; overflow: auto; min-height: 0}
.pw-k { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 13px; color: #c7c7cc; flex-wrap: wrap}
.pw-k > i { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11.5px; color: #a1a1a6; background: rgba(255, 255, 255, 0.06)}
.pw-k > span { flex: 1; min-width: 0}
.pw-k.done { color: #8e8e93}
.pw-k.done > i { color: #0a0a0b; background: #00FF6F}
.pw-k.now { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff}
.pw-k.now > i { color: #0a0a0b; background: #f5f5f7}
.pw-k .fp-show { margin-inline-start: 30px}
.pw-src { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: #8e8e93}
.pw-top .sp { flex: 1}
.pw-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px}
.pw-note { margin: 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 15px; line-height: 1.55}
.pw-note small { display: block; margin-top: 10px; font-size: 12.5px; color: var(--muted)}
[data-theme="light"] .pw-goal, [data-theme="light"] .pw-k { color: #3a3a3c}
[data-theme="light"] .pw-k.now { color: #1d1d1f; background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.12)}
[data-theme="light"] .pw-k > i { background: rgba(0, 0, 0, 0.06); color: #6e6e73}
[data-theme="light"] .pw-k.now > i { background: #1d1d1f; color: #fff}
[data-theme="light"] .pw-why { color: #1d1d1f; background: rgba(139, 92, 246, 0.12)}

/* ---------- design thumbnails: the design itself, from above ---------- */
.dthumb { display: block; width: 100%; height: 100%}
.dthumb .dt-land { fill: #c9a878}
.dthumb .dt-village { fill: #e9dcc6; stroke: #b49a74; stroke-width: .6}
.dthumb .dt-well { fill: #2E6FD8}
.dthumb .dt-l { stroke-width: 1.6; stroke-linecap: round; stroke: #38BDF8}
.dthumb .dt-l.cable { stroke: #FFD60A; stroke-width: 1.1; stroke-dasharray: 3 2}
.dthumb .dt-l.drip { stroke: #00FF6F}
.dthumb .dt-l.off { stroke: #FF2D8A; stroke-dasharray: 2 2}
.pim .dthumb, .psi .dthumb { position: absolute; inset: 0}
.pim, .psi { position: relative}
.prow .dthumb { width: 64px; height: 44px; border-radius: 8px; flex: none}

/* ---------- Projects: versions, evidence kinds, the template chooser ---------- */
.pv-list { display: grid; gap: 6px; margin-top: 4px}
.pv-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); text-align: start; color: var(--text)}
.pv-row .pv-th { width: 64px; height: 40px; border-radius: 8px; overflow: hidden}
.pv-row b { display: block; font-size: 13px}
.pv-row small { font-size: 12px; color: var(--muted)}
.pk { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .01em; border: 1px solid var(--line-2); color: var(--text)}
.pk.simulated { border-color: rgba(56, 189, 248, 0.5); color: #7dd3fc}
.pk.supplied { border-color: rgba(139, 92, 246, 0.55); color: #c4b5fd}
.pk.measured { border-color: rgba(255, 214, 10, 0.55); color: #ffe066}
.pk.explained { border-color: rgba(0, 255, 111, 0.45); color: #7dffb5}
[data-theme="light"] .pk.simulated { color: #0369a1} [data-theme="light"] .pk.supplied { color: #6d28d9} [data-theme="light"] .pk.measured { color: #8a6d00} [data-theme="light"] .pk.explained { color: #047a3a}
.ev2 { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; width: 100%; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); text-align: start; color: var(--text); margin-bottom: 6px}
.ev2 .ei { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--tile)}
.ev2 b { display: block; font-size: 13.5px; line-height: 1.3}
.ev2 small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted)}
.ev2 p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted)}
.ps-src { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12.5px; color: var(--muted)}
.ps-goal { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13px; line-height: 1.45}
.ps-goal b { display: block; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px}

.np-tpls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px}
.np-tpl { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: start; color: var(--text); min-height: 96px}
.np-tpl .ni { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tile); color: var(--accent)}
.np-tpl b { display: block; font-size: 14.5px; margin-bottom: 4px}
.np-tpl small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--muted)}
.np-tpl.on { border-color: var(--accent); background: var(--accent-soft, rgba(0, 255, 111, 0.06))}
.np-tpl.own .ni { color: var(--text)}
.np-goals { display: grid; gap: 8px}
.np-goal { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: start; color: var(--text); font-size: 13.5px; line-height: 1.4}
.np-goal i { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line-2)}
.np-goal.on { border-color: var(--accent)}
.np-goal.on i { border-color: var(--accent); background: var(--accent)}
.np-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted)}

/* ---------- the Quiet Garden, in the builder's frame ---------- */
.fg.pg .mx-scene.fg-scene.pg-scene { display: block; background: #161618}
.fg.pg .mx-scene.fg-scene.pg-scene .pg-svg { position: absolute; left: 344px; top: 150px; width: 760px; height: 330px}
.fg.pg.test .mx-scene.fg-scene.pg-scene .pg-svg { left: 424px; top: 96px; width: 600px; height: 260px}
.pg-shelf { fill: #6b5a44}
.pg-tank { fill: rgba(255, 255, 255, 0.08); stroke: rgba(255, 255, 255, 0.55); stroke-width: 2}
.pg-water { fill: #38BDF8; opacity: .85}
.pg-base, .pg-pump { fill: #3a3a3c; stroke: rgba(255, 255, 255, 0.25)}
.pg-pumpc { fill: none; stroke: #38BDF8; stroke-width: 3}
.pg-line { fill: none; stroke: #38BDF8; stroke-width: 3; stroke-linecap: round}
.pg-drop { fill: #38BDF8}
.pg-pot { fill: #b86b3c}
.pg-leaf { fill: none; stroke: #4cbb5e; stroke-width: 5; stroke-linecap: round}
.pg-probe { stroke: #c7c7cc; stroke-width: 3}
.pg-sens, .pg-timer { fill: #8B5CF6}
.pg-hand { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round}
.pg-tx { fill: #f5f5f7; font: 600 14px var(--font, inherit)}
.pg-part { cursor: pointer; outline: none}
.pg-part.on > *:first-child, .pg-part:focus-visible > *:first-child { stroke: #FF2D8A; stroke-width: 3}
.pg-th { display: block; width: 100%; height: 100%; background: #161618}
.pg-th .pg-svg { width: 100%; height: 100%}
.pg-ctl { position: absolute; inset-inline-end: 16px; top: 176px; width: 300px; z-index: 6; padding: 14px; display: grid; gap: 12px}
.pg-seg { display: flex; gap: 6px}
.pg-seg button { flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--line-2, rgba(255, 255, 255, 0.14)); color: var(--text-2, #e5e5ea); font-size: 13px}
.pg-seg button.on { border-color: var(--accent, #00FF6F); color: var(--text, #fff)}
.pg-step { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 13px; color: var(--text-2, #d1d1d6)}
.pg-step small { grid-column: 1 / -1; font-size: 12px; color: #8e8e93}
.pg-num, .pg-tankstep { display: flex; align-items: center; gap: 8px}
.pg-num button, .pg-tankstep button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-2, rgba(255, 255, 255, 0.18)); color: var(--text, #fff); font-size: 17px; line-height: 1}
.pg-num b, .pg-tankstep b { min-width: 44px; text-align: center; font-size: 15px}
.pg-note { display: flex; gap: 6px; margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted, #a1a1a6)}
.pg-tray .fg-slot { height: 138px}
.pg-tray .pg-tankstep { margin-top: auto; gap: 4px}
.pg-tray .pg-tankstep button { width: 24px; height: 24px; font-size: 15px}
.pg-tray .pg-tankstep b { min-width: 34px; font-size: 12.5px}
.pg-tb { width: 820px; bottom: 74px}
.pg-result { display: block; padding: 16px}
.pg-scs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0}
.pg-sc { padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12)}
.pg-sc.ok { border-color: rgba(0, 255, 111, 0.45)} .pg-sc.no { border-color: rgba(255, 45, 138, 0.55)}
.pg-sc b { display: flex; align-items: center; gap: 6px; font-size: 13.5px}
.pg-sc small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted, #a1a1a6)}
.pg-ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 12.5px}
.pg-tabs { display: flex; gap: 6px}
.pg-tabs button { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2, rgba(255, 255, 255, 0.14)); font-size: 12px; color: var(--text-2, #d1d1d6)}
.pg-tabs button.on { border-color: var(--accent, #00FF6F); color: var(--text, #fff)}
.pg-dmsg { min-height: 20px; margin: 8px 0 0; font-size: 13px; color: #FF80C0}

/* ---------- charts drawn from computed data (garden and Lab) ---------- */
.lx-chart { display: block; max-width: 100%}
.lx-grid { stroke: rgba(255, 255, 255, 0.08)}
.lx-ax { fill: #8e8e93; font-size: 10.5px}
.lx-l { fill: none; stroke-width: 2; stroke-linejoin: round}
.lx-l.a { stroke: #38BDF8} .lx-l.b { stroke: #00FF6F} .lx-l.c { stroke: #8B5CF6} .lx-l.d { stroke: #FFD60A; stroke-dasharray: 5 3}
.lx-leg { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 12px; color: #c7c7cc}
.lx-leg span { display: inline-flex; align-items: center; gap: 6px}
.lx-leg i { width: 14px; height: 3px; border-radius: 2px; display: inline-block}
.lx-leg i.a { background: #38BDF8} .lx-leg i.b { background: #00FF6F} .lx-leg i.c { background: #8B5CF6} .lx-leg i.d { background: #FFD60A}
[data-theme="light"] .fg.pg .mx-scene.fg-scene.pg-scene, [data-theme="light"] .pg-th { background: #ececef}
[data-theme="light"] .pg-tx { fill: #1d1d1f}
[data-theme="light"] .pg-tank { fill: rgba(0, 0, 0, 0.04); stroke: rgba(0, 0, 0, 0.45)}
[data-theme="light"] .lx-grid { stroke: rgba(0, 0, 0, 0.08)}
[data-theme="light"] .lx-leg { color: #3a3a3c}

/* ---------- the Lab: test runs and experiments ---------- */
.lx-tabs { gap: 6px; padding-bottom: 10px; align-items: center}
.lx-tabs button { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text-2); font-size: 14.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px}
.lx-tabs button.on { border-color: var(--accent); color: var(--text)}
.lx-tabs button small { font-size: 12.5px; font-weight: 500; color: var(--muted)}
.lx-kinds { display: grid; gap: 8px; padding: 2px 2px 8px}
.lx-kind { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); text-align: start; color: var(--text)}
.lx-kind:hover { border-color: var(--accent)}
.lx-kind b { display: block; font-size: 14px}
.lx-kind small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: var(--muted)}
.lx-ki { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tile); color: var(--accent)}
.lx-ki.sm { width: 26px; height: 26px; border-radius: 8px}
.lx-row { grid-template-columns: 26px minmax(0, 1fr) auto}
.lx-gh { margin-top: 6px}
.lx-none { margin: 8px 6px; font-size: 13px; color: var(--muted)}
.lx-pane { gap: 14px}
.lx-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start}
.lx-head h3 { margin: 4px 0 2px; font-size: 21px}
.lx-head p { margin: 0; font-size: 13.5px; color: var(--muted)}
.lx-proj { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); text-align: start}
.lx-proj span { min-width: 0} .lx-proj small { display: block; font-size: 11px; color: var(--muted)} .lx-proj b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis}
.lx-steps { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0}
.lx-steps li { flex: 1; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); font-size: 12.5px; color: var(--muted)}
.lx-steps li i { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: var(--tile)}
.lx-steps li.done { color: var(--text-2)} .lx-steps li.done i { background: var(--accent); color: var(--accent-ink, #0a0a0b)}
.lx-steps li.now { border-color: var(--accent); color: var(--text)} .lx-steps li.now i { background: var(--text); color: var(--panel)}
.lx-body { display: grid; gap: 12px}
.lx-body h5 { margin: 0; font-size: 15px}
.lx-body h6 { margin: 0 0 6px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted)}
.lx-ins { display: grid; gap: 8px}
.lx-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13.5px; flex-wrap: wrap}
.lx-in .pg-num button { border-color: var(--line-2); color: var(--text)}
.lx-in .pg-seg button { color: var(--text); border-color: var(--line-2); padding: 0 12px}
.lx-opts { display: flex; flex-wrap: wrap; gap: 6px}
.lx-opts button { height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2)}
.lx-opts button.on { border-color: var(--accent); color: var(--text)}
.lx-pv { width: 70px; height: 32px; text-align: center}
.lx-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted)}
.lx-cnt { margin: 0; font-size: 13px; color: var(--text-2)}
.lx-cnt.ok { color: var(--accent)} .lx-cnt.warn { color: #FF80C0}
.lx-acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap}
.lx-runs { display: flex; flex-wrap: wrap; gap: 6px}
.lx-rb { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 4px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text)}
.lx-rb.on { border-color: var(--accent)}
.lx-rb i { width: 8px; height: 8px; border-radius: 50%} .lx-rb i.ok { background: var(--accent)} .lx-rb i.no { background: #FF2D8A}
.lx-rb .lb-ab { width: 22px; height: 22px}
.lx-cmpgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px}
.lx-dr { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px}
.lx-ctl { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.4; border: 1px solid var(--line-2)}
.lx-ctl.ok { border-color: rgba(0, 255, 111, 0.4)} .lx-ctl.warn { border-color: rgba(255, 45, 138, 0.55); color: var(--text)}
.lx-ctl .ico, .lx-ctl svg { flex: none; margin-top: 1px}
.lx-tab { width: 100%; border-collapse: collapse; font-size: 13px}
.lx-tab th, .lx-tab td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: start}
.lx-tab th { font-size: 12px; color: var(--muted); font-weight: 600}
.lx-ch b { display: block; margin-bottom: 4px; font-size: 12.5px}
.lx-ta { width: 100%; min-height: 90px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; font-size: 14px; resize: vertical}
.lx-quote { margin: 0; padding: 10px 14px; border-inline-start: 3px solid var(--accent); background: var(--panel-2); border-radius: 8px; font-size: 14px; line-height: 1.5}
.lx-intro h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 18px}
.lx-intro p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--text-2)}
[data-theme="light"] .lx-ax { fill: #6e6e73}

/* ---------- the Missions strip after the whole farm passes ---------- */
.mch-go.mch-next { display: flex; flex-direction: column; align-items: stretch; gap: 8px}
.mch-go.mch-next small { font-size: 12.5px; color: var(--muted)}
.mch-go.mch-next .btn { height: 40px; justify-content: center}

/* ---------- Show: said, or written and drawn ---------- */
.sb-tabs { display: flex; gap: 6px; margin-bottom: 12px}
.sb-tabs button { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2)}
.sb-tabs button.on { border-color: var(--accent); color: var(--text)}
.sb-parts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px}
.sb-parts .chip { height: 32px}
.sb-flowline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 52px; padding: 10px; border-radius: 12px; border: 1px dashed var(--line-2)}
.sb-box { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--accent); font-size: 13px}
.sb-arr { display: inline-flex; color: var(--muted)}
.fw-scope, .rc-scope { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted)}

/* ---------- the briefs on the Projects page (V6G-43b) ---------- */
.pbrief-h { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; margin: 8px 2px -4px; flex-wrap: wrap}
.pbrief-h b { font-size: 16px; font-weight: 600}
.pbrief-h small { font-size: 13px; color: var(--muted)}
.pcard2.pbrief { border-style: dashed}
.pcard2.pbrief.on { border-style: solid}
.pbrief-ic { position: absolute; inset: 0; display: grid; place-items: center; background: var(--tile, #1d1d1f); color: var(--accent)}
.pcard2 .badge.brief, .p-side .psi .badge.brief { display: inline-flex; align-items: center; gap: 6px; width: auto; height: 28px; padding: 0 11px; white-space: nowrap; font-size: 12px; letter-spacing: .04em; background: rgba(17, 17, 18, 0.88); color: #f5f5f7; border: 1px solid rgba(255, 255, 255, 0.18)}
.pcard2 .pbrief-go { color: var(--accent); font-weight: 600; gap: 6px}
.pbr-tasks { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 8px}
.pbr-tasks li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.35}
.pbr-tasks li i { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--tile, #232325)}
.pbr-body .np-goals { margin-bottom: 8px}
[data-theme="light"] .pcard2.pbrief .pbrief-go { color: #047a3a}
