/*
 * Server load panel (v3.3.21)
 *
 * This panel is read in one situation: the site is 503-ing and the admin
 * needs to stop it, possibly on a phone, possibly during a class. So it is
 * built for speed of decision, not for decoration:
 *
 *   - the heavy-feature count is the largest thing on the panel
 *   - ON rows are warm and raised, OFF rows recede - the state is readable
 *     from a distance, without reading the label
 *   - the two presets sit above the individual rows, because they are the
 *     right answer most of the time
 *
 * Animations are short and sparing. A panel someone opens in a hurry should
 * settle immediately, so nothing here delays a click.
 */

.lg-panel-v3321 {
  position: relative;
  margin: 0 0 22px;
  padding: 26px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(120, 140, 170, .22);
}

/* The panel's own temperature. Safe is calm; hot is a warning the admin can
   see before reading a single word. */
.lg-panel-v3321.is-safe { border-color: rgba(86, 214, 168, .30); }
.lg-panel-v3321.is-hot  { border-color: rgba(247, 178, 102, .38); }

.lg-panel-v3321::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #56d6a8, #70d8f0);
}
.lg-panel-v3321.is-hot::before {
  background: linear-gradient(90deg, #f7b266, #f36d6d);
}

/* ------------------------------------------------------------------ head */
.lg-head-v3321 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
}

.lg-icon-v3321 {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(112, 216, 240, .18), rgba(86, 214, 168, .10));
  border: 1px solid rgba(112, 216, 240, .26);
}
.lg-icon-v3321 svg { width: 22px; height: 22px; }
.lg-panel-v3321.is-hot .lg-icon-v3321 {
  background: linear-gradient(145deg, rgba(247, 178, 102, .20), rgba(243, 109, 109, .10));
  border-color: rgba(247, 178, 102, .32);
}

.lg-title-v3321 {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 8px;
}
.lg-title-v3321 h2 { margin: 0; font-size: 1.22rem; }

.lg-state-v3321 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.lg-state-v3321 i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.lg-state-v3321.safe {
  color: #56d6a8;
  background: rgba(86, 214, 168, .12);
  border: 1px solid rgba(86, 214, 168, .28);
}
.lg-state-v3321.hot {
  color: #f7b266;
  background: rgba(247, 178, 102, .12);
  border: 1px solid rgba(247, 178, 102, .30);
}
/* A live site at risk should not look static. */
.lg-state-v3321.hot i { animation: lgPulse3321 1.8s ease-in-out infinite; }
@keyframes lgPulse3321 {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.82); }
}

