/* RoutingLab | Unified CLI Lab styles; original cascade preserved. */

/* Former cli-lab.css */
:root {
  font-family: Inter, system-ui, Arial, sans-serif;
  color: #0e243d;
  background: #f3f7fc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: #0b2039;
  color: white;
  padding: 18px 28px;
}
.back {
  color: #93def7;
  text-decoration: none;
}
.tag {
  background: #1f425f;
  border-radius: 25px;
  padding: 6px 12px;
  font-size: 12px;
}
main {
  max-width: 1600px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(420px, 1fr);
  gap: 18px;
  padding: 20px;
}
.left,
.right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.panel {
  background: white;
  padding: 23px;
  border: 1px solid #d8e4f1;
  border-radius: 16px;
  box-shadow: 0 4px 15px #16335c0b;
}
h1 {
  font-size: 23px;
  margin: 6px 0 10px;
}
h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
p {
  color: #526781;
  line-height: 1.55;
}
.eyebrow {
  color: #1660a6;
  font-size: 12px;
  font-weight: 800;
}
.steps {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}
.steps > div {
  padding: 10px 12px;
  border-radius: 9px;
  background: #f0f6fc;
  font-size: 14px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.heading small {
  color: #647b94;
}
svg {
  width: 100%;
  max-width: 100%;
  height: auto;
}
.node rect {
  fill: #264563;
  stroke: #9bc2df;
  stroke-width: 2;
}
.node text {
  fill: #fff;
  text-anchor: middle;
  font-size: 20px;
  font-weight: 700;
}
.node.router {
  cursor: pointer;
}
.node.router rect {
  fill: #165c89;
}
.node.selected rect,
.node.router:hover rect {
  fill: #078f85;
  stroke: #2ed6c0;
  stroke-width: 4;
}
.sub text {
  fill: #526b85;
  font-size: 15px;
}
.network {
  background: #eef4fb;
  color: #446785;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
}
.network.success,
.success {
  color: #11734d;
}
.network.error,
.error {
  color: #a13436;
}
.network.success {
  background: #e6f7ed;
}
.network.error {
  background: #fff0f0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 14px 0;
}
th,
td {
  border-bottom: 1px solid #e4edf7;
  padding: 9px 6px;
  text-align: left;
}
button {
  cursor: pointer;
  background: #1765ab;
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
}
button:hover {
  filter: brightness(1.12);
}
button.secondary {
  background: #dcebf8;
  color: #144774;
  margin-left: 8px;
}
.terminal {
  display: flex;
  flex-direction: column;
  background: #071322;
  border-radius: 16px;
  color: #cae2ee;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #22405e;
}
.termhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 17px;
  background: #14283e;
}
.dot {
  display: inline-block;
  background: #3ad3a7;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 10px;
}
.switch {
  display: flex;
  gap: 6px;
}
.switch button {
  font-size: 12px;
  padding: 7px 14px;
  background: #2c425b;
}
.switch button.active {
  background: #0d9b8b;
}
.output {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  overflow: auto;
  overflow-wrap: anywhere;
  min-height: 380px;
  flex: 1;
  padding: 18px;
  line-height: 1.6;
}
.output .system {
  color: #6de1ad;
}
.output .entered {
  color: #fff;
}
.output .error {
  color: #ff9797;
}
.output .result {
  color: #d6e9f4;
}
.promptline {
  display: flex;
  gap: 7px;
  align-items: center;
  border-top: 1px solid #2c4760;
  padding: 14px;
}
.promptline label {
  font:
    14px Consolas,
    monospace;
  color: #61e0ad;
  white-space: nowrap;
}
.promptline input {
  min-width: 0;
  flex: 1;
  background: transparent;
  color: white;
  border: 0;
  outline: 0;
  font:
    14px Consolas,
    monospace;
}
.promptline button {
  font-size: 12px;
}
.hint {
  background: #eaf2fb;
  border: 1px solid #d8e4f1;
  padding: 19px;
  border-radius: 14px;
}
.hint pre {
  background: #11273d;
  color: #c9f4e2;
  padding: 13px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 12px;
  border-radius: 10px;
}
.hint p {
  font-size: 13px;
}
footer {
  text-align: center;
  padding: 15px;
  color: #60758d;
  font-size: 12px;
}
@media (max-width: 950px) {
  main {
    grid-template-columns: 1fr;
  }
  .terminal {
    min-height: 490px;
  }
}
@media (max-width: 560px) {
  .top {
    padding: 13px;
    align-items: flex-start;
    flex-direction: column;
  }
  main {
    padding: 10px;
  }
  .panel {
    padding: 15px;
  }
  .heading {
    display: block;
  }
  .output {
    min-height: 310px;
  }
  .promptline {
    flex-wrap: wrap;
  }
  .promptline input {
    width: 60%;
  }
}

