/* Component stylesheet for game.ref-model-quiz. */
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.rmq-page:not(.iot-component-frame) main.content,
html.rmq-page:not(.iot-component-frame) .page-columns,
html.rmq-page:not(.iot-component-frame) #quarto-content,
html.rmq-page:not(.iot-component-frame) #quarto-document-content {
  width: min(1160px, calc(100vw - 32px));
  max-width: none;
  margin-right: auto;
  margin-left: auto;
}

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

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

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

html.iot-resource-frame-standalone #rmqGame .rmq-hero {
  display: none;
}

#rmqGame,
#rmqGame *,
.rmq-reference-material,
.rmq-reference-material * {
  box-sizing: border-box;
}

#rmqGame {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 28px;
  padding: 18px;
  color: #253746;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f7f8f3;
  border: 1px solid #e1e5d8;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(36, 50, 57, 0.1);
}

#rmqGame h1,
#rmqGame h2,
#rmqGame h3,
#rmqGame h4,
#rmqGame h5,
#rmqGame p,
.rmq-reference-material h3,
.rmq-reference-material p {
  margin: 0;
  letter-spacing: 0;
}

.rmq-hero {
  padding: 22px;
  margin-bottom: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #1f3443 0%, #0f8179 58%, #ba7330 100%);
  border-radius: 8px;
}

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

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

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

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

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

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

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

.rmq-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);
}

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

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

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

.rmq-progress-card,
.rmq-stat,
.rmq-question-card,
.rmq-panel,
.rmq-feedback,
.rmq-final-card {
  background: #ffffff;
  border: 1px solid #dfe5e2;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(36, 50, 57, 0.06);
}

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

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

.rmq-progress-label span {
  color: #596f78;
}

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

