Add Lab 8 embedded red-team chat widget with three defense levels

This commit is contained in:
2026-04-21 19:49:39 -06:00
parent 883d43dca8
commit f74575277a
7 changed files with 1045 additions and 33 deletions
+100
View File
@@ -947,6 +947,10 @@ ol {
margin: 1.25rem 0 1.5rem;
}
.lab-content [data-lab8-chat] {
margin: 1.25rem 0 1.5rem;
}
.quantization-explorer {
border: 1px solid #d7e4ef;
border-radius: 16px;
@@ -1582,6 +1586,102 @@ ol {
opacity: 0.72;
}
/* Lab 8 level selector tabs */
.lab8-level-tabs {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
margin: 0.75rem 0 0.25rem;
}
.lab8-level-tabs__left {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.lab8-level-tab {
appearance: none;
background: #f1f7fc;
border: 1px solid #d7e4ef;
border-radius: 10px;
color: #335a75;
cursor: pointer;
font-size: 0.82rem;
font-weight: 600;
padding: 0.45rem 0.85rem;
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.lab8-level-tab:hover {
background: #e6f0f8;
border-color: #bdd6e8;
}
.lab8-level-tab--active {
background: #0f4f76;
border-color: #0f4f76;
color: #fff;
}
.lab8-level-tab--clear {
background: #fff0f0;
border-color: #efcfd0;
color: #8a2c2c;
margin-left: auto;
}
.lab8-level-tab--clear:hover {
background: #ffe0e0;
border-color: #d6a6a8;
}
.lab8-hint-row {
display: flex;
justify-content: flex-start;
margin: 0.25rem 0 0.5rem;
}
.lab8-hint-toggle {
appearance: none;
background: transparent;
border: 1px solid #c5d8e8;
border-radius: 8px;
color: #0f4f76;
cursor: pointer;
font-size: 0.78rem;
font-weight: 600;
padding: 0.35rem 0.75rem;
transition: background 0.15s ease, border-color 0.15s ease;
}
.lab8-hint-toggle:hover {
background: #f1f7fc;
border-color: #a6c5db;
}
.lab8-hint-panel {
background: #f8fbff;
border: 1px solid #d7e4ef;
border-radius: 12px;
margin: 0 0 0.75rem;
padding: 0.75rem 1rem;
}
.lab8-hint-panel pre {
margin: 0;
white-space: pre-wrap;
}
.lab8-hint-panel code {
background: transparent;
color: #334155;
font-size: 0.85rem;
line-height: 1.55;
}
.lab3-terminal-inline {
margin: 1.15rem 0 1.45rem;
padding: 1rem;