/* Sprint 3: fluid desktop + tablet + mobile tab layout */
html {
  min-width: 0;
}
body {
  min-width: 0;
}
main {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.mobile-tabs {
  display: none;
}
.terminal {
  min-height: min(75vh, 760px);
}
.output {
  min-height: 300px;
  max-height: 64vh;
}
.panel,
.terminal,
.hint {
  min-width: 0;
}
.panel {
  overflow-wrap: anywhere;
}
.statusgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.statusgrid > div {
  font-size: 12px;
  border: 1px solid #d7e4f1;
  background: #f8fbff;
  border-radius: 9px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.statusdot {
  height: 9px;
  width: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #d69b33;
}
.statusgrid .ok .statusdot {
  background: #16855a;
}
.statusgrid .bad .statusdot {
  background: #c04c49;
}
.note {
  font-size: 12px;
}
.promptline input:focus-visible {
  outline: 2px solid #64d5bf;
  outline-offset: 4px;
}
.node.router:focus-visible rect {
  stroke: #edb84f;
  stroke-width: 5;
}
button:focus-visible,
.tab:focus-visible {
  outline: 3px solid #f5bb4e;
  outline-offset: 3px;
}
@media (min-width: 1500px) {
  main {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
  .terminal {
    min-height: 680px;
  }
}
@media (max-width: 1100px) and (min-width: 701px) {
  main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }
  .panel {
    padding: 16px;
  }
  .terminal {
    min-height: 540px;
  }
  .statusgrid {
    grid-template-columns: 1fr;
  }
  .top {
    padding: 13px 16px;
  }
}
@media (max-width: 700px) {
  body {
    background: #eff5fc;
  }
  .top {
    padding: 12px 14px;
  }
  .top strong {
    display: block;
    margin-top: 5px;
    font-size: 14px;
  }
  .tag {
    font-size: 11px;
  }
  .mobile-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #eff5fc;
  }
  .mobile-tabs .tab {
    background: #e1edf9;
    color: #20496a;
    padding: 12px 6px;
    min-height: 44px;
  }
  .mobile-tabs .tab.active {
    background: #135d9b;
    color: #fff;
  }
  main {
    display: block;
    padding: 12px;
  }
  .left,
  .right {
    gap: 12px;
  }
  .right[hidden],
  .left[hidden] {
    display: none !important;
  }
  .panel {
    padding: 16px;
    border-radius: 12px;
  }
  .panel .heading {
    display: block;
  }
  .panel h1 {
    font-size: 21px;
  }
  .panel p {
    font-size: 14px;
  }
  .steps > div {
    font-size: 13px;
  }
  .statusgrid {
    grid-template-columns: 1fr;
  }
  svg {
    display: block;
    min-height: 135px;
  }
  .terminal {
    min-height: calc(100dvh - 185px);
    max-height: calc(100dvh - 160px);
    border-radius: 12px;
  }
  .output {
    min-height: 0;
    max-height: none;
    flex: 1;
    padding: 12px;
    font-size: 12px;
  }
  .promptline {
    flex-wrap: nowrap;
    padding: 11px;
    gap: 6px;
  }
  .promptline label {
    font-size: 12px;
  }
  .promptline input {
    width: auto;
    min-width: 0;
    font-size: 16px;
  }
  .promptline button {
    min-height: 42px;
    padding: 10px;
    font-size: 12px;
  }
  .termhead {
    padding: 10px;
  }
  .hint {
    padding: 13px;
  }
  .hint pre {
    font-size: 11px;
  }
  .network {
    font-size: 13px;
  }
  footer {
    padding: 15px;
    font-size: 11px;
  }
}
@media (max-width: 350px) {
  .tag {
    display: none;
  }
  .promptline label {
    font-size: 11px;
  }
  .promptline button {
    padding: 8px;
  }
  .switch button {
    padding: 7px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* Former cli-sprint4a.css */
/* Standalone CLI Lab - responsive refinement */
:root {
  color-scheme: light;
}
body {
  background: #f3f7fb;
}
.top {
  background: linear-gradient(105deg, #102a47, #173b5c);
  padding: 17px clamp(14px, 2.5vw, 36px);
}
.top strong {
  letter-spacing: -0.2px;
}
.back {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff13;
  color: #b4edfa;
}
.back:hover {
  background: #ffffff29;
}
.lab-context {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  background: #e8f3f7;
  border-bottom: 1px solid #cee3ea;
  color: #32556b;
  padding: 10px clamp(14px, 2.5vw, 36px);
  font-size: 13px;
}
.lab-context a {
  margin-left: auto;
  color: #12648b;
  font-weight: 700;
  text-decoration: none;
}
.lab-dot {
  width: 8px;
  height: 8px;
  background: #10a391;
  border-radius: 50%;
}
.lab-sep {
  color: #8da3b5;
}
main#labLayout {
  max-width: 1680px;
  gap: clamp(12px, 1.5vw, 24px);
  padding: clamp(12px, 1.7vw, 26px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.panel {
  border-radius: 18px;
  box-shadow: 0 9px 26px #16335c0a;
}
.terminal {
  border-radius: 18px;
  box-shadow: 0 14px 38px #091e3330;
}
.steps > div {
  border-left: 3px solid #91bbd4;
}
.node.router:hover rect {
  fill: #0a827e;
}
.tag {
  border: 1px solid #ffffff2a;
}
.right,
.left {
  min-width: 0;
}
.promptline {
  position: relative;
}
.promptline input {
  width: 100%;
}
@media (max-width: 1000px) and (min-width: 701px) {
  main#labLayout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .panel {
    padding: 16px;
  }
  .steps > div {
    font-size: 12px;
  }
  .promptline {
    flex-wrap: wrap;
  }
  .promptline input {
    flex: 1 1 70%;
    min-height: 38px;
  }
  .terminal {
    min-height: 520px;
  }
}
@media (max-width: 700px) {
  main#labLayout {
    display: block;
    padding: 12px;
  }
  .mobile-tabs {
    top: 0;
  }
  .top {
    padding: 13px 14px;
    gap: 8px;
  }
  .top strong {
    display: inline;
    font-size: 14px;
  }
  .lab-context {
    padding: 9px 14px;
    font-size: 12px;
  }
  .lab-context a {
    width: 100%;
    margin-left: 0;
  }
  .terminal {
    min-height: min(70dvh, 680px);
    max-height: none;
  }
  .output {
    min-height: 300px;
    max-height: 55dvh;
  }
  .termhead {
    gap: 9px;
    flex-wrap: wrap;
  }
  .switch button {
    min-height: 40px;
  }
  .promptline input {
    font-size: 16px;
  }
  .panel {
    padding: 16px;
  }
  .statusgrid {
    grid-template-columns: 1fr;
  }
  .left,
  .right {
    min-width: 0;
  }
}
@media (max-width: 380px) {
  .top strong {
    font-size: 12px;
  }
  .tag {
    font-size: 10px;
    padding: 5px 9px;
  }
  .switch button {
    padding: 8px;
  }
  .promptline {
    gap: 5px;
  }
}


/* Former cli-sprint4b.css */
.s4b-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  padding: 14px;
  background: #f1f7fc;
  border: 1px solid #dbe7f2;
  border-radius: 13px;
}
.s4b-tools label {
  width: 100%;
  font-size: 13px;
}
.s4b-tools select {
  flex: 1 1 200px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #b8cadc;
  border-radius: 9px;
  color: #123452;
  background: #fff;
  font: inherit;
}
.s4b-tools button {
  flex: 1 1 auto;
  margin-left: 0;
}
.packet-track {
  width: 100%;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  min-height: 36px;
}
.packet-node {
  background: #dfeefe;
  border: 1px solid #92b8d6;
  color: #173b5e;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
  animation: packetShow 0.32s both;
}
.packet-arrow {
  color: #30759e;
  font-weight: bold;
}
.packet-diagnosis {
  width: 100%;
  margin: 0;
  background: #fff;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.packet-ok {
  border-left: 4px solid #1b9a68;
  color: #106747;
}
.packet-fail {
  border-left: 4px solid #d27a39;
  color: #8f4322;
}
@keyframes packetShow {
  from {
    transform: translateY(7px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@media (max-width: 700px) {
  .s4b-tools {
    padding: 12px;
  }
  .s4b-tools button {
    flex-basis: 100%;
    min-height: 43px;
  }
  .packet-track {
    gap: 4px;
  }
  .packet-node {
    font-size: 11px;
    padding: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .packet-node {
    animation: none;
  }
}


/* Former sprint6.css */
/* Sprint 6 · design polish — preserve natural scrolling for long content. */
:root {
  --primary: #176c9a;
  --primary2: #11486c;
  --bg: #f2f6fb;
  --border: #dbe5ee;
  --text: #192f45;
  --muted: #63788e;
}
html,
body {
  min-width: 0;
}
body {
  background: var(--bg);
}
/* Login: one true viewport on normal desktops, no blank document overflow. */
body.login-only {
  margin: 0;
}
.login-page {
  min-height: 100dvh;
  background: #f5f8fc;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}
.login-visual {
  min-height: 0;
  background:
    radial-gradient(
      ellipse at 105% 10%,
      rgba(45, 183, 173, 0.24),
      transparent 35%
    ),
    linear-gradient(155deg, #102742 8%, #123b5d 57%, #176e82);
  padding: clamp(28px, 4vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(22px, 5vh, 60px);
}
.login-intro {
  max-width: 570px;
  margin: auto 0;
}
.login-kicker {
  color: #a5e6dc;
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.login-kicker.dark {
  color: #19738b;
}
.pulse-dot {
  background: #61dbc1;
  height: 8px;
  width: 8px;
  border-radius: 50%;
  display: inline-block;
}
.login-logo {
  color: #d6eaf5;
  font-weight: 800;
  font-size: 15px;
  margin-top: clamp(25px, 5vh, 68px);
  display: flex;
  gap: 13px;
  align-items: center;
}
.login-logo span {
  border-left: 1px solid #6991ab;
  padding-left: 13px;
  color: #bfd3e1;
  font-size: 12px;
  font-weight: 500;
}
.login-visual h1 {
  font-size: clamp(38px, 4.2vw, 72px);
  letter-spacing: -0.055em;
  line-height: 1.08;
  margin: 20px 0;
}
.login-visual h1 em {
  color: #68ddc1;
  font-style: normal;
}
.login-visual p {
  max-width: 550px;
  color: #c6dbe6;
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.65;
}
.login-points {
  gap: 12px;
  margin-top: clamp(21px, 3.8vh, 43px);
}
.login-points div {
  font-size: 13px;
  color: #ddf2f5;
  border-left: 2px solid #4fd0b4;
  padding-left: 14px;
}
.login-visual-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #c5dce5;
  opacity: 0.75;
  font-size: 11px;
}
.login-form-wrap {
  padding: clamp(14px, 3.5vw, 62px);
  background: #f6f9fc;
  min-width: 0;
}
.login-card {
  width: min(440px, 100%);
  border: 1px solid #e0eaf1;
  box-shadow: 0 28px 65px rgba(24, 57, 83, 0.09);
  border-radius: 24px;
  padding: clamp(22px, 3vw, 39px);
}
.login-card h2 {
  font-size: clamp(25px, 2.25vw, 34px);
  line-height: 1.16;
  letter-spacing: -0.04em;
  margin: 13px 0 9px;
  color: #152f46;
}
.login-card > p {
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.login-card .form-group {
  margin-bottom: 14px;
}
.login-card label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #26465f;
}
.login-card input {
  width: 100%;
  min-width: 0;
  min-height: 47px;
  border: 1px solid #cedee8;
  background: #fff;
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 15px;
  color: #19344a;
}
.login-card input:focus-visible {
  outline: 3px solid #8de0d3;
  outline-offset: 1px;
  border-color: #258781;
}
.login-submit {
  width: 100%;
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  padding: 13px 16px;
  background: #12688b;
  font-size: 14px;
}
.login-note {
  font-size: 12px;
  margin: 14px 0 0 !important;
  padding: 10px 12px;
  border: 1px solid #dbe6ef;
  color: #527086;
  background: #f4f8fb;
  border-radius: 10px;
}
.login-register {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #526b7c;
}
.login-register a {
  color: #12688b;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-register.second {
  margin-top: 8px;
  font-size: 12px;
}
.login-mobile-brand {
  display: none;
}
@media (min-width: 901px) and (min-height: 640px) {
  body.login-only {
    height: 100dvh;
    overflow: hidden;
  }
  .login-page {
    height: 100dvh;
    min-height: 0;
  }
  .login-form-wrap,
  .login-visual {
    height: 100%;
    overflow-y: auto;
  }
}
@media (min-width: 901px) and (max-height: 760px) {
  .login-visual {
    gap: 12px;
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .login-logo {
    margin-top: 18px;
  }
  .login-visual h1 {
    font-size: clamp(36px, 3.7vw, 54px);
    margin: 12px 0;
  }
  .login-points {
    margin-top: 18px;
  }
  .login-card {
    padding: 24px 30px;
  }
}
@media (max-width: 900px) {
  .login-page {
    display: flex;
    flex-direction: column;
  }
  .login-visual {
    min-height: 0;
    padding: 30px clamp(18px, 4vw, 32px);
    gap: 0;
  }
  .login-intro {
    margin: 0;
  }
  .login-logo,
  .login-visual-footer,
  .login-points {
    display: none;
  }
  .login-visual h1 {
    font-size: clamp(29px, 6vw, 43px);
    margin: 12px 0 5px;
  }
  .login-visual p {
    margin: 6px 0 0;
    font-size: 13px;
  }
  .login-form-wrap {
    padding: 20px 16px 30px;
    flex: 1;
  }
  .login-card {
    width: min(480px, 100%);
    padding: clamp(22px, 4vw, 32px);
  }
  .login-mobile-brand {
    display: block;
    color: #12688b;
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 10px;
  }
}
@media (max-width: 480px) {
  .login-visual {
    padding: 23px 18px;
  }
  .login-visual h1 {
    font-size: 31px;
  }
  .login-visual p {
    display: none;
  }
  .login-form-wrap {
    padding: 13px 12px 26px;
  }
  .login-card {
    border-radius: 18px;
    padding: 24px 20px;
  }
  .login-card h2 {
    font-size: 27px;
  }
}
/* All other pages: honest content height; table overflow contained. */
.shell {
  min-height: 100dvh;
}
.shell .main {
  min-width: 0;
}
.main .content {
  width: 100%;
}
.topbar .badge {
  background: #e7f5f2;
  color: #176e6c;
}
.content .card {
  min-width: 0;
}
.table-wrap {
  overflow-x: auto;
}
.table-wrap table {
  min-width: 560px;
}
.sidebar-footer {
  overflow-wrap: anywhere;
}
.sync-indicator {
  position: fixed;
  z-index: 120;
  right: 14px;
  bottom: 14px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(18, 55, 74, 0.94);
  color: #d9fff4;
  font-size: 11px;
  line-height: 1.4;
  max-width: min(300px, 85vw);
  box-shadow: 0 10px 25px #0d314433;
  pointer-events: none;
}
.sync-indicator.sync-error {
  background: #7f2334;
  color: white;
}
@media (max-width: 1100px) {
  .sync-indicator {
    right: 14px;
    bottom: 76px;
  }
}
.boot-error {
  font: 16px system-ui;
  max-width: 600px;
  margin: 12vh auto;
  border: 1px solid #dbe7ee;
  border-radius: 20px;
  padding: clamp(22px, 5vw, 50px);
  background: white;
  color: #182f44;
}
.boot-error a {
  color: #166c8f;
  text-decoration: underline;
}
html.auth-pending body .shell,
html.auth-pending body .top,
html.auth-pending body #labLayout,
html.auth-pending body .lab-context,
html.auth-pending body .mobile-tabs,
html.auth-pending body footer {
  visibility: hidden;
}
html.auth-pending body::before {
  content: "Memverifikasi sesi RoutingLab…";
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  color: #174963;
  font: 600 14px system-ui;
  z-index: 200;
  background: #f3f7fb;
}
@media (prefers-reduced-motion: reduce) {
  .login-submit,
  .btn {
    transition: none;
  }
}


/* Former sprint6-cli.css */
/* CLI uses a different stylesheet baseline; preserve its split-panel lab. */
html.auth-pending body #labLayout,
html.auth-pending body .top,
html.auth-pending body .lab-context,
html.auth-pending body .mobile-tabs,
html.auth-pending body footer {
  visibility: hidden;
}
body {
  background: #f0f5fb;
  overflow-x: hidden;
}
.top {
  border-bottom: 1px solid #294561;
}
main#labLayout {
  max-width: 1560px;
  gap: clamp(12px, 2vw, 22px);
  padding: clamp(12px, 2vw, 25px);
}
.panel {
  border-color: #dce7f1;
  box-shadow: 0 10px 28px #173e6409;
}
.terminal {
  box-shadow: 0 15px 32px #0b223f20;
}
.left,
.right {
  min-width: 0;
}
@media (min-width: 1101px) {
  #labLayout {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.96fr);
  }
}
@media (max-width: 700px) {
  main#labLayout {
    padding: 11px;
  }
  .top {
    flex-wrap: wrap;
  }
  .sync-indicator {
    bottom: 10px;
  }
}


/* Former cli-polish.css */
/* RoutingLab / CLI Lab UI Polish — focused console with first-fold topology.
   Preserve all existing controls, event IDs, simulation logic and keyboard use. */
:root {
  --cli-ink: #193446;
  --cli-muted: #6a8291;
  --cli-border: #dce9ec;
  --cli-teal: #0d8a81;
}
html {
  overflow-x: clip;
}
body {
  background: #f2f8f8;
  color: var(--cli-ink);
  font-size: 12.5px;
  line-height: 1.45;
  overflow-x: clip;
}
body .top {
  min-height: 52px;
  padding: 9px clamp(14px, 1.9vw, 28px);
  background: linear-gradient(100deg, #112a3e, #143d4f);
  box-shadow: none;
}
.top strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.top .back {
  font-size: 11px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #ffffff17;
  color: #c4f2ed;
}
.top .tag {
  font-size: 10px;
  background: #1c5662;
  color: #d2ffef;
  padding: 6px 10px;
}
body .lab-context {
  min-height: 33px;
  padding: 7px clamp(14px, 1.9vw, 28px);
  font-size: 11px;
  background: #eaf4f3;
  color: #47717b;
  gap: 7px;
  border-color: #dae9e8;
}
.lab-dot {
  background: #1ab79d;
}
.lab-context a {
  font-size: 10.5px;
  color: #19717c;
}
main#labLayout {
  max-width: 1760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(10px, 1.15vw, 18px);
  padding: clamp(10px, 1.2vw, 17px);
  min-width: 0;
  align-items: stretch;
}
main#labLayout .left,
main#labLayout .right {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
}
#labLayout .panel {
  background: #fff;
  border: 1px solid var(--cli-border);
  padding: clamp(13px, 1.25vw, 18px);
  border-radius: 13px;
  box-shadow: 0 5px 17px #123c4c0a;
}
#labLayout .panel h1 {
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
#labLayout .panel h2 {
  font-size: 15px;
  margin: 0;
}
#labLayout .panel p {
  font-size: 12px;
  line-height: 1.5;
}
#labLayout .heading {
  gap: 10px;
  align-items: baseline;
}
#labLayout .heading small {
  font-size: 10px;
  color: #77909a;
}
#labLayout button {
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 11px;
  border-radius: 8px;
  min-height: 36px;
  background: #146d80;
}
#labLayout button.secondary {
  background: #eaf3f4;
  color: #22566a;
  margin-left: 0;
}
#labLayout button:hover {
  filter: brightness(1.04);
}
#labLayout button:focus-visible,
#labLayout summary:focus-visible {
  outline: 3px solid #60d5b8;
  outline-offset: 2px;
}
/* The top card keeps topology and its signals visible while typing. */
.topology-panel .heading {
  margin-bottom: 8px;
}
.topology-panel {
  flex: 0 0 auto;
  min-width: 0;
}
.mission-summary {
  border-left: 3px solid #27b89e;
  background: #f1f9f8;
  border-radius: 8px;
  padding: 9px 11px;
  margin: 5px 0 9px;
}
.mission-label {
  color: #188778;
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.mission-summary strong {
  display: block;
  font-size: 14px;
  line-height: 1.28;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.mission-summary p {
  margin: 3px 0 0 !important;
  font-size: 11.2px !important;
  color: #5c7986 !important;
}
#labLayout svg.cli-map {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  min-height: 0;
  max-height: 170px;
  padding: 6px 8px;
  background-color: #f8fbfb;
  background-image: radial-gradient(#d5e5e5 1px, transparent 1px);
  background-size: 21px 21px;
  border: 1px solid #deeaec;
  border-radius: 10px;
}
#labLayout svg.cli-map .node text {
  font-size: 17px;
}
#labLayout svg.cli-map .node rect {
  fill: #18384f;
  stroke: #789eac;
  stroke-width: 1.7;
}
#labLayout svg.cli-map .node.router rect {
  fill: #175c78;
}
#labLayout svg.cli-map .node.selected rect,
#labLayout svg.cli-map .node.router:hover rect {
  fill: #0e8d83;
  stroke: #42d9be;
  stroke-width: 3.3;
}
#labLayout svg.cli-map .sub text {
  font-size: 13px;
  fill: #567883;
}
#labLayout #networkState {
  margin-top: 8px;
  padding: 9px 11px;
  font-size: 11.3px;
  line-height: 1.3;
  min-height: 34px;
  border-radius: 8px;
  background: #edf6f5;
  color: #345e68;
}
#labLayout #networkState.success {
  background: #e6f7ef;
  color: #176c50;
}
#labLayout #networkState.error {
  background: #fff1ed;
  color: #934d35;
}
#labLayout .statusgrid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
#labLayout .statusgrid > div {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.2px;
  line-height: 1.25;
  padding: 8px 8px;
  background: #f8fbfb;
  border: 1px solid #dfebed;
  border-radius: 8px;
  min-width: 0;
  white-space: normal;
}
#labLayout .statusdot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
}
#labLayout .cli-main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
#labLayout .cli-main-actions button {
  flex: 1 1 auto;
  margin: 0;
}
#labLayout #feedback {
  margin: 7px 0 0;
  color: #526d79;
  font-size: 10.8px;
  line-height: 1.35;
}
#labLayout .trace-disclosure {
  margin-top: 9px;
  border-radius: 9px;
  border: 1px solid #dce9eb;
  background: #f9fcfc;
}
#labLayout details > summary {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
  font-weight: 800;
  color: #235365;
  font-size: 11.7px;
  padding: 10px 12px;
}
#labLayout details > summary::-webkit-details-marker {
  display: none;
}
#labLayout details > summary::after {
  content: "⌄";
  font-size: 15px;
  line-height: 1;
  color: #477e86;
  margin-left: auto;
  transition: transform 0.15s;
}
#labLayout details[open] > summary::after {
  transform: rotate(180deg);
}
#labLayout details > summary span {
  font-size: 10px;
  font-weight: 500;
  color: #718996;
  margin-left: auto;
}
#labLayout .trace-disclosure .s4b-tools {
  display: flex;
  gap: 8px;
  margin: 0;
  border: 0;
  border-top: 1px solid #e0ecee;
  border-radius: 0;
  background: #fff;
  padding: 11px 12px;
}
#labLayout .s4b-tools label {
  font-size: 11px;
}
#labLayout .s4b-tools select {
  font-size: 12px;
  min-height: 36px;
  border-color: #cbdee2;
  padding: 7px 9px;
}
#labLayout .s4b-tools button {
  flex: 1 1 auto;
}
#labLayout .packet-track {
  font-size: 10px;
}
#labLayout .packet-node {
  font-size: 10px;
  padding: 5px 7px;
}
#labLayout .packet-diagnosis {
  font-size: 11px;
  line-height: 1.45;
  padding: 8px 10px;
}
#labLayout .guide-panel,
#labLayout .ip-panel {
  padding: 0;
  overflow: hidden;
}
#labLayout .guide-panel > summary,
#labLayout .ip-panel > summary {
  padding: 12px 14px;
}
#labLayout .guide-content,
#labLayout .ip-content {
  padding: 0 14px 13px;
  border-top: 1px solid #e5eeee;
}
#labLayout .guide-content .eyebrow {
  display: none;
}
#labLayout .guide-content h1 {
  font-size: 16px;
  margin: 13px 0 5px;
}
#labLayout .guide-content > p {
  font-size: 11.5px;
  margin: 0;
}
#labLayout .guide-content .steps {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
#labLayout .guide-content .steps > div {
  padding: 9px 10px;
  font-size: 11.3px;
  background: #f2f8f8;
  border-left: 3px solid #b4d6d2;
}
#labLayout .ip-content h2 {
  font-size: 14px;
  margin-top: 12px;
}
#labLayout .ip-content table {
  font-size: 11px;
  margin: 8px 0;
  max-width: 100%;
  width: 100%;
}
#labLayout .ip-content th,
#labLayout .ip-content td {
  padding: 6px 6px;
}
#labLayout .ip-content .note {
  font-size: 10.5px;
}
/* Terminal is the right-hand workspace, the output scrolls inside it. */
#labLayout .right {
  min-height: 0;
}
#labLayout .terminal {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  height: 100%;
  border-radius: 13px;
  background: #071922;
  border: 1px solid #234650;
  box-shadow: 0 7px 20px #071d2d15;
}
#labLayout .termhead {
  padding: 10px 13px;
  background: linear-gradient(100deg, #102b3b, #104451);
  font-size: 12px;
  min-height: 48px;
}
#labLayout .termhead strong {
  font-size: 12px;
  color: #f0faf8;
}
#labLayout .termhead .dot {
  background: #3ecfa9;
  width: 8px;
  height: 8px;
}
#labLayout .switch button {
  font-size: 11px;
  padding: 7px 12px;
  min-height: 30px;
  background: #21414e;
}
#labLayout .switch button.active {
  background: #12877f;
}
#labLayout .output {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: none;
  overflow-y: auto;
  overflow-x: auto;
  line-height: 1.65;
  font-size: 12px;
  padding: 14px;
  color: #d4e9ea;
  background: #081b25;
}
#labLayout .promptline {
  flex: 0 0 auto;
  gap: 7px;
  padding: 11px 12px;
  background: #0b202b;
  border-color: #234853;
}
#labLayout .promptline label {
  font-size: 12px;
  color: #7ee9be;
}
#labLayout .promptline input {
  font-family: Consolas, monospace;
  min-height: 31px;
  padding: 4px 2px;
  font-size: 13px;
  color: #f7fffa;
}
#labLayout .promptline button {
  background: #159183;
  color: #fff;
  min-height: 34px;
}
#labLayout .terminal-help {
  background: #eaf4f3;
  border: 1px solid #d4e7e3;
  border-radius: 10px;
  padding: 0;
  flex: 0 0 auto;
  min-height: 0;
}
#labLayout .terminal-help > summary {
  font-size: 11px;
  padding: 10px 12px;
}
#labLayout .hint-inner {
  padding: 0 12px 12px;
}
#labLayout .hint-inner strong {
  display: none;
}
#labLayout .hint-inner pre {
  font-size: 10.5px;
  margin: 7px 0;
  overflow: auto;
  border-radius: 8px;
}
#labLayout .hint-inner p {
  font-size: 11px;
}
body > footer {
  font-size: 10px;
  padding: 6px 12px;
  text-align: center;
  color: #6c8690;
}
@media (min-width: 1001px) and (min-height: 640px) {
  html:has(body[data-page-script="cli-lab"]),
  body[data-page-script="cli-lab"] {
    height: 100dvh;
    overflow: hidden;
  }
  body[data-page-script="cli-lab"] {
    display: flex;
    flex-direction: column;
  }
  body[data-page-script="cli-lab"] .top,
  body[data-page-script="cli-lab"] .lab-context,
  body[data-page-script="cli-lab"] footer {
    flex: 0 0 auto;
  }
  main#labLayout {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
  }
  main#labLayout .left {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 2px;
  }
  main#labLayout .right {
    min-height: 0;
    overflow: hidden;
  }
  main#labLayout .terminal {
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
  }
  main#labLayout .output {
    min-height: 0;
  }
}
@media (min-width: 1001px) and (max-height: 790px) {
  #labLayout .panel {
    padding: 12px 13px;
  }
  #labLayout .topology-panel .heading {
    margin-bottom: 5px;
  }
  #labLayout svg.cli-map {
    max-height: 143px;
  }
  #labLayout .mission-summary {
    padding: 7px 10px;
    margin: 3px 0 6px;
  }
  #labLayout #networkState {
    padding: 7px 10px;
    margin-top: 6px;
  }
  #labLayout .statusgrid {
    margin-top: 6px;
  }
  #labLayout .statusgrid > div {
    padding: 6px;
  }
  #labLayout .cli-main-actions {
    margin-top: 6px;
  }
  #labLayout .cli-main-actions button {
    min-height: 33px;
  }
  #labLayout .trace-disclosure {
    margin-top: 6px;
  }
  #labLayout .trace-disclosure > summary {
    padding: 8px 10px;
  }
}
@media (min-width: 1001px) and (max-width: 1170px) {
  main#labLayout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr);
    gap: 10px;
    padding: 10px;
  }
  #labLayout .statusgrid > div {
    font-size: 9.5px;
    padding: 6px 5px;
  }
}
@media (max-width: 1000px) and (min-width: 701px) {
  main#labLayout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }
  #labLayout .panel {
    padding: 12px;
  }
  #labLayout .statusgrid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  #labLayout .statusgrid > div {
    min-height: 27px;
  }
  #labLayout svg.cli-map {
    max-height: 160px;
  }
  #labLayout .terminal {
    min-height: 580px;
  }
}
@media (max-width: 700px) {
  body {
    background: #f2f8f8;
  }
  .top {
    padding: 11px 13px;
    gap: 7px;
  }
  .top strong {
    font-size: 12px;
  }
  .top .tag {
    font-size: 9px;
  }
  .lab-context {
    font-size: 10px;
    line-height: 1.35;
    padding: 8px 13px;
  }
  .lab-context a {
    width: auto;
    margin-left: auto;
  }
  .mobile-tabs {
    position: sticky;
    top: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f2f8f8;
    padding: 9px 12px 2px;
    gap: 8px;
  }
  .mobile-tabs .tab {
    font-size: 12px;
    min-height: 42px;
    padding: 10px;
    background: #e1eff0;
    color: #285d69;
    border-radius: 9px;
  }
  .mobile-tabs .tab.active {
    background: #0e797d;
    color: #fff;
  }
  main#labLayout {
    display: block;
    padding: 10px 11px 18px;
    min-height: 0;
    height: auto;
    overflow: visible;
  }
  #labLayout .left,
  #labLayout .right {
    gap: 9px;
  }
  #labLayout .left[hidden],
  #labLayout .right[hidden] {
    display: none !important;
  }
  #labLayout .panel {
    padding: 13px;
  }
  #labLayout .topology-panel .heading {
    display: flex;
    align-items: center;
  }
  #labLayout .heading small {
    font-size: 9px;
    max-width: 140px;
    text-align: right;
  }
  #labLayout svg.cli-map {
    max-height: 170px;
    min-height: 0;
  }
  #labLayout .statusgrid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
  }
  #labLayout .statusgrid > div {
    font-size: 9.2px;
    padding: 7px 5px;
    gap: 4px;
  }
  #labLayout .statusdot {
    width: 7px;
    height: 7px;
    flex-basis: 7px;
  }
  #labLayout .cli-main-actions {
    gap: 7px;
  }
  #labLayout .cli-main-actions button {
    font-size: 11px;
  }
  #labLayout .terminal {
    height: calc(100dvh - 170px);
    min-height: 440px;
    max-height: 760px;
    border-radius: 12px;
  }
  #labLayout .output {
    min-height: 0;
    max-height: none;
    overflow: auto;
    font-size: 11.5px;
  }
  #labLayout .promptline {
    padding: 10px 9px;
    flex-wrap: nowrap;
  }
  #labLayout .promptline input {
    min-height: 37px;
    font-size: 16px;
    min-width: 0;
  }
  #labLayout .promptline button {
    min-height: 37px;
  }
  #labLayout .terminal-help {
    margin-top: 0;
  }
  #labLayout .trace-disclosure .s4b-tools {
    padding: 10px;
  }
  #labLayout .s4b-tools button {
    flex-basis: 100%;
    min-height: 40px;
  }
}
@media (max-width: 370px) {
  #labLayout .statusgrid {
    grid-template-columns: 1fr;
  }
  #labLayout .heading small {
    display: none;
  }
  .top .tag {
    display: none;
  }
  #labLayout .promptline label {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #labLayout details > summary::after {
    transition: none;
  }
}
/* The mobile terminal tab mirrors the three live network lights.
   This preserves immediate feedback without forcing the learner to switch tabs. */
