/* Module 17 Mission Control — white theme, course gradient, Infosys Wingspan */
:root {
  --ink: #0A0E27; --ink2: #1E2340; --muted: #5A6180; --faint: #8A90AA; --rule: #E6E8F0; --mist: #F5F6FA;
  --paper: #FFFFFF; --coral: #FF6A3D; --pink: #FF5C8A; --lav: #9B8CFF; --amber: #F7B731; --cyan: #2BD4F0;
  --coral-d: #C2410C; --pink-d: #C0174D; --lav-d: #5B45D9; --cyan-d: #0A7489; --amber-d: #8A5A00;
  --ok: #22A06B; --ok-d: #12704A; --ok-s: #E3F5EC; --bad: #E5484D; --bad-d: #B42318; --bad-s: #FDE8E8;
  --brand: linear-gradient(90deg, #FF6A3D, #FF5C8A 55%, #9B8CFF);
  --shadow: 0 1px 2px rgba(11,15,42,.06), 0 8px 24px rgba(11,15,42,.06);
  --shadow-lg: 0 2px 6px rgba(11,15,42,.08), 0 24px 60px rgba(11,15,42,.10);
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink2); font: 15px/1.5 var(--sans); }
body { background-image: radial-gradient(#E9E7F3 1.1px, transparent 1.2px); background-size: 28px 28px; min-height: 100vh; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
code, pre, .mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 10px 28px;
  background: rgba(255,255,255,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.top img.ws { height: 34px; }
.top .t1 { font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.top .t2 { font: 600 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.top .grow { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--mist); color: var(--muted); font-size: 13px; border: 1px solid var(--rule); white-space: nowrap; }
.pill b { color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #C9CEDC; flex: none; }
.dot.up { background: var(--ok); box-shadow: 0 0 0 0 rgba(34,160,107,.5); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,160,107,.45); } 70% { box-shadow: 0 0 0 8px rgba(34,160,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,160,107,0); } }
.kicker { display: flex; align-items: center; gap: 10px; font: 700 11px/1 var(--mono); letter-spacing: .2em;
  text-transform: uppercase; color: var(--coral-d); }
.kicker::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--brand); }
.accent { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400;
  background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* home */
.wrap { max-width: 1480px; margin: 0 auto; padding: 26px 28px 60px; }
.hero { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.05fr); gap: 28px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 1.04; letter-spacing: -.025em; color: var(--ink); margin: 14px 0 10px; font-weight: 800; }
.hero p.lede { font-size: 17px; color: var(--muted); max-width: 560px; margin: 0 0 22px; }
.cta { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; padding: 13px 22px;
  color: #fff; background: var(--brand); font-weight: 700; box-shadow: 0 10px 30px rgba(255,92,138,.35);
  text-decoration: none; transition: transform .2s; }
.cta:hover { transform: translateY(-2px); }
.ghost { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); border-radius: 999px;
  padding: 12px 18px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; }
.hero .stats { display: flex; gap: 26px; margin-top: 26px; flex-wrap: wrap; }
.stat b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; background: var(--brand);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font: 600 10.5px/1.2 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.loopcard { position: relative; aspect-ratio: 1.12; border-radius: 26px; background: #fff; box-shadow: var(--shadow-lg);
  border: 1px solid var(--rule); overflow: hidden; }
.loopcard::before { content: ""; position: absolute; inset: -40%; background:
  radial-gradient(closest-side, rgba(255,106,61,.10), transparent 70%) 70% 20%/60% 60% no-repeat,
  radial-gradient(closest-side, rgba(155,140,255,.14), transparent 70%) 20% 80%/60% 60% no-repeat; }
.loopcard svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.section-h { display: flex; align-items: baseline; gap: 14px; margin: 44px 0 16px; }
.section-h h2 { margin: 0; font-size: 24px; color: var(--ink); letter-spacing: -.01em; }
.section-h span { color: var(--muted); }

.dock { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.tool { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--r); background: #fff;
  border: 1px solid var(--rule); box-shadow: var(--shadow); text-decoration: none; transition: transform .18s, box-shadow .18s; }
.tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tool .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800;
  font-size: 14px; flex: none; }
.tool .nm { font-weight: 650; color: var(--ink); line-height: 1.2; }
.tool .st { font-size: 12px; color: var(--muted); }
.tool.off { opacity: .62; }
.tool.off:hover { transform: none; box-shadow: var(--shadow); }

.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.daycol h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 800 13px/1 var(--mono);
  letter-spacing: .14em; }
.daycol h3 i { font-style: normal; font-family: "Yu Gothic UI", var(--sans); font-weight: 600; color: var(--muted);
  letter-spacing: 0; }