.lg-head-copy-v3321 p {
  margin: 0;
  max-width: 74ch;
  font-size: .9rem;
  line-height: 1.68;
  color: var(--muted, #b8c6d6);
}
.lg-head-copy-v3321 b { color: var(--text, #eef6ff); }

.lg-total-v3321 { text-align: right; }
.lg-total-v3321 b {
  display: block;
  font-size: 2.3rem;
  line-height: 1;
  font-weight: 900;
  color: #56d6a8;
}
.lg-panel-v3321.is-hot .lg-total-v3321 b { color: #f7b266; }
.lg-total-v3321 span {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted, #8fa4ba);
}

/* --------------------------------------------------------------- presets */
.lg-presets-v3321 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0 18px;
}

.lg-preset-v3321 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(120, 140, 170, .20);
  background: rgba(255, 255, 255, .025);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.lg-preset-v3321:hover { transform: translateY(-2px); }
.lg-preset-v3321.is-cloud:hover { border-color: rgba(86, 214, 168, .40); }
.lg-preset-v3321.is-lab:hover   { border-color: rgba(247, 178, 102, .40); }

.lg-preset-copy-v3321 b {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: .98rem;
}
.lg-preset-copy-v3321 b svg { width: 17px; height: 17px; }
.lg-preset-v3321.is-cloud b { color: #7ee2bb; }
.lg-preset-v3321.is-lab b   { color: #f7c88a; }
.lg-preset-copy-v3321 span {
  display: block;
  font-size: .84rem;
  line-height: 1.6;
  color: var(--muted, #b8c6d6);
}
.lg-preset-v3321 button { align-self: flex-start; }

/* ------------------------------------------------------------------ rows */
.lg-list-v3321 { display: grid; gap: 10px; }

.lg-row-v3321 {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(120, 140, 170, .16);
  background: rgba(255, 255, 255, .018);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.lg-row-v3321:hover { transform: translateX(2px); }

/* An enabled heavy feature is the thing to notice on this panel. */
.lg-row-v3321.is-on            { background: rgba(255, 255, 255, .04); }
.lg-row-v3321.is-on.is-heavy   { border-color: rgba(247, 178, 102, .34); }
.lg-row-v3321:not(.is-on)      { opacity: .74; }

.lg-row-top-v3321 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.lg-row-top-v3321 b { font-size: .98rem; }

.lg-weight-v3321 {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.lg-weight-v3321.heavy {
  color: #f7b266;
  background: rgba(247, 178, 102, .13);
}
.lg-weight-v3321.light {
  color: #8fa4ba;
  background: rgba(143, 164, 186, .12);
}

.lg-pill-v3321 {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .06em;
}
.lg-pill-v3321.on {
  color: #0b1829;
  background: #56d6a8;
}
.lg-pill-v3321.off {
  color: #b8c6d6;
  background: rgba(143, 164, 186, .18);
}

.lg-detail-v3321 {
  margin: 0 0 5px;
  font-size: .87rem;
  line-height: 1.55;
  color: var(--muted, #b8c6d6);
}

.lg-cost-v3321 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px;
  font-size: .82rem;
  line-height: 1.5;
  color: #d8b98a;
}
.lg-cost-v3321 svg { width: 15px; height: 15px; flex: none; }

.lg-endpoint-v3321 {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 7px;
  font-size: .74rem;
  color: #8fa4ba;
  background: rgba(0, 0, 0, .22);
}

/* ---------------------------------------------------------------- switch */
.lg-switch-v3321 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: .84rem;
  cursor: pointer;
  white-space: nowrap;
  color: #dff7fb;
  background: rgba(112, 216, 240, .10);
  border: 1px solid rgba(112, 216, 240, .28);
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}
.lg-switch-v3321:hover  { background: rgba(112, 216, 240, .18); }
.lg-switch-v3321:active { transform: scale(.97); }

/* The track reads as the current state, so the button says what IS as well
   as what it will do. */
.lg-switch-v3321 i {
  position: relative;
  width: 34px; height: 18px;
  border-radius: 999px;
  background: rgba(143, 164, 186, .30);
  transition: background .22s ease;
}
.lg-switch-v3321 i::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #eef6ff;
  transition: transform .22s cubic-bezier(.4, 1.3, .5, 1);
}
.lg-switch-v3321.is-on i          { background: #56d6a8; }
.lg-switch-v3321.is-on i::after   { transform: translateX(16px); }

.lg-switch-v3321.is-on {
  color: #f7c8a0;
  background: rgba(243, 109, 109, .10);
  border-color: rgba(243, 109, 109, .26);
}
.lg-switch-v3321.is-on:hover { background: rgba(243, 109, 109, .18); }

/* ------------------------------------------------------------------ foot */
.lg-foot-v3321 {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(120, 140, 170, .16);
}
.lg-foot-v3321 p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.68;
  color: var(--muted, #8fa4ba);
}
.lg-foot-v3321 code {
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .8rem;
  color: #b8e6f0;
  background: rgba(0, 0, 0, .24);
}

/* ---------------------------------------------------------------- mobile */
/* The admin may well be fixing this from a phone during a class, so the
   panel has to be usable at 360px - not merely not broken. */
@media (max-width: 720px) {
  .lg-panel-v3321 { padding: 20px 16px; }

  .lg-head-v3321 {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  /* The count moves under the heading rather than being squeezed beside it. */
  .lg-total-v3321 {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-align: left;
  }
  .lg-total-v3321 b { font-size: 1.8rem; }

  .lg-presets-v3321 { grid-template-columns: 1fr; }

  .lg-row-v3321 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  /* Full-width target: a mis-tap here changes the site's behaviour. */
  .lg-switch-v3321 {
    width: 100%;
    justify-content: center;
    padding: 13px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-panel-v3321 *,
  .lg-state-v3321.hot i {
    animation: none !important;
    transition: none !important;
  }
  .lg-preset-v3321:hover,
  .lg-row-v3321:hover { transform: none; }
}

/* Light mode: the panel must keep its meaning, not just its colours. */
body.light .lg-panel-v3321,
html[data-theme="light"] .lg-panel-v3321 {
  border-color: rgba(30, 50, 80, .14);
}
body.light .lg-endpoint-v3321,
html[data-theme="light"] .lg-endpoint-v3321,
body.light .lg-foot-v3321 code,
html[data-theme="light"] .lg-foot-v3321 code {
  color: #1e3a5f;
  background: rgba(30, 50, 80, .07);
}
body.light .lg-cost-v3321,
html[data-theme="light"] .lg-cost-v3321 { color: #8a6a2f; }

/* =====================================================================
   "This feature is switched off" page (v3.3.30)

   v3.3.21 guarded the APIs but not the pages, so Live Coding still opened
   a full, permanently-empty monitor. This is what the page says instead:
   why it is closed, and exactly where to open it.
   ===================================================================== */

.lg-off-v3330 {
  max-width: 560px;
  margin: 40px auto;
  padding: 36px 30px;
  text-align: center;
}

.lg-off-art-v3330 {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 18px;
  border: 1px solid rgba(247, 178, 102, .28);
  background: linear-gradient(145deg, rgba(247, 178, 102, .16), rgba(243, 109, 109, .07));
}
.lg-off-art-v3330 svg { width: 27px; height: 27px; color: #f7b266; }

.lg-off-v3330 h1 {
  margin: 0 0 12px;
  font-size: 1.28rem;
  color: #f7d98a;
}

.lg-off-v3330 p {
  margin: 0 0 12px;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--premium-muted, #b8c6d6);
}

.lg-off-where-v3330 {
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid rgba(112, 216, 240, .22);
  background: rgba(112, 216, 240, .06);
  color: #cdeef8 !important;
}
.lg-off-where-v3330 b { color: #eef6ff; }

.lg-off-v3330 .btn { margin-top: 6px; }

@media (max-width: 640px) {
  .lg-off-v3330 { margin: 24px 0; padding: 28px 20px; }
  .lg-off-v3330 .btn { width: 100%; justify-content: center; }
}
