/* Component stylesheet for game.lora-parameter-tuner. */
html.iot-component-frame body {
  margin: 0;
  padding: 0;
  background: transparent;
}

html.iot-component-frame main,
html.iot-component-frame .page-columns,
html.iot-component-frame .content,
html.iot-component-frame #quarto-content,
html.iot-component-frame #quarto-document-content {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

html.iot-component-frame h1.title,
html.iot-component-frame #interactive-game > h2,
html.iot-component-frame #reference-material > h2,
html.iot-component-frame #related-resources,
html.iot-component-frame header,
html.iot-component-frame .quarto-title-block,
html.iot-component-frame nav,
html.iot-component-frame .sidebar,
html.iot-component-frame .toc-active,
html.iot-component-frame #quarto-header {
  display: none !important;
}

html.lpt-page:not(.iot-component-frame) main.content,
html.lpt-page:not(.iot-component-frame) .page-columns,
html.lpt-page:not(.iot-component-frame) #quarto-content,
html.lpt-page:not(.iot-component-frame) #quarto-document-content {
  width: min(1160px, calc(100vw - 32px));
  max-width: none;
  margin-right: auto;
  margin-left: auto;
}

html.lpt-page:not(.iot-component-frame) .page-columns {
  display: block;
}

html.iot-component-frame #lptGame,
html.iot-component-frame .lpt-reference-material {
  max-width: 100%;
  margin-right: 0;
  margin-left: 0;
  box-shadow: none;
}

html.iot-resource-frame-standalone #lptGame {
  margin-bottom: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

html.iot-resource-frame-standalone #lptGame .lpt-hero {
  display: none;
}

#lptGame,
#lptGame *,
.lpt-reference-material,
.lpt-reference-material * {
  box-sizing: border-box;
}

#lptGame {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 28px;
  padding: 18px;
  color: #243641;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8f2;
  border: 1px solid #e2e4d9;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(45, 63, 48, 0.1);
}

#lptGame h2,
#lptGame h3,
#lptGame h4,
#lptGame h5,
#lptGame p {
  margin: 0;
  letter-spacing: 0;
}

.lpt-hero {
  padding: 22px;
  margin-bottom: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #1f3540 0%, #12806f 58%, #b77420 100%);
  border-radius: 8px;
}

.lpt-kicker,
.lpt-reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lpt-kicker {
  margin-bottom: 14px;
}

.lpt-pill,
.lpt-reqs span,
.lpt-scenario-tag,
.lpt-scenario-score {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.lpt-pill {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  text-transform: uppercase;
}

.lpt-hero h2 {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.1;
}

.lpt-hero p {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.lpt-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin-top: 18px;
}

.lpt-metric {
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.lpt-metric strong {
  display: block;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
}

.lpt-metric span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
}

.lpt-status {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(100px, 0.6fr));
  gap: 10px;
  margin-bottom: 16px;
}

.lpt-progress-card,
.lpt-stat,
.lpt-scenario-card,
.lpt-controls-panel,
.lpt-meter-panel,
.lpt-feedback,
.lpt-final-card {
  background: #ffffff;
  border: 1px solid #dfe4e2;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(34, 48, 54, 0.06);
}

.lpt-progress-card {
  min-height: 68px;
  padding: 12px 14px;
}

.lpt-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #34454e;
  font-size: 0.82rem;
  font-weight: 800;
}

.lpt-progress-label span {
  color: #708189;
}

.lpt-progress-track {
  height: 8px;
  overflow: hidden;
  background: #e5ece7;
  border-radius: 999px;
}

.lpt-progress-track > div {
  height: 100%;
  width: 4%;
  background: linear-gradient(90deg, #12806f, #c6721b);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.lpt-stat {
  display: grid;
  min-height: 68px;
  place-items: center;
  padding: 10px;
  text-align: center;
}

.lpt-stat strong {
  color: #243641;
  font-size: 1.8rem;
  line-height: 1;
}

.lpt-stat span {
  margin-top: 4px;
  color: #77858c;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lpt-scenario-card {
  margin-bottom: 12px;
  padding: 18px;
}

.lpt-scenario-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.lpt-scenario-tag {
  background: #e6f3ee;
  color: #117464;
}

.lpt-scenario-score {
  flex: 0 0 auto;
  color: #ad6417;
  background: #fff2d8;
}

.lpt-scenario-card h3 {
  margin-top: 10px;
  color: #243641;
  font-size: 1.55rem;
  line-height: 1.18;
}

.lpt-scenario-copy {
  max-width: 900px;
  margin-top: 12px;
  color: #526870;
  line-height: 1.55;
}

.lpt-reqs {
  margin-top: 14px;
}

.lpt-reqs span {
  min-height: 26px;
  color: #34454e;
  background: #edf3f1;
  font-size: 0.78rem;
}

.lpt-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: 12px;
  align-items: start;
}

