.safety-heading h1 { max-width: 730px; }
.safety-heading p { max-width: 700px; }
.safety-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 22px; }
.safety-layout *, .safety-steps * { box-sizing: border-box; }
.safety-work { padding: 28px; min-width: 0; scroll-margin-top: 20px; }
.safety-stage-heading { margin-bottom: 23px; }
.safety-stage-heading .eyebrow { font-size: 10px; color: var(--purple, #6440bf); }
.safety-stage-heading h2 { margin: 10px 0 14px; font-size: 26px; line-height: 1.25; letter-spacing: -.45px; }
.safety-stage-heading > p { color: var(--muted, #716b7b); font-size: 14px; line-height: 1.75; }
.safety-work h3 { font-size: 16px; line-height: 1.4; margin: 0 0 10px; }
.safety-work p { line-height: 1.7; }
.safety-work button, .safety-step { cursor: pointer; font: inherit; }
.safety-work .btn { max-width: 100%; white-space: normal; line-height: 1.5; }
.safety-work button:disabled, .safety-step:disabled { opacity: .55; cursor: default; }
.safety-work button:focus-visible, .safety-work summary:focus-visible, .safety-step:focus-visible { outline: 3px solid #ab87db; outline-offset: 3px; }
.safety-work #safety-title:focus { outline: none; }
.safety-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 22px; }
.safety-step { display: flex; gap: 9px; align-items: center; padding: 13px 11px; min-height: 64px; border: 1px solid var(--line, #e7e4ec); border-radius: 11px; background: #fff; text-align: left; color: var(--muted, #716b7b); font-size: 12px; line-height: 1.45; }
.safety-step.active { background: var(--lavender, #eee7fb); color: var(--ink, #272332); border-color: #cab7e5; }
.safety-step-number { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border: 1px solid #d7ccdf; border-radius: 50%; font-size: 11px; }
.safety-step-number.done { color: #267b61; background: #edf6f1; border-color: #c8e0d5; }
.safety-step.active .safety-step-number { color: #fff; background: var(--purple, #6440bf); border-color: var(--purple, #6440bf); }
.safety-rules { position: sticky; top: 24px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; min-width: 0; padding: 21px; }
.safety-rules header { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.safety-rules h2 { font-size: 18px; line-height: 1.4; margin: 0; }
.safety-rules-notice { padding: 12px; margin: 15px 0; border-radius: 9px; background: #f3eef9; color: #665572; font-size: 11px; line-height: 1.7; }
.safety-rule { padding: 13px 0; border-top: 1px solid var(--line, #e7e4ec); }
.safety-rule > span { font-size: 10px; color: var(--purple, #6440bf); font-weight: 600; }
.safety-rule p { margin: 7px 0 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.safety-explanation { background: #f5f1fb; border: 1px solid #e8e0f3; border-radius: 12px; padding: 18px; margin-bottom: 22px; }
.safety-explanation p { font-size: 13px; margin: 0; color: #62566f; }
.safety-explanation p + p { margin-top: 11px; }
.safety-category-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.safety-category-legend > span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; font-size: 10px; line-height: 1.4; border: 1px solid #e0d5ed; border-radius: 8px; background: #fbf9fe; }
.safety-category-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8761c4; }
.safety-category-legend strong { display: grid; place-items: center; min-width: 17px; height: 17px; font-size: 10px; background: #eae1f6; border-radius: 50%; }
.safety-card-stack { display: grid; gap: 20px; }
.safety-card { padding: 18px; margin: 0; border: 1px solid var(--line, #e7e4ec); border-radius: 13px; min-width: 0; }
.safety-card legend { max-width: 100%; padding: 0 7px; font-size: 13px; line-height: 1.6; font-weight: 500; }
.safety-card-number { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 7px; border-radius: 7px; background: #eee7f8; color: var(--purple, #6440bf); font-size: 10px; vertical-align: middle; }
.safety-card .safety-card-text { font-size: 13px; margin: 0 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.safety-options { display: flex; flex-wrap: wrap; gap: 7px; }
.safety-choice { display: flex; align-items: center; text-align: left; gap: 7px; min-height: 44px; padding: 10px 12px; border: 1px solid #ddd3e8; border-radius: 9px; background: #fff; color: var(--ink, #272332); font-size: 12px !important; line-height: 1.55 !important; flex: 1 1 110px; overflow-wrap: anywhere; }
.safety-choice:hover:not(:disabled) { border-color: var(--purple, #6440bf); background: #faf8fd; }
.safety-choice.selected { border-color: #ab8bd3; background: #eee7f9; color: #4c2a84; box-shadow: inset 0 0 0 1px #ab8bd3; }
.safety-options.vertical { flex-direction: column; }
.safety-options.vertical .safety-choice { flex-basis: auto; }
.safety-feedback { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; margin: 14px 0 0; border-radius: 10px; font-size: 12px; line-height: 1.7; }
.safety-feedback svg { flex-shrink: 0; margin-top: 3px; }
.safety-feedback.good { color: #275d4c; background: #eff7f2; }
.safety-feedback.retry { color: #79542a; background: #fff6e7; }
.safety-check-action { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 23px; }
.safety-check-action > span { color: var(--muted, #716b7b); font-size: 10px; line-height: 1.5; }
.safety-work .safety-small { font-size: 11px; line-height: 1.7; color: var(--muted, #716b7b); margin: 12px 0 16px; }
.safety-preview { border: 1px dashed #baaad1; border-radius: 12px; padding: 18px; margin-top: 23px; background: #fcfbfe; }
.safety-preview h3 { font-size: 14px; }
.safety-plain-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.safety-kicker { display: block; margin-bottom: 9px; font-size: 10px; letter-spacing: .04em; color: var(--purple, #6440bf); font-weight: 500; }
.safety-model-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line, #e7e4ec); }
.safety-model-block h3 { font-size: 19px; }
.safety-safe-prompt { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; line-height: 1.75; background: #eef6f1; color: #2c5849; border: 1px solid #cadfd3; border-radius: 12px; padding: 18px; margin: 17px 0; }
.safety-model-answer { min-width: 0; border: 1px solid var(--line, #e7e4ec); padding: 20px; border-radius: 12px; margin-top: 20px; }
.safety-model-answer header { padding-bottom: 15px; border-bottom: 1px solid var(--line, #e7e4ec); }
.safety-model-answer header h3 { font-size: 16px; margin: 12px 0 0; }
.safety-answer-text { padding: 16px 0; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.safety-answer-text p { margin: 0 0 12px; }
.safety-model-answer footer { display: flex; flex-wrap: wrap; gap: 8px 15px; padding-top: 13px; border-top: 1px solid var(--line, #e7e4ec); font-size: 10px; color: var(--muted, #716b7b); overflow-wrap: anywhere; }
.safety-document { border: 1px solid #ddd2eb; border-radius: 13px; padding: 18px; background: #fcfbfe; margin: 20px 0 23px; }
.safety-document header { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.safety-document header h3 { margin: 0; font-size: 16px; }
.safety-document-row { display: block; text-align: left; width: 100%; margin-top: 9px; padding: 13px; border: 1px solid #e3dbeb; border-radius: 9px; background: #fff; color: var(--ink, #272332); }
.safety-document-row > span { display: block; font-size: 10px; font-weight: 600; color: var(--purple, #6440bf); margin-bottom: 7px; }
.safety-document-row > strong { display: block; font-size: 12px; line-height: 1.7; font-weight: 400; overflow-wrap: anywhere; }
.safety-document-row:hover:not(:disabled) { border-color: #ab8bd3; }
.safety-document-row.selected { border-color: #9b7ac8; background: #f0eafb; box-shadow: inset 3px 0 #8154b6; }
.safety-simulation { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid #d4e3dc; background: #f3f8f5; border-radius: 11px; margin-bottom: 22px; color: #3f6857; }
.safety-simulation > svg { flex-shrink: 0; margin-top: 3px; }
.safety-simulation p { margin: 0; font-size: 12px; }
.safety-error { margin-top: 20px; border: 1px solid #e7c4be; border-radius: 12px; padding: 16px; background: #fff0ed; color: #863d32; font-size: 12px; line-height: 1.7; }
.safety-error p { margin: 10px 0 0; }
.safety-error + .btn { margin-top: 13px; }
.safety-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 22px; margin-top: 26px; border-top: 1px solid var(--line, #e7e4ec); }
.safety-bottom > span { font-size: 10px; color: var(--muted, #716b7b); text-align: center; }
.safety-method { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line, #e7e4ec); font-size: 11px; color: var(--muted, #716b7b); }
.safety-method summary { font-size: 12px; color: var(--ink, #272332); cursor: pointer; }
.safety-method p { margin: 12px 0; }
.safety-locked { padding: 22px; background: #f8f5fc; border-radius: 12px; }
.safety-locked p { font-size: 13px; color: var(--muted, #716b7b); margin: 12px 0 20px; }
.safety-result-lead { display: flex; align-items: flex-start; gap: 17px; margin-bottom: 22px; }
.safety-result-lead > span { display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 50px; background: #eaf5ee; color: #267b61; border-radius: 50%; }
.safety-result-lead h3 { font-size: 20px; margin: 2px 0 10px; }
.safety-result-lead p { margin: 0; font-size: 13px; color: #60586a; }
.safety-checklist { display: grid; gap: 12px; list-style: none; padding: 0; margin: 23px 0; }
.safety-checklist li { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid #e5ddec; border-radius: 11px; background: #fcfbfe; }
.safety-checklist li > span { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 8px; font-size: 11px; color: var(--purple, #6440bf); background: #ede5f8; }
.safety-checklist p { margin: 0; font-size: 13px; }
.safety-result-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 23px; }
@media (max-width: 1250px) {
  .safety-layout { grid-template-columns: minmax(0, 1fr) 265px; gap: 17px; }
  .safety-work { padding: 23px; }
  .safety-rules { padding: 18px; }
  .safety-step { font-size: 11px; padding: 11px 9px; gap: 7px; }
  .safety-step-number { width: 24px; height: 24px; flex-basis: 24px; }
  .safety-stage-heading h2 { font-size: 24px; }
}
@media (max-width: 950px) {
  .safety-layout { display: flex; flex-direction: column; }
  .safety-rules { position: static; order: -1; width: 100%; max-height: none; overflow: visible; overscroll-behavior: auto; }
  .safety-rules > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
  .safety-work { width: 100%; }
  .safety-heading > .btn { display: none; }
}
@media (max-width: 650px) {
  .safety-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 15px; }
  .safety-step { flex-direction: column; align-items: flex-start; min-height: 80px; font-size: 10px; padding: 11px; }
  .safety-work { padding: 22px 17px; }
  .safety-stage-heading h2 { font-size: 23px; }
  .safety-stage-heading > p { font-size: 13px; }
  .safety-rules > div { grid-template-columns: 1fr; }
  .safety-rules { padding: 18px; }
  .safety-explanation, .safety-card, .safety-preview, .safety-document { padding: 15px; }
  .safety-card legend { font-size: 12px; }
  .safety-explanation p, .safety-card .safety-card-text { font-size: 12px; }
  .safety-choice { flex-basis: 100%; }
  .safety-fragments .safety-choice { flex: 1 1 75px; }
  .safety-feedback { font-size: 11px; padding: 11px 12px; }
  .safety-bottom { flex-wrap: wrap; }
  .safety-bottom > span { width: 100%; order: 3; margin-top: 7px; }
  .safety-safe-prompt { font-size: 12px; padding: 14px; }
  .safety-model-answer { padding: 15px; }
  .safety-answer-text { font-size: 12px; }
  .safety-result-lead { gap: 12px; }
  .safety-result-lead > span { width: 40px; height: 40px; flex-basis: 40px; }
  .safety-result-lead h3 { font-size: 18px; }
  .safety-checklist li { padding: 13px; gap: 10px; }
  .safety-checklist p { font-size: 12px; }
  .safety-result-actions { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .safety-layout *, .safety-steps * { scroll-behavior: auto; transition: none !important; animation: none !important; }
}
/* One situation at a time, with neutral surfaces around the exercise. */
.safety-work .safety-explanation { display: block; background: none; border: 0; border-radius: 0; padding: 0; margin: 0 0 25px; color: var(--muted, #716b7b); font-size: 14px; }
.safety-work .safety-explanation p { font-size: inherit; color: inherit; }
.safety-work .safety-card { padding: 18px 0 0; border: 0; border-radius: 0; }
.safety-work .safety-card legend { padding: 0; font-size: 16px; }
.safety-work .safety-card .safety-card-text { font-size: 14px; }
.safety-work .safety-choice { font-size: 13px !important; border-color: #dedce3; }
.safety-work .safety-choice.selected { background: #f4f0fc; border-color: var(--purple, #6440bf); box-shadow: none; }
.safety-question-position { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line, #e7e4ec); color: var(--muted, #716b7b); font-size: 12px; }
.safety-question-position > span { white-space: nowrap; }
.safety-question-position label { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 0; }
.safety-question-position select { max-width: 280px; width: 100%; min-width: 0; padding: 9px 30px 9px 12px; border: 1px solid #dedce3; border-radius: 7px; color: var(--ink, #272332); background: #fff; font: inherit; font-size: 12px; }
.safety-question-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.safety-question-actions > :only-child { margin-left: auto; }
.safety-question-actions .safety-check-action { margin: 0; }
.safety-question-actions .safety-feedback { flex-basis: 100%; }
.safety-completed-selection { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line, #e7e4ec); }
.safety-completed-selection > span { display: flex; gap: 9px; align-items: center; font-size: 13px; }
.safety-model-block { margin-top: 22px; padding-top: 0; border: 0; }
.safety-work .safety-safe-prompt { background: #f7f7f8; color: var(--ink, #272332); border: 0; border-radius: 8px; font-size: 14px; }
.safety-work .safety-model-answer { border: 0; padding: 0; border-radius: 0; }
.safety-work .safety-answer-text { font-size: 14px; }
.safety-sent-prompt summary { cursor: pointer; font-size: 13px; }
.safety-work .safety-document { padding: 0; border: 0; border-radius: 0; background: none; }
.safety-work .safety-document-row { margin-top: 0; border-width: 1px 0 0; border-color: var(--line, #e7e4ec); border-radius: 0; padding: 15px 12px; }
.safety-work .safety-document-row > strong { font-size: 14px; }
.safety-rules .safety-rules-notice { padding: 0; background: none; border-radius: 0; }
.safety-work .safety-checklist li { background: none; padding: 14px 0; border-width: 0 0 1px; border-radius: 0; }
.safety-work .safety-checklist li > span { background: none; color: var(--muted, #716b7b); }
.safety-work .safety-checklist p { font-size: 14px; }
@media (max-width: 650px) {
  .safety-question-position { align-items: flex-start; flex-direction: column; gap: 10px; }
  .safety-question-position label, .safety-question-position select { width: 100%; max-width: 100%; }
  .safety-question-actions { align-items: stretch; }
  .safety-question-actions .btn { flex-grow: 1; }
  .safety-completed-selection { align-items: flex-start; }
}
.safety-layout.without-rules { grid-template-columns: minmax(0, 1fr); }
