/* ── Machine view (5 Oct 2026) ─ glass panels over a deep gradient; one colour per state ── */
#mv { position: fixed; inset: 0; z-index: 900; display: none; }
#mv.open, #mv.closing { display: block; }
body.mv-lock { overflow: hidden; }
.mv-scrim { position: absolute; inset: 0; background: rgba(5, 10, 20, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
#mv.open .mv-scrim { opacity: 1; }
.mv-sheet { position: absolute; inset: 14px; border-radius: 22px; overflow: hidden; color: #e7eef8;
  background: radial-gradient(1200px 500px at 15% -10%, #16325e 0%, transparent 60%), radial-gradient(900px 500px at 110% 10%, #0d4a43 0%, transparent 55%), #0a1120;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.06);
  transform: scale(var(--mv-sx, .9), var(--mv-sy, .9)); opacity: 0; }
#mv.open .mv-sheet { animation: mvGrow .42s cubic-bezier(.2, .9, .25, 1) forwards; }
#mv.closing .mv-sheet { animation: mvShrink .24s ease-in forwards; }
@keyframes mvGrow { 0% { transform: scale(var(--mv-sx), var(--mv-sy)); opacity: .2; border-radius: 40px; } 100% { transform: none; opacity: 1; } }
@keyframes mvShrink { from { transform: none; opacity: 1; } to { transform: scale(.96); opacity: 0; } }
.mv-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; }
.mv-close { position: absolute; top: 14px; right: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(15, 23, 38, .7); color: #fff; font-size: 16px; cursor: pointer; backdrop-filter: blur(8px); }
.mv-close:hover { background: rgba(239, 68, 68, .8); }

/* hero: 3D left, identity right; shrinks with --mv-p (0 -> 1) while scrolling */
.mv-hero { --mv-p: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; padding: 22px 28px 8px;
  transform: translateY(calc(var(--mv-p) * -30px)) scale(calc(1 - var(--mv-p) * .06)); opacity: calc(1 - var(--mv-p) * .55); transform-origin: top center; }
.mv-3d { position: relative; height: clamp(230px, 40vh, 380px); border-radius: 18px; overflow: hidden;
  background: radial-gradient(closest-side at 50% 65%, rgba(16,185,129,.16), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)); }
.mv-3d canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.mv-3d canvas:active { cursor: grabbing; }
.mv-3d-hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 11px; color: rgba(231,238,248,.55); pointer-events: none; }
.mv-3d.still canvas, .mv-3d.still .mv-3d-hint { display: none; }
.mv-3d.still::after { content: "\2699"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; color: rgba(255,255,255,.12); }
.mv-id { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 0; padding-right: 40px; }
.mv-title h1 { margin: 6px 0 2px; font-size: clamp(24px, 3vw, 38px); line-height: 1.1; letter-spacing: -.01em; overflow-wrap: anywhere; color: #fff; }
.mv-sub { color: rgba(231,238,248,.62); font-size: 13px; }
.mv-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.mv-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); animation: mvPing 1.8s infinite; }
@keyframes mvPing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 70%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.mv-alarm { background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.45); color: #fecaca; padding: 9px 12px; border-radius: 12px; font-weight: 600; font-size: 13px; }
.mv-alarm.big { font-size: 14px; }
.mv-ok { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.35); color: #a7f3d0; padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.mv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.mv-parts { grid-column: span 2; display: flex; align-items: center; gap: 14px; }
.mv-parts b { font-size: 34px; font-family: var(--mono, ui-monospace, monospace); display: block; line-height: 1; color: #fff; }
.mv-parts span, .mv-fact span { font-size: 11px; color: rgba(231,238,248,.55); text-transform: uppercase; letter-spacing: .05em; }
.mv-ring { width: 74px; height: 74px; transform: rotate(-90deg); flex: none; }
.mv-ring circle { fill: none; stroke-width: 10; }
.mv-ring-bg { stroke: rgba(255,255,255,.08); }
.mv-ring-fg { stroke-linecap: round; transition: stroke-dasharray .9s cubic-bezier(.2,.9,.25,1); }
.mv-fact { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.mv-fact b { display: block; font-size: 17px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.mv-fact small { font-size: 11px; color: rgba(231,238,248,.5); }
.mv-op { display: flex; align-items: center; gap: 9px; }

/* sticky mini header + tab/range bar */
.mv-mini { position: absolute; top: 0; left: 0; right: 0; z-index: 4; height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 70px 0 24px;
  background: rgba(10,17,32,.88); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px;
  transform: translateY(-100%); transition: transform .25s; color: rgba(231,238,248,.8); white-space: nowrap; overflow: hidden; }
.mv-mini.show { transform: none; }
.mv-mini b { color: #fff; font-size: 15px; }
.mv-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mv-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between;
  padding: 10px 28px; background: linear-gradient(180deg, rgba(10,17,32,.94), rgba(10,17,32,.82)); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.mv-tabwrap { position: relative; display: flex; align-items: center; min-width: 0; max-width: 100%; }
.mv-tabs { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; max-width: 100%; min-width: 0; flex: 1; padding-bottom: 4px; }
.mv-tabs::-webkit-scrollbar { height: 5px; }
.mv-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 4px; }
.mv-tabarr { display: none; flex: none; width: 28px; height: 32px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font-size: 11px; }
.mv-tabarr:hover { background: rgba(255,255,255,.16); }
.mv-tabwrap.can-l .mv-tabarr.l, .mv-tabwrap.can-r .mv-tabarr.r { display: block; }
:root[data-theme="light"] .mv-tabarr { background: rgba(13,23,38,.08); color: #0d1726; }
:root[data-theme="light"] .mv-tabs { scrollbar-color: rgba(13,23,38,.25) transparent; }
:root[data-theme="light"] .mv-tabs::-webkit-scrollbar-thumb { background: rgba(13,23,38,.25); }
.mv-tabs button, .mv-ranges button { background: none; border: 0; color: rgba(231,238,248,.62); font: inherit; font-weight: 700; font-size: 13.5px; padding: 9px 12px; cursor: pointer; border-radius: 10px; white-space: nowrap; }
.mv-tabs button.on { color: #fff; }
.mv-tabs button:hover, .mv-ranges button:hover { color: #fff; background: rgba(255,255,255,.05); }
.mv-ink { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #22d3ee, #10b981); transition: transform .3s cubic-bezier(.2,.9,.25,1), width .3s; }
.mv-ranges { display: flex; gap: 4px; flex-wrap: wrap; background: rgba(255,255,255,.04); border-radius: 12px; padding: 3px; }
.mv-ranges button { padding: 6px 11px; font-size: 12.5px; }
.mv-ranges button.on { background: rgba(34,211,238,.16); color: #a5f3fc; }

/* body */
.mv-body { padding: 18px 28px 60px; display: flex; flex-direction: column; gap: 18px; min-height: 60vh; min-width: 0; }
.mv-body > *, .mv-id > *, .mv-hero > * { min-width: 0; max-width: 100%; }
.mv-range-note { font-size: 12px; color: rgba(231,238,248,.5); text-transform: uppercase; letter-spacing: .07em; }
.mv-h { margin: 6px 0 10px; font-size: 16px; color: #fff; }
.mv-card h3 { margin: 0 0 12px; font-size: 15px; color: #fff; }
.mv-h small, .mv-card h3 small { font-weight: 500; color: rgba(231,238,248,.5); font-size: 12px; margin-left: 6px; }
.mv-card { position: relative; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 16px 18px; min-width: 0; }
.mv-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mv-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mv-note { color: rgba(231,238,248,.55); font-size: 12.5px; margin: 8px 0 0; }
.mv-empty { color: rgba(231,238,248,.55); padding: 16px; text-align: center; border: 1px dashed rgba(255,255,255,.12); border-radius: 14px; }
.mv-story { display: flex; gap: 14px; align-items: center; font-size: 16px; line-height: 1.5; padding: 16px 18px; border-radius: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.08); }
.mv-story-ic { width: 12px; align-self: stretch; border-radius: 6px; flex: none; }
.mv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.mv-tile { --c: #10b981; position: relative; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 14px; overflow: hidden; min-width: 0;
  transition: transform .2s, border-color .2s, opacity .5s ease; }
.mv-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c); opacity: .9; }
.mv-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.mv-tile-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: rgba(231,238,248,.78); }
.mv-chip { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; }
.mv-tile > b, .mv-tile b[data-count] { display: block; font-size: 28px; font-family: var(--mono, ui-monospace, monospace); margin: 8px 0 2px; color: #fff; }
.mv-tile-pct { font-size: 12px; color: rgba(231,238,248,.55); }
.mv-tile-bar { height: 5px; border-radius: 4px; background: rgba(255,255,255,.07); margin-top: 9px; overflow: hidden; }
.mv-tile-bar i { display: block; height: 100%; background: var(--c); border-radius: 4px; transform-origin: left; }
.mv-rv.in .mv-tile-bar i { animation: mvBar .9s cubic-bezier(.2,.9,.25,1) both; }
@keyframes mvBar { from { transform: scaleX(0); } }
.mv-alarm-txt { font-weight: 700; margin: 8px 0 4px; color: #fecaca; overflow-wrap: anywhere; }
.mv-eng { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.mv-big3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mv-big3 b { display: block; font-size: 26px; font-family: var(--mono, ui-monospace, monospace); color: #fff; }
.mv-big3 span { font-size: 11.5px; color: rgba(231,238,248,.55); }

/* timeline ribbon */
.mv-tl { position: relative; }
.mv-tl-bar { position: relative; height: 44px; border-radius: 12px; overflow: hidden; background: #111a2b; }
.mv-tl-bar i { position: absolute; top: 0; bottom: 0; }
.mv-tl-bar i:hover { filter: brightness(1.35); }
.mv-rv.in .mv-tl-bar { animation: mvWipe 1s cubic-bezier(.2,.9,.25,1) both; }
@keyframes mvWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.mv-tl-ticks { position: relative; height: 18px; margin-top: 4px; }
.mv-tl-ticks span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: rgba(231,238,248,.45); white-space: nowrap; }
.mv-tl-ops { position: relative; height: 34px; margin-top: 4px; }
.mv-op-seg { position: absolute; top: 0; height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 6px; overflow: hidden; border-radius: 8px;
  background: rgba(59,130,246,.18); border: 1px solid rgba(59,130,246,.4); font-size: 12px; white-space: nowrap; box-sizing: border-box; }
.mv-op-seg img { width: 20px; height: 26px; object-fit: cover; border-radius: 4px; }
.mv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: rgba(231,238,248,.7); }
.mv-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.mv-tip { position: absolute; top: 60px; width: 200px; padding: 7px 10px; border-radius: 10px; background: #0b1426; border: 1px solid rgba(255,255,255,.14);
  font-size: 12px; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 2; color: #e7eef8; }

/* lists */
.mv-list { display: flex; flex-direction: column; gap: 6px; }
.mv-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); font-size: 13px; min-width: 0; }
.mv-row > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-row .grow { flex: 1; min-width: 0; }
.mv-row b { color: #fff; }
.mv-row-ic { width: 8px; height: 26px; border-radius: 4px; flex: none; }
.mv-spark { width: 100%; height: 70px; }
.mv-spark polyline { fill: none; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.mv-now-op { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mv-now-op h2 { margin: 2px 0; color: #fff; }
.mv-reps { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.mv-rep { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; border-radius: 16px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #fff; font: inherit; transition: transform .2s, border-color .2s, opacity .5s; }
.mv-rep:hover { transform: translateY(-3px); border-color: #22d3ee; }
.mv-rep span { font-size: 28px; }
.mv-rep small { color: rgba(231,238,248,.55); }

/* reveal + loading */
.mv-rv { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.9,.25,1); }
.mv-rv.in { opacity: 1; transform: none; }
.mv-loading { display: flex; gap: 8px; justify-content: center; padding: 60px 0; }
.mv-loading span { width: 10px; height: 10px; border-radius: 50%; background: #22d3ee; animation: mvDots 1s infinite ease-in-out; }
.mv-loading span:nth-child(2) { animation-delay: .15s; }
.mv-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes mvDots { 0%, 100% { transform: scale(.5); opacity: .4; } 50% { transform: scale(1); opacity: 1; } }

/* light theme: same layout, light glass */
:root[data-theme="light"] .mv-sheet { color: #13202f; background: radial-gradient(1200px 500px at 15% -10%, #dbe8ff 0%, transparent 60%), radial-gradient(900px 500px at 110% 10%, #d5f5ee 0%, transparent 55%), #f4f7fb; }
:root[data-theme="light"] .mv-title h1, :root[data-theme="light"] .mv-h, :root[data-theme="light"] .mv-card h3, :root[data-theme="light"] .mv-tile > b,
:root[data-theme="light"] .mv-tile b[data-count], :root[data-theme="light"] .mv-big3 b, :root[data-theme="light"] .mv-row b, :root[data-theme="light"] .mv-mini b,
:root[data-theme="light"] .mv-parts b, :root[data-theme="light"] .mv-fact b, :root[data-theme="light"] .mv-now-op h2, :root[data-theme="light"] .mv-rep { color: #0d1726; }
:root[data-theme="light"] .mv-card, :root[data-theme="light"] .mv-tile, :root[data-theme="light"] .mv-fact, :root[data-theme="light"] .mv-row,
:root[data-theme="light"] .mv-rep, :root[data-theme="light"] .mv-story { background: rgba(255,255,255,.78); border-color: rgba(15,30,60,.1); color: #13202f; }
:root[data-theme="light"] .mv-bar, :root[data-theme="light"] .mv-mini { background: rgba(244,247,251,.92); }
:root[data-theme="light"] .mv-tabs button, :root[data-theme="light"] .mv-ranges button, :root[data-theme="light"] .mv-sub, :root[data-theme="light"] .mv-note,
:root[data-theme="light"] .mv-tile-pct, :root[data-theme="light"] .mv-tile-top, :root[data-theme="light"] .mv-legend, :root[data-theme="light"] .mv-range-note { color: #4b5b70; }
:root[data-theme="light"] .mv-tabs button.on { color: #0d1726; }
:root[data-theme="light"] .mv-tl-bar { background: #e3e9f2; }
:root[data-theme="light"] .mv-tip { background: #fff; color: #13202f; border-color: rgba(15,30,60,.15); }

@media (max-width: 860px) {
  .mv-sheet { inset: 0; border-radius: 0; }
  .mv-hero { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 4px; }
  .mv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mv-close { top: 10px; right: 10px; }
  .mv-id { padding-right: 0; }
  .mv-3d { height: 220px; }
  .mv-bar, .mv-body { padding-left: 16px; padding-right: 16px; }
  .mv-grid2, .mv-grid3 { grid-template-columns: 1fr; }
  .mv-parts { grid-column: 1 / -1; }
  .mv-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  #mv *, #mv *::before, #mv *::after { animation: none !important; transition: none !important; }
  .mv-rv { opacity: 1; transform: none; }
  .mv-sheet { transform: none !important; opacity: 1 !important; }
}

/* ── fixes 5 Oct night ─────────────────────────────────────────────── */
/* the small top bar must not cover the tabs */
.mv-scroll.mini-on .mv-bar { top: 54px; }
.mv-bad { color: #ef4444; font-style: normal; font-weight: 700; }
.mv-row small { color: rgba(231,238,248,.55); }

/* light theme: every secondary text readable (contrast >= 4.5:1 on white glass) */
:root[data-theme="light"] .mv-3d-hint, :root[data-theme="light"] .mv-parts span, :root[data-theme="light"] .mv-fact span,
:root[data-theme="light"] .mv-fact small, :root[data-theme="light"] .mv-mini, :root[data-theme="light"] .mv-mini span,
:root[data-theme="light"] .mv-h small, :root[data-theme="light"] .mv-card h3 small, :root[data-theme="light"] .mv-empty,
:root[data-theme="light"] .mv-big3 span, :root[data-theme="light"] .mv-tl-ticks span, :root[data-theme="light"] .mv-rep small,
:root[data-theme="light"] .mv-row small, :root[data-theme="light"] .mv-row span, :root[data-theme="light"] .mv-sub,
:root[data-theme="light"] .mv-note, :root[data-theme="light"] .mv-tile-pct, :root[data-theme="light"] .mv-tile-top,
:root[data-theme="light"] .mv-legend, :root[data-theme="light"] .mv-range-note, :root[data-theme="light"] .mv-tabs button,
:root[data-theme="light"] .mv-ranges button { color: #3b4a5e; }
:root[data-theme="light"] .mv-empty { border-color: rgba(15,30,60,.18); }
:root[data-theme="light"] .mv-tabs button.on, :root[data-theme="light"] .mv-row b, :root[data-theme="light"] .mv-card h3,
:root[data-theme="light"] .mv-h, :root[data-theme="light"] .mv-story { color: #0d1726; }
:root[data-theme="light"] .mv-ranges { background: rgba(15,30,60,.06); }
:root[data-theme="light"] .mv-ranges button.on { background: rgba(8,145,178,.14); color: #0e7490; }
:root[data-theme="light"] .mv-alarm { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
:root[data-theme="light"] .mv-alarm-txt { color: #b91c1c; }
:root[data-theme="light"] .mv-ok { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
:root[data-theme="light"] .mv-op-seg { color: #1e3a8a; background: rgba(59,130,246,.12); }
:root[data-theme="light"] .mv-close { background: rgba(255,255,255,.9); color: #0d1726; border-color: rgba(15,30,60,.15); }
:root[data-theme="light"] .mv-fact, :root[data-theme="light"] .mv-tile, :root[data-theme="light"] .mv-card { box-shadow: 0 1px 2px rgba(15,30,60,.06); }
:root[data-theme="light"] .mv-tile-bar, :root[data-theme="light"] .mv-ring-bg { background: rgba(15,30,60,.08); stroke: rgba(15,30,60,.1); }
:root[data-theme="light"] .mv-3d { background: radial-gradient(closest-side at 50% 65%, rgba(16,185,129,.14), transparent 70%), linear-gradient(180deg, #e9eff7, #f6f9fc); }
:root[data-theme="light"] .mv-3d.still::after { color: rgba(15,30,60,.16); }
.mv-reason { max-width: 210px; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: 12px; }
.mv-reason option { color: #111; }
.mv-band { opacity: .14; }
.mv-loss { margin-top: 8px; font-size: 12px; line-height: 1.45; color: #fbbf24; }
.mv-loss b { color: #fcd34d; }
.mv-cmp { display: inline-block; margin-left: 8px; font-weight: 800; }
.mv-cmp.up { color: #10b981; } .mv-cmp.down { color: #ef4444; }
:root[data-theme="light"] .mv-reason { border-color: rgba(15,30,60,.2); background: #fff; }
:root[data-theme="light"] .mv-loss { color: #92400e; } :root[data-theme="light"] .mv-loss b { color: #78350f; }
:root[data-theme="light"] .mv-cmp.up { color: #047857; } :root[data-theme="light"] .mv-cmp.down { color: #b91c1c; }
.mv-story-row { display: flex; gap: 14px; align-items: stretch; }
.mv-cmpline { margin-top: 8px; font-size: 14px; color: inherit; opacity: .9; }
.mv-loss.ok { color: #34d399; }
:root[data-theme="light"] .mv-loss.ok { color: #047857; }
.mv-loss small { opacity: .8; }
/* round 3 */
.mv-tiles > .mv-empty, .mv-tiles > .mv-ok { grid-column: 1 / -1; }
.mv-shiftnums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mv-shiftnums > div { position: relative; padding: 9px 10px 8px; border-radius: 12px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); min-width: 0; }
.mv-shiftnums > div::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--c); }
.mv-shiftnums span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: rgba(231,238,248,.6); }
.mv-shiftnums b { display: block; font-size: 18px; font-family: var(--mono, ui-monospace, monospace); color: #fff; }
.mv-shiftnums small { font-size: 11px; color: rgba(231,238,248,.55); }
.mv-spark-wrap { position: relative; cursor: crosshair; }
.mv-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.55); display: none; pointer-events: none; }
.mv-sparktip { position: absolute; top: -26px; width: 150px; text-align: center; font-size: 11.5px; padding: 3px 6px; border-radius: 8px; background: #0b1426; color: #e7eef8; border: 1px solid rgba(255,255,255,.15); display: none; pointer-events: none; white-space: nowrap; }
.mv-spark-wrap.hov .mv-cross, .mv-spark-wrap.hov .mv-sparktip { display: block; }
.mv-obar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mv-date { padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: inherit; font: inherit; }
.mv-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-left: auto; }
.mv-wot { border-collapse: collapse; width: 100%; font-family: var(--mono, ui-monospace, monospace); font-size: 13px; }
.mv-wot th, .mv-wot td { padding: 7px 10px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.07); }
.mv-wot th:first-child { text-align: left; }
.mv-wo { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.mv-wo.on { background: rgba(139,92,246,.18); outline: 1px solid rgba(139,92,246,.5); }
:root[data-theme="light"] .mv-shiftnums > div { background: rgba(255,255,255,.8); border-color: rgba(15,30,60,.1); }
:root[data-theme="light"] .mv-shiftnums span, :root[data-theme="light"] .mv-shiftnums small { color: #3b4a5e; }
:root[data-theme="light"] .mv-shiftnums b { color: #0d1726; }
:root[data-theme="light"] .mv-cross { background: rgba(15,30,60,.45); }
:root[data-theme="light"] .mv-sparktip { background: #fff; color: #13202f; border-color: rgba(15,30,60,.15); }
:root[data-theme="light"] .mv-date { background: #fff; border-color: rgba(15,30,60,.2); }
:root[data-theme="light"] .mv-wot th, :root[data-theme="light"] .mv-wot td { border-color: rgba(15,30,60,.08); }
@media (max-width: 860px) { .mv-shiftnums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* round 4 */
.mv-unit { font-size: 13px; font-weight: 600; opacity: .7; font-family: inherit; }
.mv-why { margin-top: 4px; font-size: 11.5px; opacity: .85; }
.mv-help { padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.28); }
.mv-wo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 8px; border: 1px solid transparent; background: none; color: inherit; font: inherit; cursor: pointer; }
.mv-wo:disabled { cursor: default; }
.mv-wo .mv-star { opacity: .25; font-size: 13px; }
.mv-wo.on { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.5); }
.mv-wo.on .mv-star { opacity: 1; color: #f59e0b; }
.mv-wot-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 10px; }
:root[data-theme="light"] .mv-help { background: #ecfeff; border-color: #a5f3fc; color: #164e63; }

/* 6 Oct 2026: real standalone pages embedded in the tabs */
.mv-ranges[hidden] { display: none; }
.mv-page { min-width: 0; color: var(--text); }
.mv-page > .view { padding: 0; margin: 0; max-width: none; width: 100%; animation: none; }
.mv-page .card { color: var(--text); }
.mv-page-h { margin-top: 8px; }

/* edge 2.8 health tab */
.mv-hpill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; margin-left: 8px; vertical-align: 2px; }
.mv-hpill.ok { background: rgba(16,185,129,.15); color: #10b981; }
.mv-hpill.bad { background: rgba(239,68,68,.15); color: #ef4444; }

.mv-fact.mv-energy b { color: #10b981; } .mv-fact.mv-energy small { display:block; font-size: 11px; color: var(--mv-sub, #94a3b8); }

/* ── Machine screen (13 Oct 2026): one machine, one screen, no scrolling ── */
#mv.ms-kiosk .mv-scrim { display: none; }
#mv.ms-kiosk .mv-sheet { inset: 0; border-radius: 0; animation: none !important; transform: none !important; opacity: 1 !important; filter: none !important; }
#mv.ms-kiosk .mv-scroll { overflow: hidden; display: flex; flex-direction: column; }
#mv.ms-kiosk .mv-mini, #mv.ms-kiosk .mv-3d-hint, #mv.ms-kiosk .mv-hist-btn { display: none !important; }
#mv.ms-kiosk .mv-close { opacity: 0; transition: opacity .2s; }
#mv.ms-kiosk .mv-close:hover { opacity: 1; }
#mv.ms-kiosk .mv-hero { flex: 0 0 auto; padding: 10px 18px 4px; gap: 14px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
#mv.ms-kiosk .mv-3d { height: 30vh; min-height: 0; }
#mv.ms-kiosk .mv-id { gap: 8px; padding-right: 30px; }
#mv.ms-kiosk .mv-id h1 { font-size: clamp(22px, 3.2vh, 40px); }
#mv.ms-kiosk .mv-bar { position: static !important; flex: 0 0 auto; padding: 0 18px; background: transparent; border: 0; box-shadow: none; }
#mv.ms-kiosk .mv-body { flex: 1 1 auto; min-height: 0; padding: 8px 18px 14px; max-width: none; }
.ms-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ms-sh { text-align: left; border: 1px solid color-mix(in srgb, currentColor 12%, transparent); background: color-mix(in srgb, currentColor 4%, transparent); color: inherit; border-radius: 12px;
  padding: 6px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; cursor: pointer; font: inherit; }
.ms-sh span { grid-column: 1 / 3; font-size: clamp(11px, 1.4vh, 15px); color: color-mix(in srgb, currentColor 70%, transparent); font-weight: 600; }
.ms-sh b { font-size: clamp(20px, 3.4vh, 38px); line-height: 1.1; }
.ms-sh small { font-size: clamp(10px, 1.3vh, 14px); color: color-mix(in srgb, currentColor 65%, transparent); }
.ms-sh em { grid-column: 1 / 3; font-style: normal; font-size: clamp(11px, 1.4vh, 15px); color: #10b981; }
.ms-sh.now { border-color: #10b981; }
.ms-sh.on { background: rgba(16,185,129,.16); border-color: #10b981; box-shadow: 0 0 0 1px #10b981 inset; }
.ms-dim { color: color-mix(in srgb, currentColor 50%, transparent); }
.ms-grid { height: 100%; display: grid; grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.ms-p { min-height: 0; display: flex; flex-direction: column; border: 1px solid color-mix(in srgb, currentColor 10%, transparent); border-radius: 14px; background: color-mix(in srgb, currentColor 4%, transparent); padding: 8px 12px; overflow: hidden; }
.ms-p h4 { margin: 0 0 6px; font-size: clamp(12px, 1.6vh, 17px); letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, currentColor 75%, transparent); display: flex; justify-content: space-between; gap: 8px; }
.ms-p h4::after { content: attr(data-r); font-weight: 400; text-transform: none; letter-spacing: 0; color: color-mix(in srgb, currentColor 45%, transparent); font-size: .85em; }
.ms-c { flex: 1 1 auto; min-height: 0; overflow: hidden; font-size: clamp(12px, 1.6vh, 18px); line-height: 1.35; }
.ms-ribbon { position: relative; height: 34%; min-height: 26px; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, currentColor 6%, transparent); }
.ms-ribbon i { position: absolute; top: 0; bottom: 0; }
.ms-ticks { display: flex; justify-content: space-between; font-size: .8em; color: color-mix(in srgb, currentColor 50%, transparent); margin: 2px 0 6px; }
.ms-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ms-leg span { display: inline-flex; align-items: center; gap: 5px; }
.ms-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ms-stops { margin-top: 6px; color: color-mix(in srgb, currentColor 80%, transparent); }
.ms-stop { margin-right: 12px; white-space: nowrap; }
.ms-t { width: 100%; border-collapse: collapse; }
.ms-t th { text-align: left; font-weight: 500; color: color-mix(in srgb, currentColor 55%, transparent); font-size: .85em; padding: 2px 4px; }
.ms-t td { padding: 3px 4px; border-top: 1px solid color-mix(in srgb, currentColor 6%, transparent); }
.ms-row { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; border-top: 1px solid color-mix(in srgb, currentColor 6%, transparent); white-space: nowrap; }
.ms-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ms-red { color: #ef4444; } .ms-amb { color: #d97706; } .ms-ok { color: #10b981; padding: 3px 0; }
.ms-big { font-size: 1.6em; font-weight: 700; } .ms-big small { font-size: .5em; font-weight: 400; color: color-mix(in srgb, currentColor 60%, transparent); }
.ms-tool { display: grid; grid-template-columns: minmax(0, 1fr) 40% auto; gap: 8px; align-items: center; padding: 3px 0; }
.ms-tool span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-bar { height: 10px; border-radius: 5px; background: color-mix(in srgb, currentColor 8%, transparent); overflow: hidden; } .ms-bar i { display: block; height: 100%; }
.ms-eng { font-size: 1.15em; margin-bottom: 6px; }
.ms-list { display: grid; gap: 10px; }
.ms-li { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 12px; align-items: center; }
.ms-url { font-size: 12px; word-break: break-all; color: var(--text-2); }
.ms-btns { display: flex; gap: 6px; }
@media (max-width: 900px) { .ms-grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); } .ms-li { grid-template-columns: 1fr; } }
/* machine screen on any size (13 Oct 2026) */
#mv.ms-kiosk .mv-id h1 { font-size: clamp(20px, 3.4vh, 64px); }
#mv.ms-kiosk .ms-c { font-size: clamp(11px, 1.7vh, 30px); }
#mv.ms-kiosk .ms-sh b { font-size: clamp(18px, 3.6vh, 64px); }
@media (max-height: 760px) { #mv.ms-kiosk .mv-3d { height: 24vh; } #mv.ms-kiosk .mv-hero { padding-top: 6px; } }
@media (max-width: 1100px) { #mv.ms-kiosk .mv-hero { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); } .ms-grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); } }
@media (max-width: 700px) {
  #mv.ms-kiosk .mv-scroll { overflow-y: auto; display: block; }
  #mv.ms-kiosk .mv-hero { grid-template-columns: 1fr; }
  #mv.ms-kiosk .mv-3d { height: 28vh; }
  .ms-strip { grid-template-columns: 1fr 1fr; }
  .ms-grid { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
  .ms-p { min-height: 180px; }
  .ms-c { overflow: visible; }
}
.ms-pair { display: grid; gap: 8px; margin-bottom: 12px; }
.ms-pair-f { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ms-pair-f .sfield { width: 160px; font-size: 18px; letter-spacing: .1em; }
.ms-prow { display: flex; gap: 10px; align-items: center; padding: 4px 0; border-top: 1px solid var(--border); font-size: 13px; }
.ms-prow small { color: var(--text-3); flex: 1; }

/* 15 Nov 2026: header boxes - the operator name ran out of its box and the
   parts text was squeezed into one narrow column. Parts and Operator take two
   columns; long names end with "…" instead of leaving the box. */
.mv-facts { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.mv-facts .mv-parts { grid-column: span 2; min-width: 0; }
.mv-facts .mv-op { grid-column: span 2; min-width: 0; overflow: hidden; }
.mv-facts .mv-op > div { min-width: 0; flex: 1 1 auto; }
.mv-facts .mv-op b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-parts > div { min-width: 0; }
@media (max-width: 720px) { .mv-facts .mv-parts, .mv-facts .mv-op { grid-column: 1 / -1; } }

/* 15 Nov 2026: machine data folders on the Programs tab */
.pg-folder { border: 1px solid var(--border, rgba(127,127,127,.25)); border-radius: 12px; margin: 8px 0; overflow: hidden; }
.pg-folder > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; user-select: none; }
.pg-folder > summary::-webkit-details-marker { display: none; }
.pg-folder > summary small { color: var(--text-3, #7b8798); font-size: 12px; }
.pg-folder > summary:hover { background: rgba(59,130,246,.07); }
.pg-fico { width: 22px; height: 16px; border-radius: 3px; background: #f5b942; position: relative; flex: none; }
.pg-fico::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 5px; border-radius: 3px 3px 0 0; background: #f5b942; }
.pg-folder[open] > summary .pg-fico { background: #e0a020; transform: skewX(-8deg); }
.pg-folder > .pg-list { padding: 0 10px 10px; }

/* 16 Nov 2026: folders on the Programs tab */
.pg-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 10px 0 6px; font-size: 13px; }
.pg-crumb-b { background: transparent; border: 0; padding: 3px 6px; border-radius: 6px; cursor: pointer; color: var(--accent, #2563eb); font: inherit; font-weight: 600; }
.pg-crumb-b:hover { background: rgba(59,130,246,.1); }
.pg-row.pg-fold { cursor: pointer; background: rgba(245,185,66,.08); }
.pg-row.pg-fold:hover { background: rgba(245,185,66,.18); }
.pg-row.pg-fold .pg-fico { display: inline-block; vertical-align: -2px; margin-right: 4px; }

/* 18 Nov 2026: cycle -> stops table */
.mv-cyc{cursor:pointer}
.mv-cyc-d{padding:8px 10px 12px;border-left:3px solid var(--amber,#f59e0b);margin:0 0 6px 6px;overflow-x:auto}
.mv-stops{width:100%;border-collapse:collapse;font-size:12.5px}
.mv-stops th,.mv-stops td{padding:5px 8px;border-bottom:1px solid var(--border,#e2e8f0);text-align:left;white-space:nowrap;vertical-align:top}
.mv-stops th{font-weight:600;color:var(--text-2,#475569)}

/* 21 Nov 2026: program on the machine now + copies grouped by day */
.pg-now { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; background: var(--surface-2); }
.pg-now-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; }
.pg-now-n { font-size: 22px; margin: 2px 0 8px; } .pg-now-n small { font-size: 13px; margin-left: 6px; }
.pg-now-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.pg-now-g > div { display: flex; flex-direction: column; gap: 2px; } .pg-now-g span { font-size: 11px; color: var(--text-3); } .pg-now-g small { font-size: 11.5px; color: var(--text-3); }
.pg-now-c { margin-top: 8px; } .pg-now-c > small { color: var(--text-3); }
.pg-now-b { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pg-day { margin: 12px 0 4px; padding-bottom: 3px; border-bottom: 1px solid var(--border); font-size: 13px; }