#labLayout .console-status {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  align-items: center;
}
#labLayout .console-status > span {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #dbe7e9;
  background: #faffff;
  color: #527381;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
}
#labLayout .console-status .mini-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 100px;
  background: #e3a23b;
}
#labLayout .console-status .ok .mini-dot {
  background: #14a077;
  box-shadow: 0 0 0 3px #e4f7ef;
}
#labLayout .console-status .bad .mini-dot {
  background: #d48649;
  box-shadow: 0 0 0 3px #fff3e8;
}
@media (max-width: 700px) {
  #labLayout .console-status > span {
    font-size: 10px;
    padding: 8px 6px;
  }
}


/* Former bootstrap-blue.css */

:root {
  --bg: #f4f8ff;
  --surface: #ffffff;
  --surface2: #eef5ff;
  --text: #15314b;
  --muted: #627991;
  --border: #d9e6f5;
  --primary: #3b82f6;
  --primary2: #2563eb;
  --success: #198754;
  --warning: #c28a10;
  --danger: #dc3545;
  --shadow: 0 16px 36px rgba(37, 99, 235, .10);
  --radius: 18px;
}

html, body { min-width:0; }
body {
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 28%),
    linear-gradient(180deg, #f7faff 0%, #f3f8ff 100%);
  color: var(--text);
}

