.review-state-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: .22rem .6rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 850;
  white-space: nowrap;
}
.state-pending { color: #654900; background: #fff2c6; }
.state-approved { color: #124f45; background: #e0f4ed; }
.state-revision { color: #74232d; background: #fdebed; }
.state-rejected { color: #5c2630; background: #f6e5e8; }

.compact-action { min-height: 2rem; padding: .35rem .65rem; }
.review-nav-links { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.review-nav-links a { font-weight: 800; text-decoration: none; }

.review-action-card { border-top: .28rem solid #176c74; }
.current-review-state {
  display: grid;
  gap: .25rem;
  margin: .7rem 0 1rem;
  padding: .8rem;
  border-radius: .55rem;
}
.current-review-state small { color: #526a78; }
.decision-form { display: grid; gap: .65rem; margin-top: .75rem; }
.decision-form label { font-weight: 800; }
.decision-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 5rem;
  padding: .65rem .75rem;
  color: #153044;
  background: #fff;
  border: 1px solid #8299a5;
  border-radius: .5rem;
}
.full-action { width: 100%; }
.needs-revision-action { color: #74232d; border-color: #c98f96; }
.workflow-note { margin: .75rem 0 0; color: #526a78; font-size: .82rem; line-height: 1.45; }
.optional { color: #6b7f8b; font-weight: 500; }
.expected-sequence { display: grid; gap: .45rem; margin: .4rem 0 0; padding-left: 1.5rem; }
.expected-sequence li { padding: .45rem .55rem; background: rgb(255 255 255 / 68%); border-radius: .35rem; }
.review-history-list { display: grid; gap: .75rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.review-history-list li { padding-bottom: .65rem; border-bottom: 1px solid #dbe5e9; }
.review-history-list p { margin: .3rem 0 0; }
.hash-value { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; }

.edit-layout { max-width: 1000px; margin-inline: auto; }
.edit-intro, .edit-card {
  padding: 1.25rem 1.4rem;
  background: #fff;
  border: 1px solid #d5e0e5;
  border-radius: .85rem;
  box-shadow: 0 .2rem .7rem rgb(24 55 70 / 7%);
}
.edit-intro h2 { margin: .25rem 0 .35rem; }
.review-edit-form { display: grid; gap: 1rem; }
.edit-card-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid #e2e9ec;
}
.edit-card-heading h3 { margin: .2rem 0 0; }
.edit-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.edit-field { display: grid; align-content: start; gap: .35rem; }
.edit-field label { font-weight: 800; }
.edit-field input:not([type="checkbox"]),
.edit-field select,
.edit-field textarea {
  width: 100%;
  padding: .65rem .75rem;
  color: #153044;
  background: #fff;
  border: 1px solid #8299a5;
  border-radius: .5rem;
}
.edit-field textarea { resize: vertical; min-height: 4.5rem; }
.edit-field input[type="checkbox"] { width: 1.2rem; height: 1.2rem; }
.edit-field-checkbox { grid-template-columns: auto 1fr; align-items: center; }
.edit-field-checkbox label { order: 2; }
.field-learner_prompt_fr,
.field-scene_fr,
.field-explanation_fr,
.field-clinical_rationale_fr,
.field-clinical_rationale_details_fr,
.field-rationale_references,
.field-expected_answer_fr,
.field-note,
[class*="field-option_text_"],
[class*="field-option_feedback_"],
[class*="field-sequence_step_"],
[class*="field-scenario_state_"],
[class*="field-scenario_choice_text_"],
[class*="field-scenario_choice_feedback_"],
.field-threshold_population,
.field-threshold_context,
.field-threshold_action {
  grid-column: 1 / -1;
}
.field-help { color: #526a78; }
.field-errors, .field-errors ul { margin: 0; padding: 0; color: #8b2530; list-style: none; font-weight: 700; }
.sticky-edit-actions {
  position: static;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .65rem;
  padding: .8rem;
  background: rgb(238 243 245 / 94%);
  border: 1px solid #d5e0e5;
  border-radius: .7rem;
  backdrop-filter: blur(6px);
}
.sticky-edit-actions .workflow-note { margin: 0 auto 0 0; }
.message.error { color: #74232d; background: #fdebed; border-left-color: #b23a48; }

@media (min-width: 1000px) {
  .review-action-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .edit-fields { grid-template-columns: 1fr; }
  .edit-field { grid-column: 1 !important; }
  .review-toolbar { align-items: flex-start; }
  .sticky-edit-actions { flex-direction: column-reverse; align-items: stretch; }
  .sticky-edit-actions .workflow-note { margin: 0; text-align: center; }
  .sticky-edit-actions a, .sticky-edit-actions button { width: 100%; }
}