.rmq-progress-track > div {
  width: 4%;
  height: 100%;
  background: linear-gradient(90deg, #0f8179, #ba7330);
  border-radius: inherit;
  transition: width 0.25s ease;
}

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

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

.rmq-stat span {
  margin-top: 4px;
  color: #596f78;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rmq-question-card {
  padding: 18px;
  margin-bottom: 14px;
}

.rmq-question-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rmq-question-tag {
  color: #0d6662;
  background: #e2f4f1;
}

.rmq-question-score {
  color: #7a450b;
  background: #fff0d8;
  white-space: nowrap;
}

.rmq-question-card h2,
.rmq-question-card h3 {
  margin-top: 8px;
  color: #223348;
  font-size: 1.5rem;
  line-height: 1.2;
}

.rmq-question-copy {
  max-width: 920px;
  color: #38505c;
  line-height: 1.55;
}

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

.rmq-reqs span {
  color: #223348;
  background: #edf3f0;
  font-size: 0.78rem;
}

.rmq-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.rmq-panel {
  min-width: 0;
  padding: 16px;
}

.rmq-step-head {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.rmq-step-head > span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: #0f8179;
  font-weight: 900;
}

.rmq-step-head h3 {
  color: #223348;
  font-size: 1rem;
}

.rmq-step-head p {
  margin-top: 3px !important;
  color: #61757d;
  font-size: 0.88rem;
  line-height: 1.45;
}

.rmq-option-list {
  display: grid;
  gap: 10px;
}

.rmq-option {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #d7e2df;
  border-radius: 8px;
  color: #223348;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.rmq-option:hover,
.rmq-option:focus-visible {
  border-color: #ba7330;
  box-shadow: 0 8px 18px rgba(186, 115, 48, 0.16);
  outline: none;
}

.rmq-option.is-selected {
  border-color: #0f8179;
  background: #eaf7f5;
}

.rmq-option.is-correct {
  border-color: #1e8d58;
  background: #f0faf4;
}

.rmq-option.is-wrong {
  border-color: #bc4b3f;
  background: #fff4f3;
}

.rmq-option:disabled {
  cursor: default;
}

.rmq-option > span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: #223348;
  font-weight: 900;
}

.rmq-option strong,
.rmq-option em {
  display: block;
}

.rmq-option strong {
  color: #223348;
  font-size: 0.96rem;
}

.rmq-option em {
  margin-top: 3px;
  color: #405761;
  font-size: 0.84rem;
  font-style: normal;
  line-height: 1.4;
}

.rmq-cue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rmq-cue-grid article {
  min-height: 112px;
  padding: 12px;
  border: 1px solid #dfe8e5;
  border-radius: 8px;
  background: #f9fbfa;
}

.rmq-cue-grid span {
  display: inline-flex;
  min-height: 24px;
  padding: 3px 8px;
  align-items: center;
  border-radius: 999px;
  color: #0f6f69;
  background: #dcf1ee;
  font-size: 0.7rem;
  font-weight: 900;
}

.rmq-cue-grid strong {
  display: block;
  margin-top: 8px;
  color: #223348;
  font-size: 0.9rem;
}

.rmq-cue-grid p {
  margin-top: 4px !important;
  color: #506873;
  font-size: 0.78rem;
  line-height: 1.38;
}

.rmq-action-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.rmq-submit,
.rmq-secondary {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
}

.rmq-submit {
  color: #ffffff;
  background: #0f8179;
}

.rmq-submit:hover,
.rmq-submit:focus-visible {
  background: #0b6963;
  outline: none;
}

.rmq-submit:disabled {
  cursor: default;
  background: #a9b7b6;
}

.rmq-secondary {
  color: #223348;
  background: #eef4f1;
}

.rmq-secondary:hover,
.rmq-secondary:focus-visible {
  background: #e2ebe7;
  outline: none;
}

.rmq-feedback {
  margin-top: 14px;
  padding: 16px;
  border-left: 5px solid #0f8179;
}

.rmq-feedback.needs-work {
  border-left-color: #b84d3f;
}

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

.rmq-feedback-head span {
  color: #6f8088;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rmq-feedback-head h3 {
  margin-top: 3px !important;
  color: #223348;
  font-size: 1.15rem;
}

.rmq-feedback-head > strong {
  color: #0f8179;
  font-size: 1.8rem;
  line-height: 1;
  white-space: nowrap;
}

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

.rmq-feedback-grid > div {
  padding: 13px;
  border: 1px solid #dfe8e5;
  border-radius: 8px;
  background: #fbfcfb;
}

.rmq-feedback-grid h4 {
  margin: 0 0 8px !important;
  color: #223348;
  font-size: 0.9rem;
}

.rmq-feedback-grid p {
  color: #405761;
  font-size: 0.86rem;
  line-height: 1.5;
}

.rmq-final {
  margin-top: 14px;
}

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

.rmq-final-card > span {
  color: #6f8088;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rmq-final-card h2 {
  margin-top: 6px !important;
  color: #223348;
  font-size: 1.6rem;
}

.rmq-final-card > strong {
  display: block;
  margin: 12px 0;
  color: #0f8179;
  font-size: 2.4rem;
  line-height: 1;
}

.rmq-final-card p {
  max-width: 640px;
  margin: 0 auto !important;
  color: #405761;
  line-height: 1.55;
}

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

.rmq-final-stats div {
  min-height: 66px;
  padding: 10px;
  border: 1px solid #dfe8e5;
  border-radius: 8px;
  background: #f9fbfa;
}

.rmq-final-stats strong {
  display: block;
  color: #223348;
  font-size: 1.35rem;
}

.rmq-final-stats span {
  display: block;
  color: #6c7d84;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rmq-error,
.rmq-loading,
.rmq-reference-loading {
  padding: 18px;
  border: 1px solid #dfe5e2;
  border-radius: 8px;
  background: #ffffff;
}

.rmq-error {
  color: #842029;
  background: #fff4f3;
}

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

.rmq-reference-intro {
  margin-bottom: 12px;
  padding: 18px;
  color: #405761;
  background: #ffffff;
  border: 1px solid #dfe5e2;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.rmq-reference-section {
  margin-bottom: 10px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dfe5e2;
  border-radius: 8px;
}

.rmq-reference-section summary {
  padding: 14px 16px;
  color: #223348;
  cursor: pointer;
  font-weight: 900;
}

.rmq-reference-section[open] summary {
  border-bottom: 1px solid #dfe5e2;
}

.rmq-reference-table-wrap {
  padding: 14px;
  overflow-x: auto;
}

.rmq-reference-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.rmq-reference-table-wrap th,
.rmq-reference-table-wrap td {
  padding: 10px;
  border-bottom: 1px solid #e4ebe8;
  color: #405761;
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.rmq-reference-table-wrap th {
  color: #223348;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.rmq-reference-card-grid,
.rmq-mini-card-grid {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.rmq-reference-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rmq-reference-card-grid article,
.rmq-mini-card-grid article {
  padding: 13px;
  border: 1px solid #dfe8e5;
  border-radius: 8px;
  background: #f9fbfa;
}

.rmq-reference-card-grid h3,
.rmq-mini-card-grid h3 {
  color: #223348;
  font-size: 0.88rem;
}

.rmq-reference-card-grid p,
.rmq-mini-card-grid p {
  margin-top: 6px !important;
  color: #405761;
  font-size: 0.82rem;
  line-height: 1.45;
}

.rmq-mini-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rmq-mini-card-grid article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
}

.rmq-mini-card-grid article > span {
  display: inline-flex;
  min-width: 42px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: #0f8179;
  font-size: 0.72rem;
  font-weight: 900;
}

@media (max-width: 900px) {
  #rmqGame {
    padding: 16px;
  }

  .rmq-status,
  .rmq-workspace,
  .rmq-feedback-grid,
  .rmq-reference-card-grid,
  .rmq-mini-card-grid {
    grid-template-columns: 1fr;
  }

  .rmq-metrics,
  .rmq-final-stats {
    grid-template-columns: 1fr;
  }

  .rmq-question-top,
  .rmq-feedback-head,
  .rmq-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .rmq-question-score,
  .rmq-feedback-head > strong {
    white-space: normal;
  }
}

@media (max-width: 620px) {
  html.rmq-page:not(.iot-component-frame) main.content,
  html.rmq-page:not(.iot-component-frame) .page-columns,
  html.rmq-page:not(.iot-component-frame) #quarto-content,
  html.rmq-page:not(.iot-component-frame) #quarto-document-content {
    width: min(100%, calc(100vw - 24px));
  }

  #rmqGame {
    padding: 12px;
  }

  .rmq-hero {
    padding: 20px;
  }

  .rmq-hero h1,
  .rmq-hero h2 {
    font-size: 1.55rem;
  }

  .rmq-question-card h2,
  .rmq-question-card h3 {
    font-size: 1.3rem;
  }

  .rmq-panel,
  .rmq-question-card,
  .rmq-feedback {
    padding: 14px;
  }

  .rmq-cue-grid {
    grid-template-columns: 1fr;
  }

  .rmq-option {
    grid-template-columns: 32px 1fr;
  }

  .rmq-reference-table-wrap table,
  .rmq-reference-table-wrap thead,
  .rmq-reference-table-wrap tbody,
  .rmq-reference-table-wrap tr,
  .rmq-reference-table-wrap th,
  .rmq-reference-table-wrap td {
    display: block;
  }

  .rmq-reference-table-wrap thead {
    display: none;
  }

  .rmq-reference-table-wrap tr {
    padding: 10px 0;
    border-bottom: 1px solid #e4ebe8;
  }

  .rmq-reference-table-wrap tr:last-child {
    border-bottom: 0;
  }

  .rmq-reference-table-wrap td {
    display: block;
    padding: 5px 0;
    border-bottom: 0;
  }

  .rmq-reference-table-wrap td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: #223348;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }
}

#rmqGame[data-iot-recolor-pilot="true"][data-iot-module="reference-architectures"] {
  --rmq-module-accent: #a98200;
  --rmq-module-strong: #5f4900;
  --rmq-module-tint: #fff7df;
  --rmq-module-border: #dfc780;
  background: #fbf8ee;
  border-color: var(--rmq-module-border);
  box-shadow: none;
}

