/* The class editor (classedit.js): the strip of choices, what the engine's check found, and the view under them. The
   strip and its buttons are the face designer's (designer.css); the chart and its properties are flow.css. */
.ce { height: 100%; min-height: 460px; display: flex; flex-direction: column; background: var(--ground); }
.ce-body { flex: 1 1 0; min-height: 0; position: relative; }
.ce-body > .fe { height: 100%; }
.ce-check[data-state="ok"] { color: var(--ok); }
.ce-check[data-state="fault"] { color: var(--due); }

/* the findings of the engine's check: each a line that opens the thing it is about */
.ce-finds { flex: none; max-height: 30%; overflow: auto; display: grid; gap: 1px; padding: 4px 14px 6px; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.ce-finds[hidden] { display: none; }
.ce-find { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 3px 8px; border: 0; border-radius: 6px; background: none; color: var(--ink); font-size: 12.5px; text-align: left; cursor: pointer; }
.ce-find:hover { background: var(--sunk); }
.ce-find:disabled { cursor: default; background: none; }
.ce-find b { flex: none; font-weight: 500; color: var(--due); }
.ce-find .code { font-size: 11.5px; }
.ce-find.note, .ce-find.note b { color: var(--ink-2); }   /* a note refuses nothing: it stands quieter than a fault */
.ce-finds .ce-more { margin: 3px 8px; }   /* the rest of the findings, on a press: in line with the findings' words */

/* ---------- Variables (classvars.js): the list, and the properties of what is chosen ---------- */
.cv { height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.cv-list { min-height: 0; overflow: auto; padding: 0 0 24px; }
/* the table of the class's variables: the owner's columns, a section a line that folds (the designer toolbox's fold) */
.cv-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; }
.cv-k-name { width: 24%; } .cv-k-label { width: 22%; } .cv-k-type { width: 13%; } .cv-k-first { width: 13%; } .cv-k-fx { width: 28%; }
.cv-table th { position: sticky; top: 0; z-index: 1; padding: 8px 8px 7px; border-bottom: 1px solid var(--rule-2); background: var(--sheet); color: var(--ink-2); font-size: 11.5px; font-weight: 500; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-table td { padding: 6px 8px; border-bottom: 1px solid var(--rule); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-table td.code, .cv-table td .code { font-family: var(--f-code); font-size: 12px; }
.cv-row { cursor: pointer; }
.cv-row:hover td { background: var(--sunk); }
.cv-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cv-row.on td, .cv-row.on td * { background: var(--accent-fill); color: var(--on-accent); }
.cv-row[data-depth="1"] .cv-c-name { padding-left: 26px; } .cv-row[data-depth="2"] .cv-c-name { padding-left: 44px; } .cv-row[data-depth="3"] .cv-c-name { padding-left: 62px; }
.cv-c-name .code { color: var(--ink-2); }
.cv-row.kept .cv-c-label, .cv-row.kept .cv-c-type { color: var(--ink-2); }
.cv-row.err .cv-c-label { color: var(--due); }
.cv-c-type { color: var(--ink-2); }
.cv-group td { padding: 10px 8px 4px; border-bottom: 1px solid var(--rule-2); }
.cv-g { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cv-group[data-depth="1"] .cv-g { padding-left: 18px; } .cv-group[data-depth="2"] .cv-g { padding-left: 36px; }
.cv-group .z-fold { width: auto; flex: none; padding: 4px; }
.cv-gname { min-width: 0; padding: 2px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font: 500 10.5px/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.cv-gname { cursor: pointer; }
button.cv-gname:hover { background: var(--sunk); color: var(--ink); }
.cv-group.on .cv-gname { background: var(--accent-fill); color: var(--on-accent); }
.cv-group.err .cv-gname { color: var(--due); }
.cv-g .c { flex: none; color: var(--ink-3); font-size: 11.5px; }
.cv-dot { display: inline-block; flex: none; margin-left: 6px; vertical-align: middle; width: 7px; height: 7px; border-radius: 50%; background: var(--due); }
/* the strip of the class editor reads from the left, Add first (the owner, 2026-11-23) */
.ce-strip { justify-content: flex-start; }
.cv-none, .cv-hint { padding: 8px; }
.cv-name { margin: 0; font-size: 15px; font-weight: 500; }
.cv-props { border-left: 1px solid var(--rule); }
.cv[data-props="off"] { grid-template-columns: minmax(0, 1fr) 40px; }
.cv[data-props="off"] .cv-props { justify-items: center; padding: 10px 6px; }
.cv-props textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid var(--rule-2); border-radius: 7px; padding: 5px 8px; background: var(--doc); color: var(--ink); font: inherit; font-size: 13px; resize: vertical; }
.cv-props textarea.code { font-family: var(--f-code); font-size: 12px; }
.cv-props textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.cv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* a formula in its colours, to read; a click opens it in the formula editor */
.cv-fx { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 6px 8px; border: 1px solid var(--rule-2); border-radius: 7px; background: var(--doc); color: var(--ink); text-align: left; cursor: pointer; }
.cv-fx:hover { border-color: var(--ink-3); }
.cv-fx .code { flex: 1; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.cv-fx .muted { flex: 1; font-size: 12.5px; }
.cv-fx-go { flex: none; font-family: var(--f-code); font-size: 12px; font-style: italic; color: var(--accent); }

/* ---------- the colours inside a formula: the formula box, and a formula shown to read ---------- */
.fx-function { color: var(--accent); }
.fx-variable { color: var(--ink); font-weight: 600; }
.fx-name { color: var(--due); text-decoration: underline dotted; }
.fx-field { color: var(--ink); }   /* a name of a source this screen does not know: the engine's check judges it */
.fx-number { color: var(--warn); }
.fx-text { color: var(--ok); }
.fx-word { color: var(--accent); font-weight: 600; }
.fx-sign { color: var(--ink-2); }

/* ---------- the formula editor (fxedit.js), to the owner's board ---------- */
.fx { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.fx-top { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 8px 16px; border-bottom: 1px solid var(--rule); background: var(--sheet); font-size: 12.5px; }
.fx-path { display: flex; gap: 8px; align-items: baseline; color: var(--ink-2); }
.fx-path b { color: var(--ink); font-weight: 600; }
/* the places that lead back read as the people page's trail does: words, not buttons, darker under the pointer */
.fx-path button { all: unset; cursor: pointer; color: var(--ink-2); }
.fx-path button:hover { color: var(--ink); text-decoration: underline; }
.fx-path button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.fx-doc { flex: 1; color: var(--ink-2); }
.fx-body { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.fx-main { min-height: 0; overflow: auto; padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.fx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.fx-head .kicker { flex-basis: 100%; }
.fx-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.fx-head h2 .code { font-size: 12px; font-weight: 400; }
.fx-head .z-quiet { margin-left: auto; }
/* the box: a field of the page, its look the page's */
.fx-boxwrap .cm-editor { border: 1px solid var(--rule-2); border-radius: 8px; background: var(--doc); color: var(--ink); }
.fx-boxwrap .cm-editor.cm-focused { outline: 2px solid var(--accent); outline-offset: 1px; }
.fx-boxwrap .cm-editor .cm-scroller { font-family: var(--f-code); font-size: 14px; line-height: 1.6; }
.fx-boxwrap .cm-editor .cm-content { padding: 10px 4px; caret-color: var(--ink); }
.fx-boxwrap .cm-editor .cm-line { padding: 0 8px; }
.fx-boxwrap .cm-editor .cm-cursor { border-left-color: var(--ink); }
.fx-boxwrap .cm-editor .cm-selectionBackground, .fx-boxwrap .cm-editor.cm-focused .cm-selectionBackground { background: var(--accent-fill); opacity: .35; }
.fx-boxwrap .cm-editor .cm-matchingBracket { background: var(--sunk); outline: 1px solid var(--rule-2); }
.fx-boxwrap .cm-editor .cm-lintRange-error { background-image: none; text-decoration: underline wavy var(--due); text-underline-offset: 3px; }
.fx-boxwrap .cm-editor .cm-tooltip { border: 1px solid var(--rule-2); border-radius: 7px; background: var(--doc); color: var(--ink); font-size: 12.5px; }
/* what fits at the cursor */
.fx-sug { display: grid; gap: 1px; padding: 4px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--doc); }
.fx-sug[hidden] { display: none; }
.fx-opt { display: flex; align-items: baseline; gap: 10px; padding: 5px 8px; border: 0; border-radius: 6px; background: none; color: var(--ink); font-size: 12.5px; text-align: left; cursor: pointer; }
.fx-opt b.code { flex: none; font-weight: 600; font-size: 12.5px; }
.fx-kind { flex: none; font-size: 11.5px; color: var(--ink-2); }
.fx-opt .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.fx-opt:hover, .fx-opt.on { background: var(--accent-fill); color: var(--on-accent); }
.fx-opt:hover .fx-kind, .fx-opt.on .fx-kind, .fx-opt:hover .muted, .fx-opt.on .muted, .fx-opt:hover b.code, .fx-opt.on b.code { color: var(--on-accent); }
/* the call the cursor is in */
.fx-call { padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--sheet); font-size: 12.5px; }
.fx-call[hidden] { display: none; }
.fx-call p { margin: 2px 0; }
.fx-sig { font-size: 13px; }
.fx-sig b { color: var(--accent); }
/* the engine's answer */
.fx-verdict p { margin: 2px 0; font-size: 13px; }
.fx-ok { color: var(--ok); font-weight: 600; }
.fx-open { color: var(--warn); }
.fx-wrong { font-size: 13px; }
.fx-wrong mark { background: none; color: var(--due); text-decoration: underline wavy var(--due); text-underline-offset: 3px; }
.fx-msg { color: var(--due); }
.fx-mean { display: flex; align-items: center; gap: 8px; }
.fx-foot { margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 12px; line-height: 1.5; }
.fx-foot b { font-weight: 600; color: var(--ink-2); }
/* at the side: the variables with their values, and the functions in groups */
.fx-side { min-height: 0; overflow: auto; padding: 14px 12px 24px; border-left: 1px solid var(--rule); background: var(--sheet); display: flex; flex-direction: column; gap: 6px; }
.fx-side .kicker { margin: 0; }
.fx-fns-t { margin-top: 14px !important; }
.fx-hint { margin: 0 0 4px; font-size: 11.5px; }
.fx-vars { display: grid; gap: 1px; }
.fx-var { display: flex; justify-content: space-between; gap: 10px; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--ink); text-align: left; cursor: pointer; font-size: 12px; }
.fx-var:hover { background: var(--sunk); }
.fx-var .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.fx-group .z-fold { padding: 4px 6px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 0 8px 8px; }
.fx-chip { padding: 2px 7px; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--doc); color: var(--accent); font-size: 11.5px; cursor: pointer; }
.fx-chip:hover { border-color: var(--accent); }
/* Delete, in the properties of a variable, a state or a transition: the designer's "Take off the page", with the bin */
.ce .fe-head .z-off { font-size: 12.5px; }

/* Text: the class as its JSON (classtext.js), filling the view, in the colours of the palette */
.ct { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.ct .cm-editor { flex: 1 1 0; min-height: 0; background: var(--doc); color: var(--ink); }
.ct .cm-editor.cm-focused { outline: none; }
.ct .cm-scroller { font-family: var(--f-code); font-size: 13px; line-height: 1.6; overflow: auto; }
.ct .cm-content { padding: 10px 0 40px; caret-color: var(--ink); }
.ct .cm-line { padding: 0 14px 0 8px; }
.ct .cm-gutters { background: var(--sheet); color: var(--ink-3); border-right: 1px solid var(--rule); }
.ct .cm-activeLine { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.ct .cm-activeLineGutter { background: var(--sunk); color: var(--ink-2); }
.ct .cm-cursor { border-left-color: var(--ink); }
.ct .cm-selectionBackground, .ct .cm-editor.cm-focused .cm-selectionBackground { background: var(--accent-fill); opacity: .35; }
.ct .cm-matchingBracket { background: var(--sunk); outline: 1px solid var(--rule-2); }
.ct .cm-lintRange-error { background-image: none; text-decoration: underline wavy var(--due); text-underline-offset: 3px; }
.ct .cm-lintRange-info { background-image: none; text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; }
.ct .cm-lint-marker { background: none; width: 12px; height: 12px; display: grid; place-items: center; }
.ct .cm-lint-marker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.ct .cm-lint-marker-error::before { background: var(--due); }
.ct .cm-tooltip, .fx-boxwrap .cm-tooltip { border: 1px solid var(--rule-2); border-radius: 7px; background: var(--doc); color: var(--ink); font-size: 12.5px; }
.ct .cm-diagnostic-error, .fx-boxwrap .cm-diagnostic-error { border-left-color: var(--due); }
.ct .cm-diagnostic-info, .fx-boxwrap .cm-diagnostic-info { border-left-color: var(--ink-3); }
.tx-key { color: var(--ink); font-weight: 600; }
.tx-text { color: var(--ok); }
.tx-number { color: var(--warn); }
.tx-word { color: var(--accent); font-weight: 600; }
.tx-sign { color: var(--ink-2); }
/* a formula inside its quotes wears the formula box's colours, whichever of the two marks holds the other */
.ct [class*="fx-"] .tx-text { color: inherit; font-weight: inherit; }