.sidebar {
  background: linear-gradient(180deg, #0f2d4f 0%, #184f91 65%, #1d64bd 100%);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.08);
}
.brand-mark {
  background: rgba(255,255,255,.92);
  color: var(--primary2);
  box-shadow: 0 10px 24px rgba(13,110,253,.14);
}
.brand small { color:#d8e8ff; }
.nav a {
  color: #e4efff;
  border: 1px solid transparent;
}
.nav a:hover,
.nav a.active,
.nav a[aria-current="page"],
.nav a.nav-lab {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}
.sidebar-footer { border-top-color: rgba(255,255,255,.16); }
.user-chip { color:#d6e6ff; }

.topbar {
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(14px);
}
.topbar h2 { font-size: 22px; color: #173a63; }
.meta { color: #70869e; }
.badge {
  display:inline-flex; align-items:center; justify-content:center;
  gap:6px; min-height:32px; padding:6px 12px; border-radius:999px;
  font-size:12px; font-weight:800; letter-spacing:.01em;
  background: #e7f1ff; color: #1f67da; border: 1px solid #cfe0ff;
}

.content { max-width: 1280px; }
.hero {
  background: linear-gradient(135deg, #1756b3 0%, #2f7ff6 55%, #6eb1ff 100%);
  box-shadow: 0 18px 38px rgba(30, 99, 210, .16);
}
.hero:after { background: rgba(255,255,255,.12); }
.hero p { color:#eff6ff; }

.card {
  border-radius: 20px;
  border-color: #dbe7f4;
  box-shadow: 0 8px 22px rgba(29, 78, 216, .05);
}
.card h3 { color: #1b436e; }
.section-title h3 { color:#173a63; }
.section-title p, .card p { color:#6a8299; }

.btn {
  border-radius: 12px;
  font-weight: 700;
}
.btn-primary,
button.btn-primary,
.login-submit,
.account-page .panel button:not(.secondary),
.dashboard-link {
  background: linear-gradient(135deg, #2f7df4 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 10px 22px rgba(37,99,235,.18);
}
.btn-primary:hover,
button.btn-primary:hover,
.login-submit:hover,
.account-page .panel button:not(.secondary):hover,
.dashboard-link:hover {
  filter: brightness(1.04);
}
.btn-light {
  background:#edf4ff;
  color:#2459b1;
  border-color:#d3e2fb;
}
input:focus,
select:focus,
textarea:focus,
.panel input:focus,
.panel select:focus,
.login-card input:focus-visible {
  outline: 3px solid rgba(59,130,246,.18);
  border-color: #3b82f6;
}

.alert {
  border-radius: 16px;
  border-color: #d9e6f5;
  background: #f7fbff;
}
.alert.success { background:#edf9f1; border-color:#c8ead6; color:#16653f; }
.alert.warning { background:#fff8e8; border-color:#f2dfa9; color:#8b6510; }
.alert.error { background:#fff1f2; border-color:#f4c7cf; color:#b02a37; }

/* evaluation polish */
#quizForm { gap: 16px; }
.quiz-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #d9e7f6 !important;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .05);
  padding: 18px 20px 16px;
}

.quiz-card .quiz-legend {
    float: left;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #173a63;
}

.quiz-card .quiz-option:first-of-type {
    clear: both;
}

.quiz-option {
  display: grid;
  grid-template-columns: 20px 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid #d9e5f4;
  background: #f9fbff;
  border-radius: 16px;
  margin: 10px 0 0;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.quiz-option:hover {
  border-color: #90b7ff;
  background: #f2f7ff;
  box-shadow: 0 8px 20px rgba(59,130,246,.08);
  transform: translateY(-1px);
}
.quiz-option input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: #3b82f6;
}
.quiz-choice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #2156ad;
  background: #e8f1ff;
  border: 1px solid #cddfff;
}
.quiz-option-text {
  font-size: 14px;
  line-height: 1.55;
  color: #1e4068;
  font-weight: 600;
}
.quiz-option:has(input:checked) {
  border-color: #68a0ff;
  background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
  box-shadow: 0 12px 24px rgba(59,130,246,.12);
}
.quiz-option:has(input:checked) .quiz-choice-badge {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-color: transparent;
}
#quizResult h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #154074;
}
#quizResult p { margin: 0 0 8px; color: #49657f; }
#quizResult ol { margin: 14px 0 0 18px; padding: 0; }
#quizResult li { margin-bottom: 10px; color: #21405c; }

/* portal / account page */
body.account-page {
  background: radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 30%), linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}
.account-page .head-pill {
  background:#e7f1ff; color:#1d63d2; border-color:#cfe0ff;
}
.account-page .eyebrow,
.account-page .back-link,
.account-page .portal-message {
  color:#1f67da;
}
.account-page .panel {
  border-color:#dbe7f4;
  box-shadow:0 16px 35px rgba(37,99,235,.06);
}
.account-page .panel button.secondary {
  background:#edf4ff; color:#295ab1;
}

/* login page */
.login-page { background: #f4f8ff; }
.login-visual {
  background: radial-gradient(circle at 95% 12%, rgba(110,177,255,.28), transparent 28%), linear-gradient(160deg, #0d2d55 5%, #1d63ba 65%, #4195ff 100%);
}
.login-kicker { color:#d7e8ff; }
.pulse-dot { background:#cfe0ff; }
.login-visual h1 em { color: #d7e8ff; }
.login-card {
  border-color: #dce8f6;
  box-shadow: 0 20px 50px rgba(37,99,235,.10);
}
.login-register a { color:#2563eb; }

/* cli lab */
.top {
  background: linear-gradient(135deg, #0f2d52 0%, #185aad 100%);
}
.tag {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
}
.back { color:#d6e7ff; }
body > main, .lab-context main, main {
  max-width: 1600px;
}
.steps > div { background:#f4f8ff; border:1px solid #dbe7f4; color:#21405c; }
.node.router rect { fill:#2468d5; }
.node.selected rect, .node.router:hover rect { fill:#3b82f6; stroke:#b9d5ff; }
.terminal {
  border-color:#10386b;
  box-shadow: 0 20px 40px rgba(8, 28, 58, .16);
}
.termhead { background: linear-gradient(135deg, #10315a 0%, #185aad 100%); }
.switch button.active { background:#3b82f6; }
.promptline { border-top-color:#224c80; }
.promptline label { color:#b8d5ff; }

/* sizing tweaks */
.topbar h2,
.hero h2,
.section-title h3,
.head h1,
.login-card h2 { letter-spacing:-.03em; }
@media (min-width: 900px) {
  .topbar { padding: 16px 24px; }
  .content { padding: 24px; }
  .hero h2 { font-size: clamp(26px, 3vw, 38px); }
}
@media (max-width: 700px) {
  .quiz-card { padding: 16px; }
  .quiz-option { grid-template-columns: 18px 30px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .quiz-card legend, .quiz-legend { font-size: 16px; }
  .quiz-option-text { font-size: 13px; }
}

/* Avoid nested-scroll issues for the actual quiz while retaining page scrolling */
#quizForm { display:grid; grid-template-columns:minmax(0,1fr); }
#quizForm fieldset { min-width:0; }
#quizForm .quiz-option { width:100%; cursor:pointer; }
#quizForm .quiz-option input[type="radio"] { appearance:auto; padding:0; box-shadow:none; }
@media(max-width:480px){ #quizForm .quiz-option { grid-template-columns:18px 28px minmax(0,1fr); } }


/* Former sprint8.css */
/* Sprint 8 — calm Bootstrap-blue class mission UI; scoped to new elements. */
.rl8-board { padding: 22px; }
.rl8-board-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; flex-wrap:wrap; margin-bottom:14px; }
.rl8-board-header h3 { margin:0 0 6px; color:#173a63; }
.rl8-board-header p { margin:0; }
.rl8-muted { font-size:13px; color:#647b93; line-height:1.6; }
.rl8-status { color:#506b85; font-size:13px; margin:8px 0 16px; line-height:1.6; }
.rl8-error { color:#ba2c45 !important; }
.rl8-mission-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.rl8-mission-card { padding:18px; background:#f9fbff; border:1px solid #dbe7f6; border-radius:16px; min-width:0; }
.rl8-mission-card h4 { color:#1a426c; font-size:17px; line-height:1.35; margin:14px 0 7px; }
.rl8-mission-card p { color:#526e88; font-size:13px; line-height:1.65; margin:0 0 16px; }
.rl8-card-top,.rl8-card-bottom { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.rl8-kicker { font-size:12px; font-weight:800; color:#2769c5; letter-spacing:.015em; }
.rl8-pill { background:#fff5e2; color:#926212; border-radius:24px; font-size:11px; font-weight:800; padding:5px 10px; }
.rl8-done { background:#e4f6eb; color:#17663e; }
.rl8-small { font-size:12px; color:#698099; }
.rl8-small-button { text-decoration:none; font-size:12px; padding:9px 12px; min-height:36px; display:inline-flex; align-items:center; }
.rl8-assign-form { display:grid; grid-template-columns:minmax(190px,1fr) minmax(230px,1.35fr) auto; align-items:end; gap:12px; padding:16px; background:#f7faff; border:1px solid #dbe7f6; border-radius:16px; }
.rl8-field { display:flex; flex-direction:column; gap:7px; min-width:0; }
.rl8-field label { color:#34546f; font-weight:750; font-size:13px; }
.rl8-field select { min-height:44px; border:1px solid #cbdce9; background:white; color:#173a63; border-radius:11px; padding:10px 12px; width:100%; font:inherit; }
.rl8-assign-form button { min-height:44px; white-space:nowrap; }
.rl8-board .btn:disabled { opacity:.55; cursor:not-allowed; }
.rl8-management-header { margin-top:24px; border-top:1px solid #dbe7f6; padding-top:20px; }
.rl8-management-header h3 { margin-top:6px; }
.rl8-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.rl8-table { border-collapse:collapse; min-width:720px; width:100%; }
.rl8-table th { text-align:left; background:#f2f7ff; color:#345875; font-size:12px; font-weight:800; padding:13px; white-space:nowrap; }
.rl8-table td { border-bottom:1px solid #e4edf7; color:#3d5671; font-size:13px; padding:14px 13px; }
.rl8-table-button { font-size:12px; padding:7px 10px; white-space:nowrap; }
.rl8-lab-context { display:flex; flex-direction:column; gap:5px; padding:12px 14px; background:#f1f7ff; border:1px solid #cfe0f8; border-radius:12px; margin-bottom:14px; color:#164777; }
.rl8-lab-context strong { font-size:14px; }
.rl8-lab-context span { font-size:12px; line-height:1.55; }
/* Explicitly hide scenario walkthroughs in assigned diagnosis challenges. */
.guide-panel[hidden],.terminal-help[hidden] { display:none !important; }
@media(max-width:850px) { .rl8-assign-form {grid-template-columns:1fr 1fr;} .rl8-assign-form button {grid-column:1/-1;} }
@media(max-width:700px) { .rl8-mission-grid,.rl8-assign-form {grid-template-columns:1fr;} .rl8-board{padding:16px;} .rl8-assign-form button{grid-column:auto;} .rl8-board-header .btn{width:100%;} .rl8-mission-card{padding:15px;} }


/* Sprint 9: predictable console height. The log, not the page, scrolls. */
#labLayout .terminal .output {
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
@media (min-width: 701px) {
  main#labLayout .right {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    overscroll-behavior: contain;
  }
  main#labLayout .terminal {
    flex: 0 0 auto;
    height: clamp(420px, calc(100dvh - 330px), 650px);
    min-height: 420px;
    max-height: none;
  }
  /* The two left-side reference panels alone activate the old expanded mode.
     Opening/closing the CLI example panel never changes the console height. */
  main#labLayout:has(.guide-panel[open]:not([hidden]), .ip-panel[open]:not([hidden])) .terminal {
    flex: 1 1 auto;
    height: 100%;
    min-height: 420px;
  }
}
