/* Boole Lab — the look of Peano Lab (a dark terminal); the course fonts: Inter + JetBrains Mono.
 * Colours of the suggestions: green closes the goal, blue shrinks it, amber keeps its size, grey grows it.
 * Shared by the Polish (applets/) and the English (en/applets/) page. */

:root {
  --bg: #07131b; --panel: #0e202b; --terminal: #061016; --border: #214052; --cyan: #38bdf8; --cyan-2: #7dd3fc;
  --emerald: #34d399; --amber: #fbbf24; --text: #e6f1f5; --muted: #94aebd; --danger: #fca5a5; --violet: #c4b5fd;
  --closes: #34d399; --shrinks: #38bdf8; --same: #fbbf24; --grows: #8ea2b0; --solver: #f0abfc;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--text); min-height: 100vh;
  display: flex; flex-direction: column;
  background: radial-gradient(1000px 520px at 85% -10%, #123f4f 0%, transparent 58%),
              linear-gradient(160deg, #07131b 0%, #0b1d29 100%);
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid var(--cyan-2); outline-offset: 2px; }

header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
         padding: .9rem 1.4rem; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand .glyph { font-family: var(--mono); font-weight: 700; font-size: 1.2rem; color: #06202a; background: var(--emerald);
                width: 2.45rem; height: 2.45rem; border-radius: 9px; display: grid; place-items: center; }
.brand h1 { font-size: 1.05rem; font-weight: 700; }
.brand .sub { font-size: .75rem; color: var(--muted); }
header nav { display: flex; gap: 1.1rem; font-size: .85rem; font-weight: 600; align-items: center; flex-wrap: wrap; }

.main { flex: 1; display: flex; flex-direction: column; max-width: 1420px; width: 100%; margin: 0 auto; padding: 1.1rem 1.4rem 2rem; }
.statusrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.status { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .6rem; min-height: 1.3rem; }
.spinner { width: .8rem; height: .8rem; border: 2px solid var(--border); border-top-color: var(--cyan); border-radius: 50%;
           animation: spin .8s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.dot-ok { width: .6rem; height: .6rem; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); flex: 0 0 auto; }
.fail { color: var(--danger); }
.stopbtn { font: 700 .8rem 'Inter', sans-serif; color: #2a0d0d; background: var(--amber); border: none; border-radius: 7px;
           padding: .35rem .8rem; cursor: pointer; }
.stopbtn:disabled { opacity: .35; cursor: not-allowed; }

/* --- layout: the terminal + the side panel --- */
.lab { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: .9rem; align-items: stretch; }
#term-wrap { background: var(--terminal); border: 1px solid var(--border); border-radius: 12px; padding: .7rem .8rem .8rem;
             box-shadow: 0 10px 40px rgba(0,0,0,.45); display: flex; flex-direction: column; height: 68vh; min-height: 430px; }
.term-bar { display: flex; gap: .45rem; padding: .1rem .3rem .6rem; align-items: center; }
.term-bar span.b { width: .7rem; height: .7rem; border-radius: 50%; }
.b-r { background: #ff5f57; } .b-y { background: #febc2e; } .b-g { background: #28c840; }
.term-title { margin-left: .6rem; font: .72rem var(--mono); color: #5f7d8d; }
#output { flex: 1; overflow-y: auto; font: 13.5px/1.5 var(--mono); padding: .2rem .35rem; white-space: pre-wrap;
           word-break: break-word; scrollbar-color: #214052 transparent; }
#output .row { min-height: 1.5em; }
#output .echo { color: var(--cyan-2); margin-top: .35rem; }
#output .echo .pr { color: var(--emerald); }
/* a folded long row: the button between its beginning and its end */
#output .fold { color: var(--muted); background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.28);
                border-radius: 5px; padding: 0 .35rem; margin: 0 .15rem; font-size: .9em; white-space: nowrap; }
#output .fold.toggle { color: var(--cyan-2); cursor: pointer; }
#output .fold.toggle:hover { background: rgba(56,189,248,.2); }
.input-row { display: flex; align-items: center; gap: .55rem; border-top: 1px solid #12303f; padding: .55rem .35rem 0; }
.prompt { font: 700 13.5px var(--mono); color: var(--emerald); }
.field { position: relative; flex: 1; min-width: 0; }
#command, #ghost { font: 13.5px/1.6 var(--mono); letter-spacing: 0; }
#command { width: 100%; background: transparent; border: none; color: var(--text); padding: .15rem 0; position: relative; z-index: 1;
             caret-color: var(--emerald); }
#command:focus { outline: none; }
#command:disabled { opacity: .5; }
#ghost { position: absolute; inset: 0; padding: .15rem 0; white-space: pre; overflow: hidden; pointer-events: none; color: transparent; }
#ghost .rest { color: #4f6c7c; }
#ghost .rest.closes { color: rgba(52,211,153,.55); }
#ghost .key { color: #3b5666; font-size: .72rem; margin-left: .9rem; }

/* the list of suggestions while typing */
#completions { position: absolute; left: -.4rem; bottom: calc(100% + .45rem); z-index: 5; list-style: none; min-width: 320px; max-width: min(720px, 92vw);
         max-height: 46vh; overflow-y: auto; background: #0b1c26; border: 1px solid #2b5268; border-radius: 9px; padding: .3rem;
         box-shadow: 0 14px 40px rgba(0,0,0,.6); font: 12.5px var(--mono); }
#completions li { display: grid; grid-template-columns: .7rem auto 1fr; gap: .55rem; align-items: baseline; padding: .3rem .5rem;
            border-radius: 6px; cursor: pointer; }