#rmqGame[data-iot-recolor-pilot="true"][data-iot-module="reference-architectures"] .rmq-hero {
  color: #253746;
  background: var(--rmq-module-tint);
  border: 1px solid var(--rmq-module-border);
  border-left: 4px solid var(--rmq-module-accent);
}

#rmqGame[data-iot-recolor-pilot="true"][data-iot-module="reference-architectures"]
  :where(.rmq-hero h1, .rmq-hero h2, .rmq-hero p, .rmq-pill, .rmq-metric strong, .rmq-metric span) {
  color: #253746;
}

#rmqGame[data-iot-recolor-pilot="true"][data-iot-module="reference-architectures"]
  :where(.rmq-pill, .rmq-metric) {
  background: #ffffff;
  border-color: var(--rmq-module-border);
}

#rmqGame[data-iot-recolor-pilot="true"][data-iot-module="reference-architectures"]
  :where(.rmq-submit, .rmq-step-head > span, .rmq-option.is-selected > span) {
  background: var(--rmq-module-strong);
  border-color: var(--rmq-module-strong);
  color: #ffffff;
}

#rmqGame[data-iot-recolor-pilot="true"][data-iot-module="reference-architectures"]
  .rmq-progress-track
  > div {
  background: var(--rmq-module-accent);
}

#rmqGame[data-iot-recolor-pilot="true"][data-iot-module="reference-architectures"]
  .rmq-final-card
  > strong {
  color: var(--rmq-module-strong);
}

#rmqGame[data-iot-recolor-pilot="true"][data-iot-module="reference-architectures"]
  :where(.rmq-option.is-selected, .rmq-feedback) {
  background: var(--rmq-module-tint);
  border-color: var(--rmq-module-accent);
}
