/* MiStudio round 0.75 (November 2026): the measurements chip's dropdown, highlighted annotations, dX dY dZ leaders,
   the smart card's lead value. Colors: the measure teal (--meas) for what is measured; X / Y / Z leaders in the triad's
   red / green / blue, muted so they read as construction lines. */
:root{--ax-x:#d64545;--ax-y:#2f9e44;--ax-z:#3b6fd6}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ax-x:#ff6b6b;--ax-y:#51cf66;--ax-z:#6e9bff}}
:root[data-theme="dark"]{--ax-x:#ff6b6b;--ax-y:#51cf66;--ax-z:#6e9bff}

/* the chip: "3 measurements v" opens the list; Clear all stays beside it */
.meas-chip .mc-n{display:flex;align-items:center;gap:5px;height:22px;padding:0 6px 0 0;border:0;background:none;color:inherit;font:inherit;font-weight:600;cursor:pointer;border-radius:999px}
.meas-chip .mc-n svg{width:10px;height:10px;transition:transform .18s cubic-bezier(.2,.8,.2,1)}
.meas-chip.open .mc-n svg{transform:rotate(180deg)}
.meas-chip .mc-n:focus-visible{outline:2px solid var(--meas);outline-offset:2px}
.meas-chip .mc-menu{position:absolute;left:0;top:calc(100% + 6px);min-width:260px;max-width:340px;max-height:min(60vh,420px);overflow:auto;padding:4px;
 background:var(--panel);color:var(--ink);border:1px solid var(--line2);border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,.10),0 10px 30px rgba(0,0,0,.16);
 transform-origin:12px 0;animation:mcIn .16s cubic-bezier(.2,.8,.2,1)}
@keyframes mcIn{from{opacity:0;transform:scale(.97) translateY(-3px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.meas-chip .mc-menu{animation:none}.meas-chip .mc-n svg{transition:none}}
.mc-row{display:grid;grid-template-columns:auto 1fr 22px;align-items:center;gap:10px;padding:5px 4px 5px 10px;border-radius:8px;cursor:pointer;font-size:12.5px}
.mc-row:hover,.mc-row:focus-visible{background:color-mix(in srgb,var(--meas) 12%,transparent);outline:none}
.mc-row .mc-k{color:var(--mute);white-space:nowrap}
.mc-row .mc-v{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
.mc-row.live .mc-k::after{content:" (open)";color:var(--faint)}
.mc-row .x{width:22px;height:22px;border:0;border-radius:6px;background:none;color:var(--mute);cursor:pointer;font-size:11px;opacity:.55}
.mc-row:hover .x{opacity:1}.mc-row .x:hover{background:var(--hover);color:var(--bad)}
.mc-empty{padding:8px 10px;color:var(--mute);font-size:12px}
.mc-foot{display:flex;align-items:center;justify-content:space-between;margin-top:4px;padding:6px 6px 2px 10px;border-top:1px solid var(--line);font-size:12px;color:var(--mute)}
.mc-dec{display:flex;align-items:center;gap:6px}.mc-dec b{min-width:14px;text-align:center;color:var(--ink);font-variant-numeric:tabular-nums}
.mc-dec .btn{width:22px;height:22px;padding:0;border-radius:6px;border:1px solid var(--line2)}

/* a highlighted measurement (hovered in the list): thicker, full ink, its label lifted */
.ann-dim.hl,.ann-leg.hl,.ann-arc.hl{stroke-width:3}
.ann-ext.hl,.ann-lead.hl{opacity:1;stroke-width:1.75}
.ann-pt.hl{fill:var(--meas);r:5}
.ann.hl{background:var(--meas);color:var(--meas-bg);box-shadow:0 0 0 3px color-mix(in srgb,var(--meas) 30%,transparent);z-index:2}

/* dX dY dZ leaders: dashed, thin, axis colors */
.ann-ax{stroke-width:1.25;stroke-dasharray:4 3;opacity:.9}
.ann-ax.ax-x{stroke:var(--ax-x)}.ann-ax.ax-y{stroke:var(--ax-y)}.ann-ax.ax-z{stroke:var(--ax-z)}
.ann-axt{font:600 10.5px/1 system-ui,-apple-system,"Segoe UI",sans-serif;paint-order:stroke;stroke:var(--meas-bg);stroke-width:3px;stroke-linejoin:round}
.ann-axt.ax-x{fill:var(--ax-x)}.ann-axt.ax-y{fill:var(--ax-y)}.ann-axt.ax-z{fill:var(--ax-z)}

/* the smart card: the value asked for first, large; the rest under it; a click on a value copies it */
.smart-card .sc-hero{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:2px 0 6px;margin-bottom:4px;border-bottom:1px solid var(--line);cursor:copy}
.smart-card .sc-hero .k{color:var(--mute);font-size:11.5px;white-space:nowrap}
.smart-card .sc-hero .v{font-size:17px;font-weight:650;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--ink);white-space:nowrap}
.smart-card .sc-hero:hover .v,.smart-card .sc-rows .v[data-row]:hover{color:var(--meas)}
.smart-card .sc-rows .v[data-row]{cursor:copy}
.smart-card .sc-hero~.sc-rows .k:first-child,.smart-card .sc-hero~.sc-rows .k:first-child+.v{font-weight:400}
.smart-card .sc-hero~.sc-rows .k:first-child{color:var(--mute)}

/* 0.5.44: a measurement hidden behind a body: faded label, dashed lines (hover / highlight shows it in full) */
.ann.behind{opacity:.42}.ann.behind:hover{opacity:1}
.ann-lead.behind,.ann-dim.behind{stroke-dasharray:3 3;opacity:.45}.ann-pt.behind{opacity:.4}
/* BL-136: the live Smart result fades too (a little less: it is the one being worked on); an angle's legs, extensions, arc dash */
.ann.smart-card.behind{opacity:.62}.ann.smart-card.behind:hover,.ann.smart-card.behind:focus-within{opacity:1}
.ann-leg.behind,.ann-ext.behind,.ann-arc.behind{stroke-dasharray:3 3;opacity:.45}

/* 0.5.49: Length / Area: each edge / face labeled on its own line (small, light), one bold total; the live one dashed */
.ann.ann-part{pointer-events:auto;cursor:default;padding:0 5px;border-radius:4px;font-weight:500;font-size:10.5px;line-height:16px;
 background:color-mix(in srgb,var(--ann-bg) 85%,transparent);border-color:color-mix(in srgb,var(--ann) 28%,transparent);box-shadow:none}
.ann.ann-one{pointer-events:auto;cursor:default}
.ann.ann-sum{pointer-events:auto;cursor:default;font-weight:500;border:1.5px solid var(--ann);padding:2px 8px}.ann.ann-sum b{font-weight:750}
.ann.ann-sum.pending,.ann.ann-one.pending{border-style:dashed}
.mlist .crow .mhead{display:block}.mlist .crow .mbreak{display:block;font-size:11px;color:var(--mute);font-variant-numeric:tabular-nums;white-space:normal}
.mlist .crow .mlive{font-size:10px;padding:0 4px;border-radius:3px;background:var(--meas);color:var(--meas-bg);vertical-align:1px}
.mlist .crow.on{background:color-mix(in srgb,var(--meas) 14%,transparent)}
