/* Widget styles: Stage 8 framework */
.wbox { display: grid; gap: 14px; }
.wsvg { width: 100%; height: auto; display: block; overflow: visible; }
.wsvg text { font-family: var(--mono), 'PhIcon'; font-size: 10px; fill: var(--ink-3); }
.wsvg .w-lab { font-family: var(--serif), 'PhIcon'; font-size: 15px; fill: var(--ink); font-style: italic; }
.wsvg .w-big { font-family: var(--serif), 'PhIcon'; font-size: 22px; fill: var(--ink); }
.wsvg .mono-s { font-family: var(--mono), 'PhIcon'; font-size: 10px; fill: var(--ink-3); text-transform: uppercase; }
.w-gl { stroke: var(--rule); stroke-width: .6; }
.w-ax { stroke: var(--ink-3); stroke-width: 1.2; fill: none; }
.w-line { stroke: var(--acc); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: all .3s; }
.w-line2 { stroke: var(--ink-2); stroke-width: 3; fill: none; stroke-dasharray: 7 5; stroke-linecap: round; }
.w-line3 { stroke: var(--rule); stroke-width: 1.6; fill: none; }
.w-guide { stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 4 4; fill: none; }
.w-pt { fill: var(--acc); stroke: var(--paper); stroke-width: 1.5; transition: cx .3s, cy .3s; }
.w-pt2 { fill: var(--gold); stroke: var(--ink); stroke-width: 1.2; transition: cx .3s, cy .3s; }
.w-cross { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }
.w-handle { fill: var(--paper); stroke: var(--acc); stroke-width: 3; cursor: grab; }
.w-handle:active { cursor: grabbing; fill: var(--acc-t); }
.w-shape { fill: color-mix(in oklab, var(--acc) 16%, transparent); stroke: var(--acc); stroke-width: 2.5; stroke-linejoin: round; }
.w-shape2 { fill: color-mix(in oklab, var(--gold) 35%, transparent); stroke: oklch(0.6 0.12 75); stroke-width: 2; }
.w-ghost { fill: none; stroke: var(--rule); stroke-width: 2; stroke-dasharray: 4 4; }
.w-obj { fill: color-mix(in oklab, var(--ink-3) 18%, transparent); stroke: var(--ink-3); stroke-width: 2; }
.w-img { fill: color-mix(in oklab, var(--acc) 30%, transparent); stroke: var(--acc); stroke-width: 2.5; }
.w-mirror { stroke: var(--bad); stroke-width: 1.6; stroke-dasharray: 6 4; }
.w-ray { stroke: oklch(0.7 0.15 80); stroke-width: 2.5; fill: none; }
.w-vec { stroke: var(--ink); stroke-width: 2; }
.w-edge { stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; }
.w-cell { fill: var(--acc); }
.w-neg { fill: var(--bad); }
.w-empty { fill: var(--paper); stroke: var(--rule); }
.w-area { fill: var(--acc-t); stroke: var(--acc); stroke-width: 2; }
.w-area2 { fill: color-mix(in oklab, var(--gold) 25%, var(--card)); stroke: oklch(0.6 0.12 75); stroke-width: 2; }
.w-face { fill: var(--acc); stroke: var(--ink); stroke-width: 1; }
.w-netf { stroke: var(--ink); stroke-width: 1.4; }
.w-jump { stroke: var(--acc); stroke-width: 2; fill: none; }
.w-int { stroke: var(--acc); stroke-width: 6; stroke-linecap: round; }
.w-open { fill: var(--paper); stroke: var(--acc); stroke-width: 3; }
.w-closed { fill: var(--acc); stroke: var(--acc); stroke-width: 3; }
.w-arrow { fill: var(--acc); }
.w-wedge { fill: color-mix(in oklab, var(--acc) 45%, transparent); stroke: var(--acc); }
.w-wedge2 { fill: color-mix(in oklab, var(--gold) 55%, transparent); stroke: oklch(0.6 0.12 75); }
.w-arcp { stroke: var(--acc); stroke-width: 2; fill: none; }
.w-arcp2 { stroke: oklch(0.6 0.12 75); stroke-width: 2; fill: none; }
.w-arcc { stroke: var(--ink-3); stroke-width: 1.4; fill: none; }
.w-right { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.w-ray { stroke-linecap: round; }
.w-venA { fill: color-mix(in oklab, var(--acc) 12%, transparent); stroke: var(--acc); stroke-width: 2; transition: fill .2s; }
.w-venB { fill: color-mix(in oklab, var(--gold) 14%, transparent); stroke: oklch(0.6 0.12 75); stroke-width: 2; transition: fill .2s; }
.w-venA.on { fill: color-mix(in oklab, var(--acc) 35%, transparent); }
.w-venB.on { fill: color-mix(in oklab, var(--gold) 40%, transparent); }
.w-uni { fill: var(--card); stroke: var(--ink-3); }
.w-uni.on { fill: var(--acc-t); }
.w-fac { font-family: var(--serif), 'PhIcon' !important; font-size: 18px !important; fill: var(--ink) !important; }
.w-fac.on { fill: var(--acc) !important; font-weight: 700; }
.w-bar { fill: var(--acc); }
.w-bar2 { fill: var(--ink-3); }
.w-rangebar { stroke: var(--ink); stroke-width: 2; }
.w-sec1 { fill: var(--bad); stroke: var(--paper); stroke-width: 2; }
.w-sec0 { fill: var(--card); stroke: var(--rule); stroke-width: 2; }
.w-pie { stroke: var(--paper); stroke-width: 2; }
.w-tree { stroke: var(--ink-3); stroke-width: 1.6; }
.w-tree.on { stroke: var(--acc); stroke-width: 3.5; }
.w-mirrorS { stroke: var(--ink); stroke-width: 3; }
.w-glass { fill: oklch(0.9 0.03 220 / .6); }
.w-water { fill: oklch(0.85 0.06 230 / .55); }
.w-farrow { stroke: var(--ink-3); stroke-width: 1.2; }
.w-compass { fill: var(--card); stroke: var(--ink); stroke-width: 1.5; }
.w-force { stroke: var(--acc); stroke-width: 4; }
.w-force2 { stroke: var(--ink-2); stroke-width: 4; }
.w-snow { fill: oklch(0.96 0.01 240); stroke: var(--rule); }
.w-tube { fill: oklch(0.98 0.005 240 / .6); stroke: var(--ink-3); stroke-width: 2; }
.w-liquid { fill: oklch(0.85 0.05 230); }
.w-beaker { fill: none; stroke: var(--ink-3); stroke-width: 2.5; }
.w-solute { fill: var(--acc); }
.w-metal { stroke: var(--ink-2); }
.w-bubble { fill: none; stroke: oklch(0.6 0.05 230); animation: wbub 1.4s infinite linear; }
@keyframes wbub { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-50px); opacity: 0; } }
.w-flame { fill: oklch(0.75 0.17 60); stroke: oklch(0.6 0.2 30); }
.w-burner { fill: var(--ink-3); }
.w-therm { fill: var(--card); stroke: var(--ink-3); stroke-width: 1.5; }
.w-merc { fill: var(--bad); transition: all .3s; }
.w-bulb { fill: var(--bad); }
.w-heat { stroke: var(--bad); stroke-width: 1.6; fill: none; opacity: .7; }
.w-paper { fill: oklch(0.99 0.004 90); stroke: var(--rule); }
.w-solvent { fill: oklch(0.85 0.05 230 / .7); }
.w-wet { fill: oklch(0.9 0.03 230 / .35); }
.w-pencil { stroke: var(--ink-2); stroke-width: 1; }
.w-foil { fill: oklch(0.8 0.12 85); }
.w-nuc { fill: var(--bad); }
.w-alpha { stroke: var(--acc); stroke-width: 1; opacity: .5; }
.w-alpha.hit { stroke: var(--bad); opacity: 1; stroke-width: 1.6; }
.w-shell { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.w-prot { fill: var(--bad); stroke: var(--paper); }
.w-neut { fill: var(--ink-3); stroke: var(--paper); }
.w-elec { fill: var(--acc); }
.w-chest { fill: oklch(0.95 0.02 30); stroke: var(--ink-3); stroke-width: 1.5; transition: d .2s; }
.w-rib { stroke: var(--ink-3); stroke-width: 3; fill: none; opacity: .5; }
.w-trach { stroke: oklch(0.7 0.06 30); stroke-width: 8; }
.w-lung { fill: oklch(0.75 0.1 15); stroke: oklch(0.55 0.12 15); }
.w-diaph { stroke: oklch(0.5 0.12 20); stroke-width: 5; fill: none; }
.w-alv { fill: oklch(0.95 0.02 230); stroke: oklch(0.6 0.08 15); stroke-width: 3; }
.w-cap { fill: oklch(0.8 0.08 20); stroke: oklch(0.55 0.15 25); stroke-width: 2; }
.w-o2 { fill: var(--acc); }
.w-co2 { fill: var(--ink-3); }
.w-bone { stroke: oklch(0.88 0.03 80); stroke-width: 14; stroke-linecap: round; }
.w-musc { stroke: oklch(0.6 0.15 20); fill: none; stroke-linecap: round; opacity: .85; transition: stroke-width .3s; }
.w-musc2 { stroke: oklch(0.5 0.1 20); fill: none; stroke-linecap: round; opacity: .7; transition: stroke-width .3s; }
.w-joint { fill: oklch(0.8 0.05 80); stroke: var(--ink-3); }
.w-socket { stroke: var(--ink-2); stroke-width: 8; fill: none; }
.w-core { fill: oklch(0.6 0.01 250); }
.w-coil { fill: none; stroke-width: 2.5; }
.w-wire { stroke: var(--ink-2); stroke-width: 2; }
.w-clip { fill: oklch(0.75 0.01 250); stroke: var(--ink-3); }
.w-earth { fill: oklch(0.6 0.1 230); stroke: oklch(0.45 0.1 230); stroke-width: 2; }
.w-atmos { fill: oklch(0.7 0.1 30); }
.w-sunray { stroke: oklch(0.8 0.15 85); stroke-width: 2.5; }
.w-fline { fill: none; stroke: var(--acc); stroke-width: 1.2; opacity: .6; }
.w-edge { transition: all .2s; }
.w-ct { fill: oklch(0.85 0.06 250); stroke: var(--ink); stroke-width: 1; }
.w-cl { fill: oklch(0.7 0.08 250); stroke: var(--ink); stroke-width: 1; }
.w-cr { fill: oklch(0.6 0.09 250); stroke: var(--ink); stroke-width: 1; }
.w-alg { font-style: italic; }
.w-sym { display: inline-block; min-width: 1.2em; text-align: center; color: var(--acc); }
.w-rec { text-decoration: overline; text-decoration-thickness: 2px; color: var(--acc); }
.w-ok { background: var(--acc-t); font-weight: 700; }

.wsl { display: grid; gap: 2px; min-width: 150px; flex: 1; }
.wsl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wsl-top b { font-family: var(--serif), 'PhIcon'; font-size: 18px; font-weight: 500; }
.wsl input { width: 100%; accent-color: var(--acc); height: 30px; }
.wseg { display: grid; gap: 4px; flex: 1 1 100%; min-width: 0; }
.wseg .chips { flex-wrap: wrap; }
.fig-head { flex-wrap: wrap; row-gap: 4px; }
.fig-head .t { min-width: 0; flex: 1 1 auto; line-height: 1.3; }
.wctl { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; border-top: 1px solid var(--rule); padding-top: 14px; }
.wnum { display: grid; gap: 4px; }
.wnum-c { display: flex; align-items: center; gap: 4px; }
.wnum-c button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); background: var(--card); font-size: 17px; line-height: 1; }
.wnum-c button:disabled { opacity: .3; }
.wnum-c b { font-family: var(--serif), 'PhIcon'; font-size: 19px; font-weight: 500; min-width: 28px; text-align: center; }
.wread { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.wread > div { padding: 10px 8px; border-right: 1px solid var(--rule); text-align: center; }
.wread > div:last-child { border-right: 0; }
.wread .v { font-family: var(--serif), 'PhIcon'; font-size: 21px; line-height: 1.2; }
.wread .l { font-family: var(--mono), 'PhIcon'; font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.wbig { font-family: var(--serif), 'PhIcon'; font-size: 26px; line-height: 1.25; }
.wbig b { color: var(--acc); font-weight: 500; }
.wdim { color: var(--ink-3); }
.wnote { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.wprompt { font-family: var(--serif), 'PhIcon'; font-size: 20px; }
.wsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.wlist { display: grid; gap: 10px; align-content: start; }
.wfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 12px; }
.wsteps { display: grid; border-top: 1px solid var(--rule); }
.wst-line { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 16px; animation: rise .3s forwards; opacity: 0; }
.wst-line span:last-child { font-family: var(--serif), 'PhIcon'; font-size: 18px; }
.wtable { border-collapse: collapse; width: 100%; font-size: 15px; }
.wtable th, .wtable td { border: 1px solid var(--rule); padding: 6px 10px; text-align: center; }
.wtable th { font-family: var(--mono), 'PhIcon'; font-size: 11px; font-weight: 400; color: var(--ink-3); text-transform: uppercase; background: var(--paper-2); }
.wtable td b { color: var(--acc); }
.wkey { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }

.wsort-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }
.wtile { border: 1.5px solid var(--rule); background: var(--card); border-radius: 6px; padding: 8px 14px; font-size: 15.5px; min-height: 42px; transition: all .15s; }
.wtile.sel { border-color: var(--acc); background: var(--acc-t); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acc) 20%, transparent); }
.wtile:disabled { opacity: .3; }
.wbins { display: grid; gap: 10px; }
.wbin { text-align: left; border: 1.5px dashed var(--rule); background: var(--paper); border-radius: 8px; padding: 10px; min-height: 110px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.wbin.hot:hover { border-color: var(--acc); background: var(--acc-t); }
.wbin-h { width: 100%; font-family: var(--mono), 'PhIcon'; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--acc); }
.wbin-it { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 8px; font-size: 14px; }
.shake { animation: wshake .4s; }
.chip.bad, .shake.bad { border-color: var(--bad) !important; color: var(--bad); }
@keyframes wshake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.wmatch { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wm-col { display: grid; gap: 8px; align-content: start; }
.wm-it { text-align: left; border: 1.5px solid var(--rule); background: var(--card); border-radius: 6px; padding: 10px 12px; font-size: 15px; min-height: 44px; }
.wm-it.sel { border-color: var(--ink); box-shadow: 0 0 0 3px var(--paper-2); }
.wm-it:disabled { cursor: default; }
.wslot-s { font-family: var(--serif), 'PhIcon'; font-size: 22px; line-height: 2; }
.wblank { display: inline-block; min-width: 70px; border: 0; border-bottom: 2px solid var(--ink-3); background: var(--paper-2); border-radius: 4px 4px 0 0; padding: 0 10px; margin: 0 3px; font: inherit; font-size: 20px; line-height: 1.4; }
.wblank.full { background: var(--acc-t); border-color: var(--acc); }
.wblank.bad { background: color-mix(in oklab, var(--bad) 15%, transparent); border-color: var(--bad); }
.wblank.good { background: color-mix(in oklab, var(--ok) 15%, transparent); border-color: var(--ok); }

.wsigns { display: flex; flex-wrap: wrap; gap: 8px; }
.wsigns span { font-family: var(--mono), 'PhIcon'; font-size: 13px; padding: 4px 10px; border-radius: 4px; background: var(--paper-2); color: var(--ink-3); }
.wsigns span.on { background: var(--acc); color: var(--paper); }
.wfactors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.wf { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif), 'PhIcon'; font-size: 18px; background: var(--acc-t); border: 1.5px solid var(--acc); transition: all .3s; }
.wf.b { background: color-mix(in oklab, var(--gold) 22%, var(--card)); border-color: oklch(0.6 0.12 75); }
.wf.x { opacity: .3; text-decoration: line-through; }
.wop { font-family: var(--serif), 'PhIcon'; font-size: 22px; padding: 0 6px; }
.wfrac-stack { display: grid; gap: 6px; justify-items: center; }
.wfrac-line { width: 80%; height: 2px; background: var(--ink); }
.wladder { display: grid; gap: 0; justify-content: center; }
.wl-row { display: grid; grid-template-columns: 40px 80px; border-bottom: 1px solid var(--rule); }
.wl-p { font-family: var(--serif), 'PhIcon'; font-size: 20px; color: var(--acc); text-align: right; padding: 6px 10px; border-right: 2px solid var(--ink); }
.wl-v { font-family: var(--serif), 'PhIcon'; font-size: 20px; padding: 6px 12px; animation: rise .3s forwards; opacity: 0; }
.wl-v.one { color: var(--ok); }
.wpv { display: grid; grid-template-columns: repeat(4, 1fr) 16px repeat(4, 1fr); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.wpv-c { display: grid; text-align: center; border-right: 1px solid var(--rule); }
.wpv-c .mono { font-size: 10px; padding: 4px 0; background: var(--paper-2); }
.wpv-c b { font-family: var(--serif), 'PhIcon'; font-size: 30px; font-weight: 500; padding: 8px 0; min-height: 52px; animation: wslide .35s; }
@keyframes wslide { from { opacity: 0; transform: translateY(-6px); } }
.wpv-dot { display: grid; place-items: end center; font-size: 34px; line-height: 1; padding-bottom: 6px; border-right: 1px solid var(--rule); }
.wsf { font-family: var(--serif), 'PhIcon'; font-size: 44px; text-align: center; letter-spacing: 2px; }
.sf-keep { color: var(--acc); font-weight: 600; }
.sf-decide { background: color-mix(in oklab, var(--gold) 40%, transparent); border-radius: 4px; padding: 0 3px; }
.sf-drop, .sf-lead { color: var(--ink-3); }
.wfbar { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; }
.wpb { display: grid; gap: 4px; }
.wpb-t { position: relative; height: 30px; background: var(--paper-2); border-radius: 4px; overflow: hidden; }
.wpb-t i { position: absolute; inset: 0 auto 0 0; background: var(--acc); transition: width .35s; border-radius: 4px; }
.wpb-t i.b { background: color-mix(in oklab, var(--acc) 50%, var(--ink)); }
.wpb-t span { position: relative; z-index: 1; font-family: var(--mono), 'PhIcon'; font-size: 13px; line-height: 30px; padding-left: 10px; color: var(--ink); mix-blend-mode: normal; }
.wrbar { display: flex; gap: 3px; flex-wrap: wrap; }
.wrbar > div { flex: 1; min-width: 28px; height: 40px; background: var(--acc); border-radius: 3px; display: grid; place-items: center; color: #fff; font-family: var(--mono), 'PhIcon'; font-size: 12px; }
.wrbar > div.b { background: var(--gold); }
.wrbar-gap { width: 14px; }
.wmach { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; }
.wm-box { padding: 14px 18px; border: 2px solid var(--acc); border-radius: 8px; background: var(--acc-t); font-family: var(--serif), 'PhIcon'; font-size: 22px; }
.wmach.inv .wm-box { border-style: dashed; }
.wm-io { text-align: center; display: grid; }
.wm-io b { font-family: var(--serif), 'PhIcon'; font-size: 28px; font-weight: 500; }
.wm-ar { font-size: 22px; color: var(--ink-3); }
.wbal { position: relative; height: 150px; }
.wb-beam { position: absolute; left: 4%; right: 4%; top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-bottom: 6px solid oklch(0.65 0.06 70); transition: transform .4s; }
.wb-pan { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-end; justify-content: center; min-height: 90px; padding-bottom: 4px; }
.wb-x { width: 34px; height: 34px; border-radius: 6px; background: var(--acc); color: #fff; display: grid; place-items: center; font-family: var(--serif), 'PhIcon'; font-style: italic; font-size: 20px; animation: rise .3s forwards; opacity: 0; }
.wb-1 { width: 20px; height: 20px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; font-size: 11px; font-family: var(--mono), 'PhIcon'; }
.wb-1.neg { background: var(--bad); color: #fff; }
.wb-n { font-family: var(--serif), 'PhIcon'; font-size: 22px; padding: 4px 10px; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--card); }
.wb-post { position: absolute; left: 50%; top: 116px; width: 0; height: 0; border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 32px solid var(--ink-2); transform: translateX(-50%); }
.wseq { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; justify-content: center; }
.wseq-t { display: grid; justify-items: center; gap: 4px; min-width: 56px; }
.wseq-t b { font-family: var(--serif), 'PhIcon'; font-size: 26px; font-weight: 500; }
.wseq-dots { display: flex; flex-wrap: wrap; width: 54px; gap: 2px; }
.wseq-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }
.wseq-ar { font-family: var(--mono), 'PhIcon'; font-size: 12px; color: var(--acc); padding-top: 26px; }
.wvec { display: inline-flex; flex-direction: column; border-left: 2px solid; border-right: 2px solid; border-radius: 8px; padding: 0 8px; line-height: 1.1; vertical-align: middle; font-size: 20px; text-align: center; }
.wprops { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14.5px; color: var(--ink-3); }
.wprops li.ok { color: var(--ink); font-weight: 700; }
.wview { display: flex; align-items: center; gap: 12px; }
.wview .mono { width: 120px; }
.wtapgrid { display: grid; grid-template-columns: repeat(3, 44px); gap: 4px; margin-top: 8px; }
.wtapgrid button { height: 44px; border: 1.5px solid var(--rule); background: var(--card); border-radius: 6px; font-family: var(--serif), 'PhIcon'; font-size: 18px; }
.wdots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; }
.wdots i { aspect-ratio: 1; border-radius: 50%; background: var(--acc); opacity: .35; transition: all .2s; }
.wdots i.g1 { background: var(--gold); }
.wdots i.on { opacity: 1; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.wsl-data { display: flex; flex-wrap: wrap; gap: 6px; }
.wsl-data span { font-family: var(--mono), 'PhIcon'; font-size: 14px; padding: 4px 8px; border-radius: 4px; background: var(--paper-2); }
.wsl-data span.used { opacity: .3; }
.wsl-data span.next { background: var(--acc); color: #fff; }
.wstem { font-family: var(--serif), 'PhIcon'; font-size: 24px; display: grid; gap: 2px; }
.wst-row { display: flex; gap: 12px; align-items: center; min-height: 36px; }
.wst-row b { width: 24px; text-align: right; font-weight: 500; }
.wst-row .bar { color: var(--ink-3); }
.wst-row .leaf { animation: rise .3s forwards; opacity: 0; }
.wss { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; max-width: 360px; margin: 0 auto; }
.wss b, .wss span { aspect-ratio: 1; display: grid; place-items: center; font-family: var(--mono), 'PhIcon'; font-size: 13px; border-radius: 4px; }
.wss b { color: var(--ink-3); font-weight: 400; }
.wss span { background: var(--paper-2); }
.wss span.on { background: var(--acc); color: #fff; }
.winfo { display: grid; gap: 8px; }
.wi-row { display: grid; grid-template-columns: 120px 1fr 50px; gap: 10px; align-items: center; font-size: 14.5px; }
.wi-icons { display: flex; flex-wrap: wrap; gap: 3px; }
.wi-icons i { width: 14px; height: 14px; background: var(--acc); border-radius: 3px; }
.wnutr { display: grid; gap: 6px; }
.wnutr > div { display: grid; grid-template-columns: 110px 1fr 140px; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-3); }
.wnutr > div.ok { color: var(--ink); }
.wnutr .wpb-t { height: 12px; }
.wbioc { display: grid; gap: 4px; }
.wbio-l { display: grid; grid-template-columns: 100px 1fr 90px; gap: 10px; align-items: center; position: relative; padding-bottom: 14px; }
.wbio-dots { display: flex; flex-wrap: wrap; gap: 2px; }
.wbio-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--bad); }
.wbio-ar { position: absolute; left: 100px; bottom: -2px; font-family: var(--mono), 'PhIcon'; font-size: 10.5px; color: var(--ink-3); }
.wbio-l b { font-family: var(--mono), 'PhIcon'; font-size: 13px; text-align: right; }
.wreact { display: flex; flex-wrap: wrap; gap: 4px; }
.wreact span { font-size: 13px; padding: 4px 9px; border-radius: 4px; background: var(--paper-2); cursor: pointer; color: var(--ink-3); }
.wreact span.seen { color: var(--ink); }
.wreact span.on { background: var(--acc); color: #fff; }
.wreact-pad { width: 100%; height: 180px; border-radius: 10px; border: 0; font-family: var(--serif), 'PhIcon'; font-size: 30px; background: var(--paper-2); }
.wreact-pad.wait { background: oklch(0.65 0.15 25); color: #fff; }
.wreact-pad.go { background: oklch(0.65 0.15 145); color: #fff; }
.wreact-pad.early { background: var(--gold); }
.wcolbox { height: 140px; border-radius: 8px; display: grid; place-items: end start; padding: 12px; border: 1px solid var(--rule); }
.wcolbox span { font-size: 14px; background: rgba(255,255,255,.75); padding: 3px 8px; border-radius: 4px; }
.wmix { display: grid; gap: 4px; }
.wmix-r { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--rule); }
.wmix-r.ren span:first-child { color: var(--ok); font-weight: 700; }

/* figure tabs */
.fig-tabs { display: flex; gap: 6px; overflow-x: auto; margin: -6px -6px 14px; padding: 2px 6px 8px; border-bottom: 1px solid var(--rule); }
.fig-tab { flex: none; display: grid; gap: 2px; text-align: left; border: 1.5px solid var(--rule); background: var(--paper); border-radius: 8px; padding: 6px 10px; font-size: 13px; max-width: 190px; line-height: 1.25; }
.fig-tab .mono { font-size: 10px; }
.fig-tab.on { border-color: var(--acc); background: var(--acc-t); }
.fig-tab.done .mono::after { content: ' ✓'; color: var(--ok); }
/* diagram */
.wdg { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.wdg-svg { background: var(--paper); border-radius: 6px; }
.wdg-hot circle { fill: var(--ink); stroke: var(--paper); stroke-width: 2.5; transition: all .15s; }
.wdg-hot text { fill: #fff !important; font-family: var(--mono), 'PhIcon' !important; font-size: 10px !important; font-weight: 700; }
.wdg-hot.seen circle { fill: var(--acc); }
.wdg-hot.on circle { fill: var(--gold); r: 13; }
.wdg-hot:hover circle { r: 13; }
.wdg-hot .wdg-tag { fill: var(--ink) !important; font-family: var(--sans), 'PhIcon' !important; font-size: 11px !important; font-weight: 700; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; text-anchor: start; }
.w-airway { stroke: oklch(0.7 0.06 30); stroke-width: 9; fill: none; stroke-linecap: round; }
.w-airway.thin { stroke-width: 4; }
.w-bonef { fill: oklch(0.93 0.03 80); stroke: oklch(0.7 0.04 80); stroke-width: 2; }
.w-bonel { stroke: oklch(0.88 0.03 80); stroke-width: 9; fill: none; stroke-linecap: round; }
.w-skin { fill: oklch(0.88 0.04 60); stroke: oklch(0.7 0.05 50); stroke-width: 2; }
.w-limb { stroke: oklch(0.88 0.04 60); stroke-width: 18; stroke-linecap: round; fill: none; }
.w-carr { stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 4 3; fill: none; }
.w-dev { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.6; transition: fill .2s; }
.w-dev.off { fill: oklch(0.88 0.01 250); stroke: var(--rule); opacity: .6; }
.w-cable { stroke: var(--ink-3); stroke-width: 2; }
.w-wifi { stroke: var(--acc); stroke-width: 2; fill: none; }
.w-gate { fill: var(--acc-t); stroke: var(--acc); stroke-width: 2.5; }
.w-fl { fill: var(--card); stroke: var(--ink-3); stroke-width: 1.5; transition: fill .2s; }
.w-fl.hl { fill: color-mix(in oklab, var(--gold) 45%, var(--card)); stroke: var(--ink); }
.wtubes { display: flex; gap: 10px; justify-content: space-around; flex-wrap: wrap; }
.wtube-b { display: grid; justify-items: center; gap: 4px; background: none; border: 1.5px dashed var(--rule); border-radius: 8px; padding: 8px; min-width: 100px; }
.wtube-b:hover { border-color: var(--acc); }
.wtimeline { display: flex; gap: 6px; flex-wrap: wrap; }
.wrx { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 90px; flex-wrap: wrap; }
.wmol { display: inline-grid; place-items: center; min-width: 46px; height: 46px; border-radius: 23px; margin: 3px; padding: 0 8px; color: #fff; font-family: var(--serif), 'PhIcon'; font-size: 15px; transition: all .3s; }
.wmol.prod { background: var(--acc); }
.wbars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.wbar-s { border: 1.5px solid var(--rule); background: var(--card); border-radius: 6px; padding: 4px 2px; display: grid; gap: 2px; font-size: 12px; }
.wbar-s .mono { font-size: 9px; }
.wmagt { display: flex; flex-wrap: wrap; gap: 8px; }
.wmag-y { border-color: var(--ok) !important; background: color-mix(in oklab, var(--ok) 12%, var(--card)) !important; }
.wmag-n { border-color: var(--rule); opacity: .75; }
.wtally { font-family: var(--mono), 'PhIcon'; letter-spacing: 1px; margin-right: 10px; font-size: 16px; }
.wtally.five { text-decoration: line-through; text-decoration-thickness: 2px; }
.wat { display: inline-grid; place-items: center; border-radius: 4px; font-family: var(--serif), 'PhIcon'; font-size: 13px; margin: 3px; }
.wat.x2 { background: var(--acc); color: #fff; }
.wat.x { background: color-mix(in oklab, var(--acc) 45%, var(--card)); }
.wat.one { background: var(--gold); }
.wat.neg { background: var(--bad) !important; color: #fff; }
.watb { display: flex; flex-wrap: wrap; align-items: flex-end; min-height: 80px; padding: 10px; background: var(--paper); border-radius: 6px; }
.wsg { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; max-width: 380px; margin: 0 auto; }
.wsg b, .wsg span { aspect-ratio: 1; display: grid; place-items: center; font-family: var(--mono), 'PhIcon'; font-size: 13px; border-radius: 4px; }
.wsg b { color: var(--ink-3); font-weight: 400; }
.wsg span { background: var(--paper-2); cursor: pointer; }
.wsg span.pos { background: color-mix(in oklab, var(--acc) 25%, var(--card)); }
.wsg span.neg { background: color-mix(in oklab, var(--bad) 20%, var(--card)); }
.wsg span.hl { outline: 2px solid var(--ink); }
.wcode { font-family: var(--mono), 'PhIcon'; font-size: 13px; line-height: 1.6; background: oklch(0.22 0.01 250); color: oklch(0.92 0.01 250); border-radius: 8px; padding: 14px 16px; margin: 0; white-space: pre; overflow-x: auto; text-transform: none; letter-spacing: 0; }
.wcode .hl { background: oklch(0.45 0.1 85 / .55); margin: 0 -16px; padding: 0 16px; }
.wterm { font-family: var(--mono), 'PhIcon'; font-size: 13px; background: #111; color: oklch(0.85 0.15 145); border-radius: 8px; padding: 10px 14px; min-height: 60px; display: grid; gap: 6px; }
.wmb { display: grid; gap: 6px; justify-items: center; }
.wmb-face { width: 140px; height: 110px; border-radius: 10px; background: oklch(0.3 0.02 250); display: grid; place-items: center; color: oklch(0.7 0.2 25); font-family: var(--mono), 'PhIcon'; font-size: 18px; letter-spacing: 2px; }
.wled { display: grid; grid-template-columns: repeat(5, 40px); gap: 8px; padding: 18px; background: oklch(0.3 0.02 250); border-radius: 12px; justify-content: center; }
.wled button { width: 40px; height: 40px; border-radius: 6px; border: 0; background: oklch(0.38 0.02 250); }
.wled button.on { background: oklch(0.65 0.22 25); box-shadow: 0 0 12px oklch(0.65 0.22 25); }
.wbits { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.wbits button { border: 1.5px solid var(--rule); background: var(--card); border-radius: 8px; padding: 6px 0; display: grid; gap: 2px; }
.wbits button b { font-family: var(--serif), 'PhIcon'; font-size: 26px; font-weight: 500; }
.wbits button.on { background: var(--acc); color: #fff; border-color: var(--acc); }
.wbits button.on .mono { color: #fff; }
.wpix { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-width: 220px; }
.wpix button { aspect-ratio: 1; border: 1px solid var(--rule); background: #fff; padding: 0; }
.wpix button.on { background: var(--ink); }

/* section tiles in player */
.sec-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.sec-pill { border: 1.5px solid var(--rule); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; display: flex; gap: 6px; align-items: center; }
.sec-pill.cur { border-color: var(--acc); background: var(--acc); color: var(--paper); }
.sec-pill.done { border-color: var(--acc); color: var(--acc); }
.book-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 36px; }
.book-ch { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 16px 2px; display: grid; grid-template-columns: 52px 1fr auto; gap: 4px 12px; align-items: baseline; }
.book-ch:hover .tt { color: var(--acc); }
.book-ch .n { font-family: var(--serif), 'PhIcon'; font-style: italic; font-size: 26px; color: var(--acc); }
.book-ch .tt { font-family: var(--serif), 'PhIcon'; font-size: 22px; transition: color .15s; }
.book-ch .ss { grid-column: 2 / -1; font-size: 14px; color: var(--ink-2); }
.book-ch .meta { grid-column: 2 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.strand-tag { font-family: var(--mono), 'PhIcon'; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 3px; background: var(--acc-t); color: var(--acc); }
.bio-c { --acc: oklch(0.52 0.11 152); --acc-t: oklch(0.94 0.025 152); }
.chem-c { --acc: oklch(0.5 0.1 230); --acc-t: oklch(0.94 0.022 230); }
.phys-c { --acc: oklch(0.55 0.12 55); --acc-t: oklch(0.94 0.03 55); }
.es-c { --acc: oklch(0.5 0.1 275); --acc-t: oklch(0.94 0.025 275); }

.subj-computing.bio-c, .subj-computing { --acc: var(--computing); --acc-t: var(--computing-t); }
@media (max-width: 760px) {
  .wsplit, .book-list, .wmatch, .wdg { grid-template-columns: 1fr; }
  .wbars { grid-template-columns: repeat(5, 1fr); }
  .wst-line { grid-template-columns: 1fr; gap: 2px; }
  .wnutr > div { grid-template-columns: 90px 1fr; } .wnutr .mono { display: none; }
  .wpv-c b { font-size: 22px; }
}
