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

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

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

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

html.iot-resource-frame-standalone #rcfdGame .rcfd-hero {
  display: none;
}

#rcfdGame,
#rcfdGame *,
.rcfd-reference-material,
.rcfd-reference-material * {
  box-sizing: border-box;
}

#rcfdGame {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 28px;
  padding: 18px;
  color: #263844;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f8f7f1;
  border: 1px solid #e4e0d3;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(50, 58, 62, 0.1);
}

#rcfdGame h2,
#rcfdGame h3,
#rcfdGame h4,
#rcfdGame h5,
#rcfdGame p,
.rcfd-reference-material h5,
.rcfd-reference-material p {
  margin: 0;
  letter-spacing: 0;
}

.rcfd-hero {
  padding: 22px;
  margin-bottom: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #203244 0%, #137b74 58%, #c16f28 100%);
  border-radius: 8px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.rcfd-progress-track > div {
  width: 4%;
  height: 100%;
  background: linear-gradient(90deg, #137b74, #c16f28);
  border-radius: inherit;
  transition: width 0.25s ease;
}

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

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

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

.rcfd-scenario-card {
  padding: 18px;
  margin-bottom: 14px;
}

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

.rcfd-scenario-tag {
  color: #0d6662;
  background: #e2f4f1;
}

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

.rcfd-scenario-card h3 {
  margin-top: 8px;
  color: #223348;
  font-size: 1.5rem;
  line-height: 1.2;
}

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

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

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

.rcfd-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: start;
}

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

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

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

.rcfd-step-head h4 {
  color: #223348;
  font-size: 1rem;
}

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

.rcfd-control-stack {
  display: grid;
  gap: 12px;
}

.rcfd-control-stack label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.rcfd-control-stack label > span {
  color: #223348;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rcfd-control-stack select {
  min-height: 44px;
  width: 100%;
  padding: 9px 38px 9px 11px;
  color: #223348;
  background: #ffffff;
  border: 1px solid #cfdad8;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
}

.rcfd-control-stack select:focus {
  border-color: #12736f;
  box-shadow: 0 0 0 3px rgba(18, 115, 111, 0.14);
  outline: none;
}

.rcfd-control-stack small {
  color: #63777f;
  font-size: 0.78rem;
  line-height: 1.35;
}

.rcfd-target-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d7e3df;
  border-radius: 8px;
  background: #f2f8f6;
}

.rcfd-target-card span {
  display: block;
  color: #60737b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rcfd-target-card strong {
  display: block;
  margin-top: 4px;
  color: #12736f;
  font-size: 1.5rem;
  line-height: 1;
}

.rcfd-target-card p {
  margin-top: 8px !important;
  color: #405761;
  font-size: 0.86rem;
  line-height: 1.4;
}

.rcfd-live-design {
  padding: 14px;
  margin-bottom: 12px;
  color: #ffffff;
  background: #223348;
  border-radius: 8px;
}

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

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

.rcfd-meter-head strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 1.2rem;
}

.rcfd-meter-badge {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.rcfd-meter-badge.is-good {
  color: #def9e8;
  border-color: rgba(123, 218, 154, 0.45);
  background: rgba(31, 141, 86, 0.28);
}

.rcfd-meter-badge.is-bad {
  color: #ffe7e3;
  border-color: rgba(223, 110, 93, 0.45);
  background: rgba(167, 60, 50, 0.28);
}

.rcfd-meter-row {
  margin-bottom: 12px;
}

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

.rcfd-meter-row-head strong {
  color: #ffffff;
  white-space: nowrap;
}

.rcfd-meter-track {
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

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

.rcfd-meter-track > div.is-good {
  background: #58c587;
}

.rcfd-meter-track > div.is-bad {
  background: #df7651;
}

.rcfd-design-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.rcfd-design-grid div {
  min-height: 58px;
  padding: 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.rcfd-design-grid strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.rcfd-live-design .is-good {
  color: #9ae4ad;
}

.rcfd-live-design .is-bad {
  color: #ffb4a6;
}

.rcfd-canvas-wrap {
  width: 100%;
  padding: 10px;
  background: #1f3040;
  border-radius: 8px;
}

.rcfd-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

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

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

.rcfd-submit {
  color: #ffffff;
  background: #12736f;
}

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

.rcfd-submit:disabled,
.rcfd-secondary:disabled,
.rcfd-control-stack select:disabled {
  cursor: default;
  opacity: 0.72;
}

.rcfd-submit:disabled {
  background: #6f8586;
}

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

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

.rcfd-feedback {
  margin-top: 14px;
  padding: 16px;
  border-left: 5px solid #12736f;
}

.rcfd-feedback.ok {
  border-left-color: #b66b20;
}

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

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

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

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

.rcfd-feedback-head > strong {
  color: #12736f;
  font-size: 1.8rem;
  line-height: 1;
  white-space: nowrap;
}

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

.rcfd-score-item {
  min-height: 58px;
  padding: 9px;
  text-align: center;
  border: 1px solid #dfe8e5;
  border-radius: 8px;
  background: #f9fbfa;
}

.rcfd-score-item strong {
  display: block;
  color: #223348;
  font-size: 1rem;
}

.rcfd-score-item span {
  display: block;
  margin-top: 2px;
  color: #6c7d84;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

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

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

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

.rcfd-feedback-grid ul {
  padding-left: 18px;
  margin: 0;
}

.rcfd-next {
  margin-top: 14px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.rcfd-reference-table-wrap th,
.rcfd-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;
}

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

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

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

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

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

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

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

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

.rcfd-mini-card-grid article > span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: #12736f;
  font-weight: 900;
}

@media (max-width: 860px) {
  #rcfdGame {
    padding: 16px;
  }

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

  .rcfd-metrics,
  .rcfd-score-detail,
  .rcfd-final-stats,
  .rcfd-reference-card-grid,
  .rcfd-mini-card-grid {
    grid-template-columns: 1fr;
  }

  .rcfd-design-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rcfd-scenario-top,
  .rcfd-feedback-head,
  .rcfd-meter-head,
  .rcfd-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .rcfd-meter-badge,
  .rcfd-scenario-score,
  .rcfd-meter-row-head strong {
    white-space: normal;
  }
}

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

  #rcfdGame {
    padding: 12px;
  }

  .rcfd-hero {
    padding: 20px;
  }

  .rcfd-hero h2 {
    font-size: 1.55rem;
  }

  .rcfd-scenario-card h3 {
    font-size: 1.32rem;
  }

  .rcfd-stat strong,
  .rcfd-feedback-head > strong {
    font-size: 1.6rem;
  }

  .rcfd-panel,
  .rcfd-scenario-card,
  .rcfd-feedback {
    padding: 14px;
  }

  .rcfd-design-grid {
    grid-template-columns: 1fr;
  }

  .rcfd-step-head {
    grid-template-columns: 30px 1fr;
  }
}