#completions li .name { color: var(--text); white-space: nowrap; }
#completions li .desc { color: #6f8c9c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
#completions li[aria-selected="true"], #completions li:hover { background: #143243; }
#completions li .desc b { color: var(--muted); font-weight: 400; }

/* --- colours of the suggestions --- */
.dot { display: inline-block; width: .62rem; height: .62rem; border-radius: 50%; background: #2a4352; flex: 0 0 auto; }
.dot.closes { background: var(--closes); box-shadow: 0 0 6px rgba(52,211,153,.7); }
.dot.shrinks { background: var(--shrinks); }
.dot.same { background: var(--same); }
.dot.grows { background: var(--grows); }
.dot.solver { background: var(--solver); box-shadow: 0 0 6px rgba(240,171,252,.7); }

/* --- output: styles of the pieces from lab.py --- */
.s-ok { color: var(--emerald); } .s-error { color: var(--danger); } .s-warning { color: var(--amber); }
.s-dim { color: #7d97a6; } .s-goal { color: #f8fafc; } .s-code { color: var(--cyan-2); } .s-name { color: var(--violet); }
.s-heading { color: var(--cyan-2); font-weight: 700; } .s-lean { color: #a7f3d0; }
.s-closes { color: var(--closes); } .s-shrinks { color: var(--shrinks); } .s-same { color: var(--same); }
.s-grows { color: var(--grows); } .s-solver { color: var(--solver); }
.action { cursor: pointer; border-bottom: 1px dotted rgba(125,211,252,.45); }
.action:hover { background: rgba(56,189,248,.12); }

/* --- the side panel --- */
.side-panel { display: flex; flex-direction: column; gap: .7rem; height: 68vh; min-height: 430px; }
.panel { background: rgba(14,32,43,.8); border: 1px solid var(--border); border-radius: 10px; padding: .6rem .7rem; display: flex;
         flex-direction: column; min-height: 0; }
.panel h2 { font: 700 .72rem var(--mono); letter-spacing: .06em; color: var(--cyan-2); text-transform: uppercase; margin-bottom: .45rem;
            display: flex; justify-content: space-between; gap: .5rem; }
.panel h2 .counter { color: #5f7d8d; font-weight: 400; letter-spacing: 0; text-transform: none; }
/* a big goal takes at most half of the panel and scrolls; suggestions and the library stay visible */
#panel-goal { flex: 0 0 auto; max-height: 50%; }
#panel-hints { flex: 1 1 56%; }
#panel-lib { flex: 1 1 44%; }
.goal-view { font: 14px/1.7 var(--mono); color: #f8fafc; word-break: break-word; min-height: 1.7em;
             overflow-y: auto; scrollbar-color: #214052 transparent; }
.goal-view .empty { color: #6f8c9c; font: 12.5px 'Inter', sans-serif; }
.goal-view .turnstile { color: var(--emerald); margin-right: .4rem; }
.goal-view .preview-info { display: block; font: 11.5px 'Inter', sans-serif; color: var(--amber); margin-bottom: .15rem; }
.goal-view .t { border-radius: 3px; transition: background .1s; }
.goal-view .t.hl { padding: 0 1px; }
.goal-view .t.hl-closes { background: rgba(52,211,153,.22); box-shadow: inset 0 -2px 0 var(--closes); }
.goal-view .t.hl-shrinks { background: rgba(56,189,248,.2); box-shadow: inset 0 -2px 0 var(--shrinks); }
.goal-view .t.hl-same { background: rgba(251,191,36,.18); box-shadow: inset 0 -2px 0 var(--same); }
.goal-view .t.hl-grows { background: rgba(142,162,176,.2); box-shadow: inset 0 -2px 0 var(--grows); }
.goal-view .t.hl-solver { background: rgba(240,171,252,.18); box-shadow: inset 0 -2px 0 var(--solver); }
#more-goals { list-style: none; margin-top: .3rem; font: 12px/1.5 var(--mono); color: #6f8c9c; flex: 0 0 auto;
              max-height: 4.6em; overflow-y: auto; scrollbar-color: #214052 transparent; }
#more-goals li::before { content: "⊢ "; color: #3b5666; }
#hints, #library { overflow-y: auto; min-height: 0; scrollbar-color: #214052 transparent; }
#hints { list-style: none; display: flex; flex-direction: column; gap: .1rem; }
#hints li { display: grid; grid-template-columns: .7rem 1fr; gap: 0 .5rem; align-items: baseline; padding: .22rem .4rem;
                  border-radius: 6px; cursor: pointer; }
#hints li:hover, #hints li.active { background: #143243; }
#hints .tac { font: 12.5px var(--mono); color: var(--text); word-break: break-word; }
#hints .what { grid-column: 2; font-size: .72rem; color: #6f8c9c; word-break: break-word; }
/* long tactics and results (big terms) are cut to a few lines; a click inserts the whole tactic */
#hints .tac, #hints .what { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
#hints .tac { -webkit-line-clamp: 3; line-clamp: 3; }
#hints .what { -webkit-line-clamp: 2; line-clamp: 2; }
#hints .what .res { font-family: var(--mono); color: #84a0af; }
#hints .what .sol { color: var(--solver); font-weight: 600; }
#hints .empty { color: #6f8c9c; font-size: .78rem; cursor: default; display: block; }
#hints .solver-searching .dot { animation: pulse 1s ease-in-out infinite alternate; vertical-align: -.05rem; }
#hints li.reverts { opacity: .5; }
#hints .empty.falsity { color: var(--amber); }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
.legend { margin-top: .4rem; font-size: .66rem; white-space: nowrap; color: #6f8c9c; display: flex; flex-wrap: wrap; gap: .25rem .7rem; align-items: center; }
.legend span.dot { margin-right: -.4rem; width: .5rem; height: .5rem; }
#library .section { font: 700 .66rem 'Inter', sans-serif; color: #5f7d8d; text-transform: uppercase; letter-spacing: .07em; margin: .55rem 0 .15rem; }
#library .section:first-child { margin-top: 0; }
#library .thm { display: grid; grid-template-columns: .7rem auto 1fr; gap: .45rem; align-items: baseline; padding: .16rem .35rem;
                  border-radius: 5px; cursor: pointer; font: 11.5px/1.45 var(--mono); }
#library .thm:hover { background: #143243; }
#library .thm .n { color: var(--violet); white-space: nowrap; }
#library .thm .r { color: #6f8c9c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#library .thm.unavailable { opacity: .38; }
#library .thm.matches .r { color: #a9c1cd; }
#library .thm:hover .r, #library .thm:focus-within .r { white-space: normal; word-break: break-word; }  /* the whole statement */

/* --- cards, buttons, the paste dialog --- */
.proof-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-top: .85rem; }
.proof-card { background: rgba(14,32,43,.72); border: 1px solid var(--border); border-radius: 9px; padding: .65rem .75rem; }
.proof-card strong { display: block; font: 700 .74rem var(--mono); letter-spacing: .04em; color: var(--cyan-2); margin-bottom: .25rem; }
.proof-card span { display: block; font-size: .76rem; color: var(--muted); line-height: 1.45; }
.proof-card code, .info code, .paste-form code { font-family: var(--mono); background: var(--terminal); border: 1px solid var(--border); border-radius: 5px;
                               padding: .02rem .3rem; color: var(--cyan-2); font-size: .86em; }
.quick { margin-top: 1rem; display: flex; flex-direction: column; gap: .55rem; }
.quick-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.quick .lbl { font-size: .76rem; color: var(--muted); width: 6.2rem; flex: 0 0 auto; }
.qbtn { font: .78rem var(--mono); color: var(--cyan-2); background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.3);
        border-radius: 7px; padding: .34rem .62rem; cursor: pointer; transition: background .12s, transform .12s; }
.qbtn:hover:not(:disabled) { background: rgba(56,189,248,.18); transform: translateY(-1px); }
.qbtn:disabled { cursor: not-allowed; opacity: .48; }
.paste-dialog { width: min(52rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); margin: auto; color: var(--text); background: var(--panel);
                border: 1px solid var(--border); border-radius: 12px; padding: 0; box-shadow: 0 18px 70px rgba(0,0,0,.65); }
.paste-dialog::backdrop { background: rgba(2,8,12,.78); }
.paste-form { display: flex; flex-direction: column; gap: .8rem; padding: 1rem; }
.paste-form h2 { font-size: 1rem; color: var(--cyan-2); }
.paste-form p { font-size: .8rem; line-height: 1.5; color: var(--muted); }
.paste-form label { font-size: .8rem; font-weight: 700; }
.paste-form textarea { width: 100%; min-height: 16rem; resize: vertical; font: .8rem/1.45 var(--mono); color: var(--text);
                       background: var(--terminal); border: 1px solid var(--border); border-radius: 8px; padding: .75rem; }
.paste-actions { display: flex; justify-content: flex-end; gap: .55rem; }
.paste-actions button { font: 700 .8rem 'Inter', sans-serif; border-radius: 7px; padding: .42rem .8rem; cursor: pointer; }
.paste-cancel { color: var(--text); background: transparent; border: 1px solid var(--border); }
.paste-run { color: #05202b; background: var(--cyan); border: 1px solid var(--cyan); }
.paste-error { min-height: 1.2rem; color: var(--danger) !important; }
.info { margin-top: 1.3rem; font-size: .84rem; color: var(--muted); line-height: 1.65; max-width: 96ch; }
.info + .info { margin-top: .6rem; }
.law { color: var(--text); font-weight: 700; }
footer { border-top: 1px solid var(--border); padding: 1rem 1.4rem; font-size: .78rem; color: var(--muted); text-align: center; }
.noscript { padding: 1rem; color: var(--danger); text-align: center; }

/* --- the tactic workshop: blocks | editor + trace | structure, analysis, Lean --- */
.qbtn-ws { color: #f5d0fe; border-color: rgba(240,171,252,.45); background: rgba(240,171,252,.08); }
.workshop { margin-top: .9rem; background: rgba(14,32,43,.88); border: 1px solid #3b4f63; border-radius: 12px;
            padding: .8rem 1rem 1rem; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.ws-head { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: start; margin-bottom: .7rem; }
.ws-head h2 { font: 700 1rem 'Inter', sans-serif; color: var(--solver); }
.ws-close { grid-row: 1; grid-column: 2; background: transparent; border: 1px solid var(--border); color: var(--muted);
            border-radius: 7px; width: 2rem; height: 2rem; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.ws-close:hover { color: var(--text); }
.ws-tlab { grid-column: 1 / -1; font-size: .8rem; font-weight: 600; color: var(--solver); }
.ws-lead { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); line-height: 1.5; max-width: 115ch; }
.ws-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr) 360px; gap: .9rem; align-items: start; }
.ws-col { min-width: 0; }
.ws-col h3 { font: 700 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--cyan-2);
             margin: .7rem 0 .35rem; display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.ws-col h3:first-child { margin-top: 0; }
.ws-hint { font: 400 .66rem 'Inter', sans-serif; color: #5f7d8d; letter-spacing: 0; text-transform: none; text-align: right; }
.ws-group { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-bottom: .4rem; }
.ws-glabel { font-size: .66rem; color: #5f7d8d; width: 100%; }
.ws-block { font: .74rem var(--mono); border-radius: 6px; padding: .22rem .45rem; cursor: pointer; border: 1px solid;
            color: var(--cyan-2); border-color: rgba(56,189,248,.35); background: rgba(56,189,248,.06); }
.ws-block.ws-control { color: #f5d0fe; border-color: rgba(240,171,252,.4); background: rgba(240,171,252,.07); }
.ws-block.ws-check { color: var(--amber); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.06); }
.ws-block:hover { filter: brightness(1.3); }
.ws-filter, .ws-name { font: .78rem var(--mono); color: var(--text); background: var(--terminal); border: 1px solid var(--border);
                       border-radius: 6px; padding: .3rem .45rem; }
.ws-filter { width: 100%; margin-bottom: .35rem; }
.ws-facts { display: flex; flex-wrap: wrap; gap: .25rem; max-height: 9.5rem; overflow-y: auto; scrollbar-color: #214052 transparent; }
.ws-fact { font: .7rem var(--mono); color: var(--violet); background: rgba(196,181,253,.07); border: 1px solid rgba(196,181,253,.25);
           border-radius: 5px; padding: .12rem .35rem; cursor: pointer; }
.ws-fact:hover { background: rgba(196,181,253,.18); }
.ws-fact.unavailable { opacity: .38; }
.ws-more { color: #5f7d8d; font-size: .75rem; }
.ws-tactics { display: flex; flex-direction: column; gap: .3rem; max-height: 16rem; overflow-y: auto; scrollbar-color: #214052 transparent; }
.ws-tac { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .1rem .35rem; align-items: center;
          padding: .25rem .35rem; border-radius: 6px; background: rgba(6,16,22,.55); }
.ws-tname { justify-self: start; font: .76rem var(--mono); color: var(--violet); background: none; border: none; cursor: pointer;
            padding: 0; text-align: left; word-break: break-all; }
.ws-tname:hover { text-decoration: underline; }
.ws-badge { font: 700 .64rem 'Inter', sans-serif; border-radius: 4px; padding: .02rem .3rem; }
.ws-badge.good { color: #05202b; background: var(--emerald); }
.ws-badge.bad { color: #2a0d0d; background: #f87171; }
.ws-badge.own { color: #05202b; background: var(--cyan); }
.ws-load, .ws-del { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 5px; cursor: pointer;
                    font-size: .72rem; padding: .02rem .35rem; }
.ws-load:hover, .ws-del:hover { color: var(--text); }
.ws-tdesc { grid-column: 1 / -1; font-size: .68rem; color: #6f8c9c; line-height: 1.35; word-break: break-word; }
.ws-namerow { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.ws-namerow label, .ws-codelabel { font: 700 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--cyan-2); }
.ws-name { flex: 1; min-width: 0; }
.ws-text { display: block; width: 100%; min-height: 4.8rem; resize: vertical; font: .88rem/1.55 var(--mono); color: var(--text);
           background: var(--terminal); border: 1px solid var(--border); border-radius: 8px; padding: .55rem .65rem; margin-top: .3rem;
           caret-color: var(--emerald); }
.ws-text::selection { background: rgba(240,171,252,.35); }
.ws-status { min-height: 1.3rem; font-size: .76rem; color: var(--muted); margin: .35rem 0; word-break: break-word; }
.ws-status.ok { color: var(--emerald); }
.ws-status.warn { color: var(--amber); }
.ws-status.bad { color: var(--danger); }
.ws-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.ws-btn { font: 700 .76rem 'Inter', sans-serif; border-radius: 7px; padding: .38rem .7rem; cursor: pointer; color: var(--text);
          background: transparent; border: 1px solid var(--border); }
.ws-btn:hover { border-color: var(--cyan); }
.ws-btn.ws-try { color: #2a0a2e; background: var(--solver); border-color: var(--solver); }
.ws-btn.ws-clear { margin-left: auto; color: var(--muted); }
.ws-trace { font: 12.5px/1.55 var(--mono); color: var(--muted); background: var(--terminal); border: 1px solid #12303f;
            border-radius: 8px; padding: .55rem .65rem; max-height: 24rem; overflow: auto; scrollbar-color: #214052 transparent; }
.ws-trace ul { list-style: none; padding-left: 1.1rem; border-left: 1px dashed #214052; margin-left: .35rem; }
.ws-trace ul.ws-trace-tree { padding-left: 0; border-left: none; margin-left: 0; }
.tr-row { cursor: pointer; border-radius: 4px; padding: 0 .2rem; word-break: break-word; }
.tr-row:hover { background: rgba(56,189,248,.1); }
.tr-row.inside { cursor: default; }
.tr-row.inside:hover { background: none; }
.tr.ok > .tr-row .tr-icon { color: var(--emerald); }
.tr.bad > .tr-row .tr-icon { color: var(--danger); }
.tr-label { color: var(--text); margin-left: .35rem; }
.tr-label.k-step { color: var(--cyan-2); }
.tr-label.k-call { color: var(--violet); }
.tr-goal { color: #f8fafc; }
.tr-closed, .ws-okc { color: var(--emerald); }
.tr-err, .tr-arrow { color: #6f8c9c; }
.ws-goal, .ws-result { margin: .2rem 0; color: #f8fafc; word-break: break-word; }
.ws-k, .ws-dim { color: #6f8c9c; }
.ws-bad { color: var(--danger); margin-top: .3rem; }
.ws-wait { color: var(--amber); }
.ws-trace.stale { opacity: .5; }
.ws-tree, .ws-tree ul { list-style: none; }
.ws-tree ul { padding-left: 1rem; border-left: 1px dashed #214052; margin-left: .35rem; }
.ws-node { font: 12px/1.6 var(--mono); cursor: pointer; border-radius: 4px; padding: 0 .25rem; word-break: break-word; }
.ws-node:hover { background: rgba(56,189,248,.1); }
.ws-node code { color: var(--cyan-2); font: inherit; }
.ws-node .ws-kind { color: #f5d0fe; }
.ws-node .ws-call { color: var(--violet); }
.ws-node.k-hole .ws-kind { color: var(--amber); }
.ws-findings { list-style: none; display: flex; flex-direction: column; gap: .3rem; font-size: .74rem; line-height: 1.45; }
.ws-findings li { cursor: pointer; padding: .25rem .45rem; border-radius: 6px; background: rgba(6,16,22,.5);
                  border-left: 3px solid #2a4352; color: #94aebd; word-break: break-word; }
.ws-findings li.lvl-ok { color: #a7f3d0; border-left-color: var(--emerald); }
.ws-findings li.lvl-warning { color: #fde68a; border-left-color: var(--amber); }
.ws-findings li.lvl-error { color: var(--danger); border-left-color: #f87171; }
.ws-lean { font: 11.5px/1.5 var(--mono); color: #a7f3d0; background: var(--terminal); border: 1px solid #12303f; border-radius: 8px;
           padding: .5rem .6rem; white-space: pre-wrap; word-break: break-word; max-height: 14rem; overflow: auto; }
.ws-lean:empty { display: none; }
.ws-guide { margin-top: .8rem; font-size: .76rem; color: var(--muted); line-height: 1.5; }
.ws-guide summary { cursor: pointer; color: var(--cyan-2); font-weight: 700; }
.ws-guide ol { padding-left: 1.2rem; margin-top: .35rem; display: flex; flex-direction: column; gap: .3rem; }
@media (max-width: 1250px) { .ws-grid { grid-template-columns: 280px minmax(0, 1fr); } .ws-inspect { grid-column: 1 / -1; } }
@media (max-width: 900px) { .ws-grid { grid-template-columns: 1fr; } .ws-inspect { grid-column: auto; } }

@media (max-width: 1100px) { .lab { grid-template-columns: minmax(0, 1fr) 330px; } }
@media (max-width: 900px) {
  .lab { grid-template-columns: 1fr; }
  #term-wrap { height: 62vh; min-height: 360px; }
  .side-panel { height: auto; min-height: 0; }
  #panel-goal { max-height: 45vh; } #panel-hints { max-height: 40vh; } #panel-lib { max-height: 46vh; }
  .proof-map { grid-template-columns: 1fr; }
  .quick .lbl { width: 100%; }
  .brand .sub { display: none; }
  #ghost .key { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
