/* MiStudio model tree (November 2026): the "What is missing" line, branch rows with a status badge
   and a "+" button, item rows, the editors in the Properties pane, the material library panel.
   Colors: the page's tokens only (--ok / --warn / --bad for status, --acc for the open item). */
.mt-miss{display:grid;grid-template-columns:1fr auto;gap:1px 8px;margin:2px 8px 8px;padding:8px 10px;border-radius:10px;cursor:default;
 background:color-mix(in srgb,var(--bad) 10%,transparent);border:1px solid color-mix(in srgb,var(--bad) 28%,transparent);transition:background-color 80ms ease,transform 80ms ease}
.mt-miss b{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--bad);grid-column:1/-1}
.mt-miss span{white-space:normal;line-height:1.3}.mt-miss small{color:var(--mute);align-self:end;white-space:nowrap}
.mt-miss.ok{background:color-mix(in srgb,var(--ok) 9%,transparent);border-color:color-mix(in srgb,var(--ok) 26%,transparent)}.mt-miss.ok b{color:var(--ok)}
.mt-miss[data-mtjump]:hover{background:color-mix(in srgb,var(--bad) 16%,transparent)}.mt-miss.ok[data-mtjump]:hover{background:color-mix(in srgb,var(--ok) 15%,transparent)}
.mt-miss[data-mtjump]:active{transform:scale(.99)}
.row.mt-br{height:28px;margin-top:1px}
.row.mt-br .ct{font-size:11.5px}.mt-none{font-style:normal;color:var(--faint)}
.mt-b{min-width:20px;text-align:center;margin-left:4px}
.badge.mt-b.bad{font-weight:700}
.mt-add,.mt-add0{width:20px;height:20px;flex:none;margin-left:2px}
.mt-add{border:0;border-radius:6px;background:transparent;color:var(--mute);font-size:15px;line-height:18px;padding:0;cursor:default;transition:background-color 80ms ease}
.mt-add:hover{background:var(--acc-soft);color:var(--acc)}.mt-add:active{transform:scale(.92);background:var(--line2)}
.row.mt-it .nm{max-width:58%}.row.mt-it.dim{color:var(--mute)}.row.mt-it.dim:hover{background:none}
.row.mt-it .ct.yes{color:var(--ok)}.row.mt-it .ct.no{color:var(--bad)}
.row.mt-flash{animation:mtflash 900ms ease-out}
@keyframes mtflash{0%{background:var(--acc-soft);box-shadow:inset 0 0 0 1.5px var(--acc)}100%{background:transparent;box-shadow:inset 0 0 0 1.5px transparent}}
.mt-menu{min-width:230px;padding:5px;z-index:60}
.mt-menu .item{cursor:default}.mt-menu .item:active{background:var(--line2)}
/* editors */
.mt-ed .mt-kw{font:11px ui-monospace,"Cascadia Mono",Consolas,monospace;color:var(--mute);margin:0 2px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mt-ed .mt-name{font-size:15px;font-weight:600;height:30px;margin-bottom:8px}
.mt-ed .title{display:flex;align-items:center;gap:8px}
.mt-kv{grid-template-columns:118px 1fr}
.mt-in{display:flex;align-items:center;min-width:0}.mt-in .fld{min-width:0}
.mt-msg{margin:6px 0;padding:6px 9px;border-radius:8px;font-size:12px;line-height:1.35}
.mt-msg.bad{background:color-mix(in srgb,var(--bad) 11%,transparent);color:var(--bad)}
.mt-msg.warn{background:color-mix(in srgb,var(--warn) 12%,transparent);color:var(--warn)}
.mt-msg.ok{background:color-mix(in srgb,var(--ok) 10%,transparent);color:var(--ok)}
.mt-msg[data-goid]{cursor:default}.mt-msg[data-goid]:hover{filter:brightness(1.08)}
.mt-ta{height:96px;padding:6px 8px;font:12px/1.45 ui-monospace,"Cascadia Mono",Consolas,monospace;resize:vertical;width:100%}
.mt-plot{width:100%;height:84px;display:block;margin:6px 0 0;border:1px solid var(--line);border-radius:8px;background:var(--panel2)}
.mt-addlist{display:flex;flex-direction:column;gap:4px}.mt-addlist .btn{justify-content:flex-start;height:28px}
.mt-del{color:var(--bad)}
.mt-ed .crow{border:0;padding:4px 2px}.mt-ed .crow[data-go]:hover{background:var(--hover);border-radius:6px}
.mt-ed a{color:var(--acc);cursor:default}
/* material library */
.mt-lib-top{display:flex;gap:6px;margin-bottom:8px}.mt-lib-top select{flex:0 0 150px}
.mt-lib{max-height:260px}.mt-lib .hrow{padding:6px 10px}.mt-lib .hrow.on{background:var(--acc-soft)}
.mt-lib .l{display:flex;flex-direction:column;min-width:0}.mt-lib .l small{color:var(--mute);font-size:11px}
.mt-lib .n{font-weight:400;color:var(--mute);font-size:11.5px;white-space:nowrap}
@media (prefers-reduced-motion:reduce){.row.mt-flash{animation:none}}

/* round 0.74: branch CARDS (Maysam: the tree looked messy). Each top branch with its rows is one rounded band; a small line
   icon per branch (modeltree.js BRANCH_ICON); child rows hang on a guide line under the twisty; the right-hand columns line up:
   count, status badge, "+" on the branch row, and the item rows keep the same columns free so their text ends where the
   branch count ends. Used by the deck tree too (decktree.js). */
.mt-grp{margin:0 4px 4px;border-radius:10px;border:1px solid var(--line);background:color-mix(in srgb,var(--ink) 2.4%,var(--panel));transition:background-color 120ms ease}
.mt-grp.open{padding-bottom:3px;background:color-mix(in srgb,var(--ink) 3.2%,var(--panel))}
.mt-grp .row{margin:0 1px;position:relative;gap:5px}
.mt-grp .row.mt-br{height:30px;margin-top:0;border-radius:9px}
.mt-grp.open>.row.mt-br{border-bottom-left-radius:4px;border-bottom-right-radius:4px}
.mt-grp .row.mt-br .nm b{font-weight:600;letter-spacing:-.005em}
.mt-bi{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;color:var(--mute);margin:0 1px 0 -2px}
.mt-bi .f{fill:currentColor;stroke:none}.mt-bi .hl{stroke-width:1;opacity:.55}.mt-bi .th{stroke-width:2}
.mt-grp.open .mt-bi,.row.mt-br:hover .mt-bi,.row.mt-br.sel .mt-bi{color:var(--ink)}
.mt-grp .row:not(.mt-br)::before{content:"";position:absolute;left:14px;top:0;bottom:0;width:1px;background:var(--line2);pointer-events:none}
.mt-grp .row:not(.mt-br):last-child::before{bottom:50%}
.mt-grp .row.mt-it::after{content:"";flex:none;width:20px}
.mt-grp .row.mt-it:has(.mt-b)::after{width:0}
.mt-grp .row .ct{font-variant-numeric:tabular-nums}

/* 0.84: the What is missing box is one line, opened by its arrow */
.mt-miss.folded,.mt-miss.open{display:block;padding:6px 10px}
.mt-miss-h{display:flex;align-items:center;gap:6px;cursor:pointer}.mt-miss-h:not([data-mtmiss]){cursor:default}
.mt-miss-h b{grid-column:auto;flex:1}.mt-miss-h small{color:var(--mute);white-space:nowrap}
.mt-miss-h .tw{font-size:9px;color:var(--mute);transition:transform .15s}.mt-miss-h .tw.open{transform:rotate(90deg)}
.mt-miss-it{padding:3px 0 3px 15px;line-height:1.3;cursor:pointer;border-top:1px solid color-mix(in srgb,var(--bad) 14%,transparent)}
.mt-miss-it:hover{text-decoration:underline}.mt-miss-it.warn{color:var(--mute)}.mt-miss-it.more{cursor:default;color:var(--mute)}