.labcard { position: relative; display: flex; gap: 14px; align-items: center; padding: 14px; margin-bottom: 10px;
  border-radius: var(--r); background: #fff; border: 1px solid var(--rule); box-shadow: var(--shadow); cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s; text-decoration: none; }
.labcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #D8D2FF; }
.labcard .id { font: 800 12px/1 var(--mono); }
.labcard .tt { font-weight: 650; color: var(--ink); line-height: 1.25; margin-top: 4px; }
.labcard .mm { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ring { flex: none; }
.ring .bg { stroke: #ECEEF5; }
.ring .fg { transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.ring text { font: 800 11px var(--mono); fill: var(--ink); }

/* mission */
.mission { display: grid; grid-template-columns: minmax(420px, 0.92fr) minmax(520px, 1.08fr); gap: 22px; align-items: start; }
.mhead { display: flex; align-items: center; gap: 18px; margin: 4px 0 18px; }
.mhead .back { border: 1px solid var(--rule); background: #fff; border-radius: 999px; padding: 8px 14px; color: var(--ink); }
.mhead h1 { margin: 6px 0 2px; font-size: 30px; letter-spacing: -.02em; color: var(--ink); line-height: 1.1; }
.mhead .goal { color: var(--muted); }
.mhead .grow { flex: 1; }
.intro { padding: 12px 16px; border-radius: 12px; background: #F2F0FF; color: var(--ink2); margin-bottom: 12px; font-size: 14px; }
.step { position: relative; padding: 14px 16px 14px 60px; margin-bottom: 10px; border-radius: var(--r); background: #fff;
  border: 1px solid var(--rule); box-shadow: var(--shadow); transition: border-color .3s, background .3s; }
.step .n { position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid;
  place-items: center; font: 800 13px var(--mono); color: #fff; background: var(--ink2); transition: background .3s, transform .3s; }
.step h4 { margin: 4px 0 8px; font-size: 15.5px; color: var(--ink); }
.step.done { border-color: #B8E6CF; background: linear-gradient(90deg, #F2FBF6, #fff 60%); }
.step.done .n { background: var(--ok); }
.step.done .n::after { content: "✓"; position: absolute; font-size: 15px; }
.step.done .n span { visibility: hidden; }
.step.fail { border-color: #F6C9CA; }
.cmd { position: relative; display: flex; align-items: stretch; border-radius: 10px; background: var(--ink); color: #E8EAF6;
  overflow: hidden; margin: 6px 0; }
.cmd code { flex: 1; padding: 10px 12px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.cmd code::before { content: "$ "; color: var(--cyan); font-weight: 700; }
.cmd .acts { display: flex; flex-direction: column; border-left: 1px solid #262C52; }
.cmd .acts button { flex: 1; border: 0; background: transparent; color: #B9BFDA; padding: 0 12px; font-size: 12px; }
.cmd .acts button:hover { background: #1C2148; color: #fff; }
.see { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.see b { color: var(--ink2); font-weight: 600; }
details.more { margin: 6px 0; }
details.more summary { cursor: pointer; font-size: 13px; color: var(--lav-d); font-weight: 600; }
details.more pre { margin: 6px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--mist); font-size: 12px;
  border: 1px solid var(--rule); white-space: pre-wrap; }
.verify { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.vbtn { border: 1px solid #D8D2FF; background: #F5F3FF; color: var(--lav-d); border-radius: 999px; padding: 6px 14px;
  font-weight: 650; font-size: 13px; }
.vbtn:hover { background: #ECE8FF; }
.vbtn.busy { opacity: .6; pointer-events: none; }
.vres { font-size: 13px; }
.vres.ok { color: var(--ok-d); }
.vres.bad { color: var(--bad-d); }
.proof { padding: 16px 18px; border-radius: var(--r); background: #FFF8E6; border: 1px solid #F3D88A; margin-top: 14px; }
.proof h5, .stuck h5 { margin: 0 0 8px; font: 800 11px/1 var(--mono); letter-spacing: .18em; color: var(--amber-d); }
.proof li { margin: 4px 0; }
.stuck { padding: 14px 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--rule); margin-top: 10px;
  font-size: 13.5px; color: var(--ink2); }
.stuck h5 { color: var(--muted); }

.work { position: sticky; top: 72px; border-radius: 18px; background: #fff; border: 1px solid var(--rule);
  box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; height: calc(100vh - 96px); min-height: 560px; }
.tabs { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--rule); background: var(--mist); }
.tab { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; }
.tab.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.tab.add { padding: 7px 10px; }
.tabs .grow { flex: 1; }
.pane { flex: 1; position: relative; min-height: 0; }
.pane.scene { display: flex; flex-direction: column; padding: 14px 16px; background:
  radial-gradient(#ECEAF6 1px, transparent 1.2px) 0 0/22px 22px; overflow: auto; }
.scenehead { display: flex; align-items: center; gap: 10px; }
.ghost.small { padding: 6px 12px; font-size: 12.5px; }
.ghost.small:disabled { opacity: .5; }
#scene { flex: 1; min-height: 300px; display: flex; align-items: center; }
#scene svg { width: 100%; height: 100%; max-height: 520px; }
.legend { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.legend li { counter-increment: s; font-size: 12.5px; color: var(--faint); display: flex; gap: 8px; align-items: baseline; }
.legend li::before { content: counter(s); font: 800 11px var(--mono); width: 20px; height: 20px; border-radius: 50%; display: grid;
  place-items: center; background: var(--mist); color: var(--faint); flex: none; }
.legend li.b { color: var(--ok-d); } .legend li.b::before { content: "✓"; background: var(--ok); color: #fff; }
.legend li.nx { color: var(--ink); font-weight: 650; } .legend li.nx::before { background: var(--ink2); color: #fff; }
.pane.term { background: #0A0E27; padding: 8px 4px 4px 10px; }
.pane.term .xterm { height: 100%; }
.termwrap { position: absolute; inset: 8px 4px 4px 10px; }
.toast { position: fixed; right: 26px; bottom: 26px; z-index: 50; padding: 12px 16px; border-radius: 12px; background: var(--ink);
  color: #fff; box-shadow: var(--shadow-lg); transform: translateY(20px); opacity: 0; transition: all .3s; font-size: 14px; }
.toast.on { transform: none; opacity: 1; }
.burst { position: fixed; pointer-events: none; z-index: 60; }

@media (max-width: 1100px) {
  .hero, .mission { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, 1fr); }
  .work { position: relative; top: 0; height: 640px; }
}
@media (max-width: 640px) {
  .board { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .top { padding: 10px 14px; }
  .top .t2 { display: none; }
  .wrap { padding: 18px 14px 40px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* class view — the trainer's live grid of every participant copy */
.classhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin: 10px 0 24px; }
.classhead h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.025em; color: var(--ink); margin: 12px 0 8px; }
.classhead .lede { font-size: 16px; color: var(--muted); max-width: 640px; margin: 0; }
.classhead .stats { display: flex; gap: 26px; }
.cgrid { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); overflow-x: auto; }
.crow { display: grid; grid-template-columns: minmax(250px, 1.6fr) repeat(var(--n, 11), 52px) 96px; align-items: center; gap: 4px;
  padding: 8px 16px; border-bottom: 1px solid var(--rule); border-left: 4px solid transparent; min-width: 1000px; }
.crow:last-child { border-bottom: 0; }
.crow > div { display: flex; justify-content: center; }
.crow > div:first-child { justify-content: flex-start; }
.chead { font: 700 11px/1 var(--mono); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; background: var(--mist);
  border-radius: var(--r) var(--r) 0 0; }
.chead > div { gap: 6px; align-items: center; }
.cday { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cgrid.first .crow:not(.chead) { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cname { gap: 10px; align-items: center; flex-wrap: wrap; }
.cname a { font: 12px var(--mono); color: var(--muted); text-decoration: none; }
.cname a:hover { color: var(--coral-d); }
.clabel { border: 0; background: none; padding: 0; font-weight: 650; color: var(--ink); text-align: left; }
.clabel:hover { color: var(--coral-d); }
.cx { margin-left: auto; border: 0; background: none; color: var(--faint); font-size: 18px; line-height: 1; padding: 0 4px; }
.cx:hover { color: var(--bad); }
.cbadge { font: 700 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px;
  background: var(--mist); color: var(--muted); border: 1px solid var(--rule); }
.cbadge.red { background: var(--bad-s); color: var(--bad-d); border-color: #F7C8C8; }
.crow.stuck { border-left-color: var(--bad); background: linear-gradient(90deg, rgba(229,72,77,.06), transparent 40%); }
.crow.off { opacity: .55; }
.clast { font: 12px var(--mono); color: var(--muted); }
.cnote { color: var(--muted); font-size: 13px; margin-top: 14px; }
.cempty { display: flex; align-items: center; gap: 22px; padding: 34px 28px; color: var(--muted); }
.cempty b { color: var(--ink); }
.radar { position: relative; width: 64px; height: 64px; flex: none; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--lav); opacity: 0; animation: radar 2.7s infinite; }
.radar i:nth-child(2) { animation-delay: .9s; } .radar i:nth-child(3) { animation-delay: 1.8s; }
@keyframes radar { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cgrid.first .crow, .radar i { animation: none; } }