.lpt-controls-panel,
.lpt-meter-panel,
.lpt-feedback {
  padding: 16px;
}

.lpt-step-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}

.lpt-step-head > span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #ffffff;
  background: #12806f;
  border-radius: 6px;
  font-weight: 900;
}

.lpt-step-head h4 {
  color: #243641;
  font-size: 1.1rem;
  line-height: 1.2;
}

.lpt-step-head p {
  margin-top: 3px;
  color: #708189;
  font-size: 0.9rem;
  line-height: 1.35;
}

.lpt-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lpt-range-control,
.lpt-select-control {
  display: grid;
  gap: 8px;
  min-height: 124px;
  padding: 12px;
  border: 1px solid #dfe7e5;
  border-radius: 8px;
  background: #fbfcfb;
}

.lpt-range-control span,
.lpt-select-control span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #34454e;
  font-size: 0.88rem;
  font-weight: 900;
}

.lpt-range-control strong {
  color: #c56b1d;
}

.lpt-range-control small,
.lpt-select-control small {
  color: #74868d;
  font-size: 0.78rem;
  line-height: 1.35;
}

.lpt-range-control input[type="range"] {
  width: 100%;
  accent-color: #12806f;
}

.lpt-select-control select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: #243641;
  background: #ffffff;
  border: 1px solid #ccd8d8;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
}

.lpt-action-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.lpt-submit,
.lpt-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: #c6721b;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
}

.lpt-secondary {
  color: #18424a;
  background: #dbeceb;
}

.lpt-submit:hover,
.lpt-submit:focus-visible {
  background: #a95f14;
}

.lpt-secondary:hover,
.lpt-secondary:focus-visible {
  background: #c7e1df;
}

.lpt-meter {
  padding: 14px;
  color: #ffffff;
  background: #172738;
  border-radius: 8px;
}

.lpt-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lpt-meter-head span,
.lpt-meter-grid span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lpt-meter-head strong {
  display: block;
  margin-top: 3px;
  font-size: 1.1rem;
}

.lpt-budget-badge {
  align-self: start;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #172738;
  background: #cfe9e7;
  font-size: 0.8rem;
  font-weight: 900;
}

.lpt-meter-row {
  margin-top: 12px;
}

.lpt-meter-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 800;
}

.lpt-meter-track {
  height: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.lpt-meter-track > div {
  height: 100%;
  border-radius: inherit;
}

.lpt-meter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.lpt-meter-grid > div {
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.lpt-meter-grid strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 1.05rem;
}

.is-good {
  color: #44d38d !important;
  background: transparent;
}

.is-bad {
  color: #ff9a8b !important;
  background: transparent;
}

.lpt-meter-track > .is-good {
  color: inherit !important;
  background: #1fa46b;
}

.lpt-meter-track > .is-bad {
  color: inherit !important;
  background: #d95f42;
}

.lpt-advice {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dfe7e5;
  border-radius: 8px;
  background: #fbfcfb;
}

.lpt-advice h5,
.lpt-feedback-grid h5 {
  margin-bottom: 8px;
  color: #243641;
  font-size: 0.88rem;
  text-transform: uppercase;
}

.lpt-advice ul,
.lpt-feedback ul {
  margin: 0;
  padding-left: 18px;
}

.lpt-advice li,
.lpt-feedback li {
  color: #526870;
  font-size: 0.9rem;
  line-height: 1.45;
}

.lpt-feedback {
  margin-top: 12px;
}

.lpt-feedback.great {
  border-color: #94d8bf;
  background: #effaf5;
}

.lpt-feedback.ok {
  border-color: #e8c283;
  background: #fff8ea;
}

.lpt-feedback.needs-work {
  border-color: #e8aaa0;
  background: #fff3f1;
}

.lpt-feedback-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.lpt-feedback-head span {
  color: #61737a;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lpt-feedback-head h4 {
  margin-top: 3px;
  color: #243641;
  font-size: 1.15rem;
}

.lpt-feedback-head > strong {
  min-width: 74px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #ffffff;
  background: #1f3540;
  text-align: center;
  font-size: 1.05rem;
}

.lpt-score-detail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.lpt-score-item {
  min-height: 64px;
  padding: 10px;
  border: 1px solid #dfe7e5;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

.lpt-score-item strong {
  display: block;
  color: #12806f;
  font-size: 1.05rem;
}

.lpt-score-item span {
  display: block;
  margin-top: 4px;
  color: #7a8b92;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lpt-feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lpt-feedback-grid p {
  color: #526870;
  font-size: 0.9rem;
  line-height: 1.45;
}

.lpt-next {
  width: 100%;
  margin-top: 14px;
}

.lpt-final {
  margin-top: 12px;
}

.lpt-final-card {
  padding: 28px;
  text-align: center;
}

.lpt-final-card > span {
  color: #117464;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lpt-final-card h3 {
  margin-top: 6px;
  color: #243641;
  font-size: 1.8rem;
}

.lpt-final-card > strong {
  display: block;
  margin-top: 12px;
  color: #c6721b;
  font-size: 2.5rem;
  line-height: 1;
}

.lpt-final-card p {
  max-width: 620px;
  margin: 12px auto 0;
  color: #526870;
  line-height: 1.5;
}

.lpt-final-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
  margin: 18px auto;
}

.lpt-final-stats div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid #dfe7e5;
  border-radius: 8px;
  background: #ffffff;
}

