/* Passo 34 — autoria guiada, compacta e responsiva */
.ex-authoring-flow,
.ex-authoring-workspace {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ex-authoring-hero { min-height: 225px; }
.ex-authoring-progress {
  min-width: 112px;
  padding: 1rem;
  display: grid;
  gap: .15rem;
  text-align: center;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 16px 5px;
  background: rgb(255 255 255 / 6%);
}
.ex-authoring-progress strong { color: #f1ce89; font-size: 1.55rem; }
.ex-authoring-progress small { color: #9fb3bf; font-size: .62rem; }

.ex-authoring-flow { max-width: 1040px; margin: 0 auto 2rem; }
.ex-question-editor { max-width: 980px; margin-inline: auto; }
.ex-authoring-stage {
  margin-bottom: .65rem;
  overflow: hidden;
  border: 1px solid #d8e3e8;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 7px 22px rgb(8 38 60 / 4%);
  scroll-margin-top: 90px;
}
.ex-authoring-stage > summary {
  min-height: 72px;
  padding: .75rem .9rem;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  cursor: pointer;
  list-style: none;
}
.ex-authoring-stage > summary::-webkit-details-marker { display: none; }
.ex-authoring-stage > summary > span:nth-child(2) { display: grid; gap: .1rem; }
.ex-authoring-stage > summary strong { color: #173447; font-size: .92rem; }
.ex-authoring-stage > summary small { color: #718591; font-size: .65rem; }
.ex-authoring-stage > summary b { color: #6d7f89; font-size: .62rem; font-weight: 800; }
.ex-stage-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #245269;
  background: #eaf1f4;
  border-radius: 11px 4px;
  font-size: .7rem;
  font-weight: 900;
}
.ex-authoring-stage.is-active { border-color: #4d9a93; box-shadow: 0 12px 30px rgb(22 115 106 / 9%); }
.ex-authoring-stage.is-active > summary { background: #f4fbf9; }
.ex-authoring-stage.is-complete .ex-stage-number { color: #fff; background: #168477; }
.ex-authoring-stage.is-complete > summary b { color: #176b5e; }
.ex-stage-body { padding: 1rem; border-top: 1px solid #e3eaee; background: #fbfcfd; }
.ex-stage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .75rem; }
.ex-field-wide, .ex-stage-actions { grid-column: 1 / -1; }
.ex-authoring-flow label:not(.ex-check) {
  margin: 0;
  display: grid;
  align-content: end;
  gap: .32rem;
  color: #294351;
  font-weight: 750;
}
.ex-authoring-flow input:not([type="checkbox"]),
.ex-authoring-flow select,
.ex-authoring-flow textarea {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #c7d8df;
  background: #fff;
  color: #162e41;
}
.ex-authoring-flow select[multiple] { min-height: 7rem; }
.ex-stage-actions {
  padding-top: .2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
}
.ex-stage-submit { justify-content: space-between; }
.ex-stage-submit > span { color: #6b7f8b; font-size: .68rem; }

.ex-compact-form { font-size: .84rem; line-height: 1.4; }
.ex-compact-form .ex-form,
.ex-compact-form.ex-form { gap: .7rem; }
.ex-compact-form label { gap: .32rem; font-size: .76rem; }
.ex-compact-form input,
.ex-compact-form select,
.ex-compact-form textarea {
  padding: .68rem .72rem;
  border-radius: 8px;
  font-size: .84rem;
}
.ex-compact-form textarea { min-height: 76px; }
.ex-compact-form select[multiple] { min-height: 7rem; }
.ex-compact-form label small { margin-top: .15rem; font-size: .63rem; line-height: 1.35; }
.ex-compact-form label.ex-check { min-height: 48px; padding: .65rem .75rem; }
.ex-compact-form .ex-option-authoring { padding: .65rem; border-radius: 11px; }
.ex-compact-form [data-question-authoring] { display: grid; gap: .7rem; }
.ex-compact-form .ex-option-authoring-row {
  margin-top: .38rem;
  grid-template-columns: minmax(0, 1fr) 132px 82px;
  align-items: end;
  gap: .4rem;
}
.ex-compact-form .ex-option-authoring-row > label { gap: .22rem; }
.ex-compact-form .ex-option-authoring-row input,
.ex-compact-form .ex-option-authoring-row select { min-height: 38px; height: 38px; }
.ex-compact-form .ex-option-authoring-row .quiet-button {
  min-height: 38px;
  height: 38px;
  padding: .45rem .55rem;
  border: 1px solid #d5e0e5;
  border-radius: 8px;
  background: #fff;
  font-size: .68rem;
}
.ex-compact-form .ex-correct-control {
  min-height: 38px;
  height: 38px;
  padding: 0 .55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  box-sizing: border-box;
  border: 1px solid #d5e0e5;
  border-radius: 8px;
  background: #fff;
  font-size: .7rem;
}
.ex-compact-form .ex-correct-control input {
  width: auto;
  min-height: 0;
  height: auto;
  margin: 0;
}
.ex-compact-form .ex-truth-control { display: grid; gap: .22rem; }
.ex-compact-form .ex-private-answer-key { padding: .8rem; }

.ex-authoring-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 1rem;
  align-items: start;
}
.ex-authoring-workspace > .ex-panel { min-width: 0; }
.ex-compact-heading {
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.ex-compact-heading h2, .ex-compact-heading p { margin-bottom: 0; }
.ex-compact-heading > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #173e53;
  border-radius: 11px 4px;
  font-weight: 900;
}
.ex-compact-heading > a { font-size: .69rem; font-weight: 800; text-decoration: none; }
.ex-bank-drawer { padding: 1rem; }
.ex-bank-drawer > form { display: grid; gap: .75rem; }
.ex-bank-compact-list { display: grid; gap: .45rem; }
.ex-bank-compact-item {
  padding: .65rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .55rem;
  border: 1px solid #dce5e9;
  border-radius: 10px;
  background: #f8fafb;
  cursor: pointer;
}
.ex-bank-compact-item:has(input:checked) { border-color: #4b9a8e; background: #eef9f5; }
.ex-bank-compact-item input { margin-top: .2rem; accent-color: #168477; }
.ex-bank-compact-item span, .ex-bank-compact-item strong, .ex-bank-compact-item small { display: block; }
.ex-bank-compact-item strong {
  overflow: hidden;
  color: #173447;
  font-size: .75rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.ex-bank-compact-item small { margin-top: .25rem; color: #718591; font-size: .61rem; }
.ex-bank-drawer .ex-button { width: 100%; min-height: 42px; padding: .6rem .75rem; font-size: .76rem; }
.ex-bank-drawer-footer { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid #e2e9ed; }
.ex-bank-drawer-footer form, .ex-bank-drawer-footer button { width: 100%; margin: 0; }

.ex-management-setup {
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.ex-management-setup.has-academic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ex-setup-card {
  min-width: 0;
  padding: .85rem;
  display: grid;
  align-content: start;
  gap: .65rem;
  background: #fff;
  border: 1px solid #dce6e8;
  border-radius: 13px;
  box-shadow: 0 7px 20px rgb(8 38 60 / 4%);
}
.ex-setup-card header { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; }
.ex-setup-card header p, .ex-setup-card h3 { margin: 0; }
.ex-setup-card .ex-kicker { font-size: .55rem; }
.ex-setup-card h3 { color: #173447; font-size: .91rem; }
.ex-compact-select { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.ex-compact-select select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: .5rem .6rem;
  box-sizing: border-box;
  border: 1px solid #c7d8df;
  border-radius: 8px;
  background: #fff;
  color: #173447;
  font: inherit;
  font-size: .73rem;
}
.ex-compact-select .ex-button { min-height: 38px; padding: .45rem .65rem; font-size: .68rem; }
.ex-person-tags { min-height: 25px; display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.ex-person-tags > span {
  padding: .28rem .35rem .28rem .55rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #245269;
  background: #edf4f6;
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 750;
}
.ex-person-tags small { color: #7a8b94; font-size: .65rem; }
.ex-person-tags form { margin: 0; display: inline-flex; }
.ex-person-tags button {
  width: auto;
  min-height: 26px;
  padding: .2rem .5rem;
  white-space: nowrap;
  display: grid;
  place-items: center;
  color: #7c3c46;
  background: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}
.ex-setup-link { color: #176f66; font-size: .67rem; font-weight: 800; text-decoration: none; }

@media (max-width: 900px) {
  .ex-authoring-workspace { grid-template-columns: 1fr; }
  .ex-bank-drawer { order: -1; }
  .ex-management-setup,
  .ex-management-setup.has-academic { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .ex-authoring-hero { min-height: 190px; }
  .ex-authoring-progress { min-width: 94px; padding: .75rem; }
  .ex-stage-grid { grid-template-columns: 1fr; }
  .ex-field-wide, .ex-stage-actions { grid-column: auto; }
  .ex-authoring-stage > summary { grid-template-columns: 38px minmax(0, 1fr); }
  .ex-authoring-stage > summary b { grid-column: 2; }
  .ex-stage-actions, .ex-stage-submit { align-items: stretch; flex-direction: column; }
  .ex-stage-actions .ex-button { width: 100%; }
  .ex-compact-form .ex-option-authoring-row { grid-template-columns: 1fr; }
}
