/* V80: the home hero lab (an Ubuntu desktop picture drawn in HTML/CSS until it starts, then the mission desktop in an iframe)
   and the four level cards (each opens the same desktop with its preset). The picture matches the skinned desktop
   (course/robots-in-motion-v2/missions/ubuntu.css), so the swap is not seen. */
/* align start + width 100%: the desktop keeps 16:9 of its column; a taller mission panel must not widen it over the panel */
.v80-lab { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: stretch; }   /* the panel is as tall as the desktop: its mission row stays put (CLS 0) */
.v80-desk { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 360px; border-radius: 10px; overflow: hidden; background: #2c0b1f; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.v80-desk > iframe, .v80-stage > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #2c0b1f; }
.v80-desk > iframe.v80-wait { visibility: hidden; }
/* the picture */
.ubm { position: absolute; inset: 0; color: #f2f2f2; font: 600 14px "Ubuntu Sans", "Ubuntu", "Inter", system-ui, sans-serif;
  background:
    linear-gradient(155deg, transparent 0 46%, rgba(233, 84, 32, .30) 46.2% 58%, transparent 58.2%),
    linear-gradient(200deg, transparent 0 60%, rgba(119, 33, 111, .55) 60.2% 78%, transparent 78.2%),
    linear-gradient(120deg, #2c0b1f 0%, #4a1238 45%, #7a2a4a 75%, #b4472f 100%); }
.ubm-top { position: absolute; left: 0; right: 0; top: 0; height: 32px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: #131313; }
.ubm-clock { position: absolute; left: 50%; transform: translateX(-50%); }
.ubm-tray { display: inline-flex; gap: 12px; }
.ubm-tray i { width: 13px; height: 13px; border-radius: 3px; background: #dcdcdc; opacity: .85; }
.ubm-dock { position: absolute; left: 0; top: 32px; bottom: 0; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; background: rgba(23, 14, 20, .88); }
.ubm-app { position: relative; display: block; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 12px; background: transparent center / 42px 42px no-repeat; }
.ubm-tmr { cursor: pointer; background-image: linear-gradient(#2A0707, #2A0707), linear-gradient(#2A0707, #2A0707), linear-gradient(#2A0707, #2A0707), linear-gradient(#B1191C, #B1191C);
  background-size: 15px 12px, 15px 12px, 32px 11px, 40px 36px; background-position: 10px 14px, 27px 14px, 10px 28px, 7px 8px; animation: ubm-pulse 1.4s ease-in-out 1; }
.ubm-tmr:hover, .ubm-tmr:focus-visible { background-color: rgba(255, 255, 255, .14); outline: none; }
.ubm-tmr:focus-visible { box-shadow: 0 0 0 2px #fff; }
@keyframes ubm-pulse { 50% { transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) { .ubm-tmr { animation: none; } }
.ubm-code { background-image: linear-gradient(#1F6FB8, #1F6FB8); background-size: 36px 36px; border-radius: 12px; }
.ubm-hint { position: absolute; left: 76px; top: 46px; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; background: #F7F7F7; color: #1f1f1f; font-weight: 400; font-size: 15px; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); }
.ubm-hint b { font-weight: 700; }
.ubm-hint span { color: #3d3d3d; font-size: 13px; }
.ubm-hint::before { content: ""; position: absolute; left: -7px; top: 16px; border: 7px solid transparent; border-left: 0; border-right-color: #F7F7F7; }
.ubm-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 10px 16px; border-radius: 10px; background: rgba(19, 19, 19, .9); font-weight: 400; }
/* the mission panel */
.v80-miss { display: flex; flex-direction: column; gap: 10px; min-height: 0; max-height: calc((100vw - 2 * var(--gutter, 24px) - 354px) * 10 / 16); overflow: auto; padding: 16px; border-radius: 10px; background: #fff; color: #1a1a1a; border: 1px solid #e3e3e3; font-size: 15px; }
.v80-mk { margin: 0; font: 600 12px/1.3 var(--font-mono, monospace); letter-spacing: .04em; color: #4a4a4a; }
.v80-mt { margin: 0; font-size: 22px; line-height: 1.2; }
.v80-steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.v80-steps li[data-ok="1"] { color: #4a4a4a; }
.v80-steps li[data-ok="1"]::marker { content: "✓ "; color: #1a7f37; }
.v80-steps li[aria-current="step"] { font-weight: 600; }
.v80-pane { display: inline-block; margin-right: 4px; padding: 0 6px; border-radius: 4px; background: #C80003; color: #fff; font: 600 12px/1.6 var(--font-mono, monospace); }
.v80-chip { display: block; width: 100%; margin-top: 6px; padding: 7px 10px; border: 1px solid #1f1f1f; border-radius: 6px; background: #000; color: #AAAAAA; font: 13px/1.4 "Ubuntu Sans Mono", "JetBrains Mono", var(--font-mono, monospace); text-align: left; cursor: pointer; white-space: pre-wrap; word-break: break-word; }
.v80-chip:hover, .v80-chip:focus-visible { border-color: #E95420; outline: none; color: #fff; }
.v80-chip::before { content: "$ "; color: #4E9A06; font-weight: 700; }
.v80-show { margin-top: 6px; padding: 4px 10px; border: 1px solid #bbb; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; font-size: 14px; }
.v80-say { display: block; margin-top: 6px; padding: 6px 9px; border-radius: 6px; background: #FFF4E5; color: #5a3200; font-size: 14px; font-weight: 400; }
.v80-say[hidden] { display: none; }
.v80-checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.v80-checks li::before { content: "○ "; color: #777; }
.v80-checks li[data-ok="1"]::before { content: "✓ "; color: #1a7f37; font-weight: 700; }
.v80-pass { padding: 10px; border-radius: 8px; background: #E9F7EE; color: #0f3d1f; font-size: 14px; }
.v80-pass[hidden] { display: none; }
.v80-pass button { margin-top: 8px; }
.v80-quiz { display: flex; flex-wrap: wrap; gap: 6px; }
.v80-quiz button { padding: 4px 12px; border: 1px solid #bbb; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; }
.v80-mlist { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 8px; border-top: 1px solid #eee; min-height: 43px; }   /* one row of buttons, kept before they are drawn (CLS 0) */
.v80-mlist button { min-width: 34px; height: 34px; border: 1px solid #ccc; border-radius: 6px; background: #fff; cursor: pointer; font: 600 14px var(--font-mono, monospace); }
.v80-mlist button[aria-current="true"] { border-color: #C80003; color: #C80003; }
.v80-mlist button[data-ok="1"] { background: #E9F7EE; border-color: #1a7f37; }
.v80-honest { margin: 10px 0 0; font-size: 14px; color: #3d3d3d; }
.v80-band .v80-honest { color: inherit; }
/* level cards */
.v80-card { position: relative; }
.v80-what { margin: 10px 0 0; font-size: 15px; color: #3d3d3d; }
/* V81: the desktop is as wide as the window (not the text column) and nearly as tall, so every window of a level is fully
   visible side by side (layouts.json); "Full screen" gives it the whole screen */
.v80-stage { position: relative; left: 50%; width: min(100vw - 40px, 1760px); margin: 10px 0 0 calc(min(100vw - 40px, 1760px) / -2); height: min(88vh, 940px); border-radius: 10px; overflow: hidden; background: #2c0b1f; }
.v80-stage[hidden] { display: none; }
.v80-stage:fullscreen { left: 0; width: 100vw; height: 100vh; margin: 0; border-radius: 0; }
.v80-bar { display: block; width: min(360px, 100%); height: 8px; margin-top: 8px; accent-color: #E95420; }
.v80-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.v80-how { font-size: 14px; color: #3d3d3d; }
.v80-act { min-height: 36px; padding: 7px 12px; border: 1px solid #1f1f1f; border-radius: 6px; background: #DCD8D4; color: #2e2e2e; font: 600 13px "Ubuntu Sans", system-ui, sans-serif; cursor: pointer; }
.v80-act:hover, .v80-act:focus-visible { border-color: #E95420; outline: none; }
.v80-act:disabled { opacity: .6; cursor: progress; }
.v80-lvnote { margin: 8px 0 0; min-height: 21px; font-size: 14px; color: #3d3d3d; }
/* each command: what it is about, the command, Copy, Run */
.v80-cmds { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.v80-cmds li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v80-tag { flex: none; min-width: 148px; font: 600 12px/1.3 var(--font-mono, monospace); letter-spacing: .03em; text-transform: uppercase; color: #4a4a4a; }
.v80-card .v80-cmds code { flex: 1 1 320px; min-width: 0; padding: 7px 10px; border-radius: 6px; background: #1b1b1b; color: #e6e6e6; font: 13px/1.4 "Ubuntu Sans Mono", "Ubuntu Mono", var(--font-mono, monospace); overflow-wrap: anywhere; user-select: all; }
.v80-card .v80-cmds code::before { content: "$ "; color: #8AE234; font-weight: 700; }
.v80-cmds .v80-run { width: auto; margin: 0; flex: none; }
.v80-cmds .v80-run::before { content: none; }
.v80-copy { flex: none; min-height: 36px; padding: 6px 12px; border: 1px solid #8a8a8a; border-radius: 6px; background: #fff; color: #1f1f1f; font: 600 13px "Ubuntu Sans", system-ui, sans-serif; cursor: pointer; }
.v80-copy:hover, .v80-copy:focus-visible { border-color: #E95420; outline: none; }
/* the hero's mission chips: the chip runs it, Copy beside it */
.v80-cmd { display: flex; gap: 6px; align-items: stretch; margin-top: 6px; }
.v80-cmd .v80-chip { flex: 1 1 auto; min-width: 0; margin: 0; }
@media (max-width: 1023px) {
  .v80-lab { grid-template-columns: 1fr; }
  .v80-desk { aspect-ratio: auto; height: min(72vh, 620px); }
  .v80-miss { max-height: none; }
}
@media (max-width: 700px) {
  .ubm-dock { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 56px; flex-direction: row; justify-content: center; padding: 0 8px; }
  .ubm-app { width: 44px; height: 44px; background-size: 34px 34px; }
  .ubm-hint { left: auto; right: 12px; top: auto; bottom: 70px; }
  .ubm-hint::before { display: none; }
}