.lpt-final-stats strong {
  display: block;
  color: #12806f;
  font-size: 1.5rem;
}

.lpt-final-stats span {
  color: #7a8b92;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lpt-loading,
.lpt-error,
.lpt-reference-loading {
  padding: 28px;
  color: #6d7f87;
  background: #ffffff;
  border: 1px dashed #c9d7d6;
  border-radius: 8px;
  text-align: center;
}

.lpt-reference-material {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 28px;
  color: #243641;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lpt-reference-intro {
  margin: 0 0 12px;
  color: #60747c;
  line-height: 1.5;
}

.lpt-reference-material details {
  margin-bottom: 10px;
  border: 1px solid #dbe5e6;
  border-radius: 8px;
  background: #edf5f6;
}

.lpt-reference-material summary {
  min-height: 46px;
  padding: 13px 16px;
  color: #243641;
  font-weight: 900;
  cursor: pointer;
}

.lpt-reference-content {
  padding: 0 16px 16px;
  color: #526870;
  line-height: 1.5;
}

.lpt-reference-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  background: #ffffff;
}

.lpt-reference-table-wrap table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.lpt-reference-table-wrap th,
.lpt-reference-table-wrap td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6eeee;
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
}

.lpt-reference-table-wrap th {
  color: #243641;
  background: #f6faf9;
  font-weight: 900;
}

.lpt-reference-card-grid,
.lpt-mini-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.lpt-reference-card-grid article,
.lpt-mini-card-grid article {
  padding: 12px;
  border: 1px solid #d7e3e3;
  border-radius: 8px;
  background: #ffffff;
}

.lpt-reference-card-grid h5,
.lpt-mini-card-grid h5 {
  margin: 0 0 6px;
  color: #243641;
  font-size: 0.92rem;
}

.lpt-reference-card-grid p,
.lpt-mini-card-grid p {
  margin: 0;
  color: #526870;
  font-size: 0.88rem;
  line-height: 1.45;
}

.lpt-mini-card-grid article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
}

.lpt-mini-card-grid span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: #12806f;
  font-weight: 900;
}

@media (max-width: 980px) {
  #lptGame {
    padding: 14px;
  }

  .lpt-status,
  .lpt-workspace {
    grid-template-columns: 1fr;
  }

  .lpt-status {
    grid-template-columns: 1fr 1fr;
  }

  .lpt-progress-card {
    grid-column: 1 / -1;
  }

  .lpt-score-detail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lpt-feedback-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #lptGame {
    padding: 10px;
    border-radius: 8px;
  }

  .lpt-hero {
    padding: 18px;
  }

  .lpt-hero h2 {
    font-size: 1.6rem;
  }

  .lpt-metrics,
  .lpt-control-grid,
  .lpt-action-row,
  .lpt-meter-grid,
  .lpt-final-stats,
  .lpt-reference-card-grid,
  .lpt-mini-card-grid {
    grid-template-columns: 1fr;
  }

  .lpt-status {
    grid-template-columns: 1fr;
  }

  .lpt-scenario-top,
  .lpt-meter-head,
  .lpt-feedback-head {
    flex-direction: column;
  }

  .lpt-scenario-card,
  .lpt-controls-panel,
  .lpt-meter-panel,
  .lpt-feedback {
    padding: 12px;
  }

  .lpt-scenario-card h3 {
    font-size: 1.3rem;
  }

  .lpt-score-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lpt-reference-table-wrap table {
    min-width: 560px;
  }
}
