/* STRUCT-WAVE-3: canonical shell for structural queue rows 28 onward. */
html.iot-struct-wave-3 :is(.quarto-title-block,#title-block-header,h1.title,.quarto-title-meta,.quarto-categories),
html.iot-struct-wave-3 #interactive-game > :is(h1,h2) { display:none !important; }
html.iot-struct-wave-3 :is(.page-columns,main.content,#quarto-content,#quarto-document-content) {
  display:block !important; width:100% !important; max-width:none !important;
  margin-right:auto !important; margin-left:auto !important;
}

:is(#miraiLab,#mitmLab,#modelQuantizationLab,#mhSim,#nsSim,#ndgGame,#pbgGame,#pfbGame,#pwSim,#ptSim,#rcfdGame,#rmqGame,#raSim,#sdnSim,#scqGame).sw3-shell {
  --sw3-teal:#197F8D; --sw3-blue:#3E68A6; --sw3-green:#2F8D57;
  --sw3-amber:#B96824; --sw3-red:#B9484D; --sw3-ink:#20343D;
  --sw3-muted:#526A73; --sw3-line:#D8E3E8;
  --sw3-tint:color-mix(in srgb,var(--pc-main) 7%,white);
  --sw3-tint-strong:color-mix(in srgb,var(--pc-main) 13%,white);
  --sw3-border:color-mix(in srgb,var(--pc-main) 42%,white);
  --sw3-module-ink:color-mix(in srgb,var(--pc-main) 72%,#20343D);
  width:min(1180px,calc(100vw - 32px)) !important; max-width:none !important;
  margin:0 0 32px 50% !important; padding:16px !important;
  transform:translateX(-50%) !important; color:var(--sw3-ink) !important;
  background:var(--sw3-tint) !important; border:1px solid var(--sw3-border) !important;
  border-radius:8px !important; box-shadow:none !important;
  font:16px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
}
:is(#miraiLab,#mitmLab,#modelQuantizationLab,#mhSim,#nsSim,#ndgGame,#pbgGame,#pfbGame,#pwSim,#ptSim,#rcfdGame,#rmqGame,#raSim,#sdnSim,#scqGame).sw3-shell,
:is(#miraiLab,#mitmLab,#modelQuantizationLab,#mhSim,#nsSim,#ndgGame,#pbgGame,#pfbGame,#pwSim,#ptSim,#rcfdGame,#rmqGame,#raSim,#sdnSim,#scqGame).sw3-shell * { box-sizing:border-box; }

.sw3-hero { padding:24px !important; margin:0 0 14px !important; color:var(--sw3-ink) !important;
  text-align:left !important; background:var(--sw3-tint-strong) !important;
  border:1px solid var(--sw3-border) !important; border-radius:8px !important;
  box-shadow:0 14px 34px rgba(32,52,61,.10) !important; }
.sw3-kicker { display:flex !important; flex-wrap:wrap; gap:8px; margin:0 0 14px !important; }
.sw3-pill { display:inline-flex; align-items:center; min-height:26px; padding:4px 10px;
  color:var(--sw3-module-ink) !important; background:#fff !important;
  border:1px solid var(--sw3-border) !important; border-radius:999px;
  font-size:12px !important; font-weight:850; letter-spacing:.05em; text-transform:uppercase; }
.sw3-hero :is(h1,h2) { margin:0 0 10px !important; color:var(--sw3-ink) !important;
  font-size:clamp(32px,4vw,40px) !important; line-height:1.08 !important; letter-spacing:-.025em !important; }
.sw3-hero p { max-width:850px; color:#38515B !important; font-size:17px !important; line-height:1.5 !important; }
.sw3-metrics { display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important; max-width:850px; margin-top:18px !important; }
.sw3-metric { min-width:0; padding:10px 12px !important; text-align:left !important;
  background:#fff !important; border:1px solid var(--sw3-border) !important; border-radius:8px !important; }
.sw3-metric strong,.sw3-metric span { display:block; }
.sw3-metric strong { color:var(--sw3-ink) !important; font-size:16px !important; }
.sw3-metric span { margin-top:2px; color:var(--sw3-muted) !important; font-size:12px !important; }

.sw3-ramp { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:12px 0; }
.sw3-ramp-card,.sw3-boundaries,.sw3-legend { padding:12px 14px; background:#fff;
  border:1px solid var(--sw3-line); border-radius:8px; }
.sw3-ramp-card strong,.sw3-ramp-card span { display:block; }
.sw3-ramp-card strong { color:var(--sw3-teal); font-size:12px; font-weight:850; letter-spacing:.05em; text-transform:uppercase; }
.sw3-ramp-card span { margin-top:4px; color:#38515B; font-size:14px; line-height:1.45; }
.sw3-legend { display:flex; flex-wrap:wrap; gap:8px 14px; margin:12px 0; color:var(--sw3-muted); font-size:12px; font-weight:750; }
.sw3-legend i { display:inline-block; width:10px; height:10px; margin-right:5px; border-radius:50%; vertical-align:-1px; }
.sw3-legend .identity { background:var(--sw3-tint-strong); border:2px solid var(--pc-main); }
.sw3-legend .current { background:var(--sw3-teal); } .sw3-legend .reference { background:var(--sw3-blue); }
.sw3-legend .success { background:var(--sw3-green); } .sw3-legend .caution { background:var(--sw3-amber); }
.sw3-legend .error { background:var(--sw3-red); }
.sw3-boundaries { margin-top:14px; color:#38515B; font-size:14px; line-height:1.5; }
.sw3-boundaries strong { color:var(--sw3-ink); }
.sw3-shell :is(button,[role="button"],select,input) { border-radius:8px !important; }
.sw3-shell button { min-height:40px; font-weight:800 !important; }
.sw3-shell input[type="range"] { accent-color:var(--sw3-teal); }
.sw3-shell :is(.active,.is-selected,[aria-pressed="true"]) { box-shadow:0 0 0 2px color-mix(in srgb,var(--sw3-teal) 18%,transparent); }
.sw3-shell .mq-hero-inner { grid-template-columns:1fr !important; }
.sw3-shell .mq-hero-metrics { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
.sw3-shell .mq-hero-card :is(span,strong),.sw3-shell .scq-option dd { min-width:0; overflow-wrap:anywhere; }
.sw3-shell .mh-controls { min-width:0; overflow-x:auto; }

@media (max-width:700px) {
  :is(#miraiLab,#mitmLab,#modelQuantizationLab,#mhSim,#nsSim,#ndgGame,#pbgGame,#pfbGame,#pwSim,#ptSim,#rcfdGame,#rmqGame,#raSim,#sdnSim,#scqGame).sw3-shell { width:calc(100vw - 32px) !important; padding:10px !important; }
  #scqGame.sw3-shell { position:relative !important; left:calc(50vw - 16px) !important; min-width:calc(100vw - 32px) !important; margin-left:0 !important; }
  .sw3-hero { padding:18px !important; } .sw3-metrics,.sw3-ramp { grid-template-columns:1fr !important; }
  .sw3-legend { align-items:flex-start; flex-direction:column; }
}
@media (prefers-reduced-motion:reduce) { .sw3-shell *,.sw3-shell *::before,.sw3-shell *::after {
  animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; } }
