:root {
  --bg-0: #eceadf;
  --bg-1: #fffdf6;
  --ink-0: #1f221d;
  --ink-1: #4d5447;
  --ink-2: #687262;
  --line: #cfd4c6;
  --line-strong: #a6af9a;
  --accent: #0d7f71;
  --accent-2: #efb347;
  --text-green: var(--accent);
  --input-text-dark: #343a33;
  --panel: rgba(255, 255, 250, 0.88);
  --shadow: 0 18px 40px rgba(20, 20, 12, 0.11);
  --focus-ring: rgba(13, 127, 113, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Sora', sans-serif;
  color: var(--ink-0);
  line-height: 1.45;
  background: radial-gradient(circle at top right, #e1f0e8 0%, transparent 40%),
    radial-gradient(circle at left center, #f9e8d2 0%, transparent 45%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  min-height: 100vh;
}

.background-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(18, 18, 14, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 18, 14, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

.layout {
  width: min(1160px, 92vw);
  margin: 30px auto 40px;
  display: grid;
  gap: 18px;
  align-items: start;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-areas:
    'hero hero'
    'controls output';
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.hero {
  grid-area: hero;
  padding: 26px;
  overflow: hidden;
  position: relative;
  border-color: rgba(141, 152, 132, 0.9);
  background: radial-gradient(125% 110% at 0% 0%, rgba(13, 127, 113, 0.17) 0%, transparent 55%),
    radial-gradient(90% 120% at 100% 0%, rgba(239, 179, 71, 0.2) 0%, transparent 54%),
    linear-gradient(145deg, rgba(255, 255, 252, 0.93), rgba(248, 246, 238, 0.9));
  cursor: default;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.6) 0 38%, transparent 56%),
    repeating-linear-gradient(-48deg, rgba(13, 127, 113, 0.08) 0 2px, transparent 2px 14px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  right: -72px;
  top: -92px;
  width: 278px;
  height: 278px;
  background: radial-gradient(
    circle at 31% 31%,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(28, 157, 141, 0.35) 32%,
    rgba(13, 127, 113, 0.08) 67%,
    transparent 100%
  );
  opacity: 0.86;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 8px;
}

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.25rem);
  font-weight: 650;
  line-height: 1.25;
  max-width: 760px;
  color: var(--text-green);
}

.subtitle {
  margin: 14px 0 0;
  font-size: 0.95rem;
  line-height: 1.58;
}

.hero-rules {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  color: var(--ink-1);
  font-size: 0.9rem;
}

.hero-rules li {
  line-height: 1.5;
}

.hero-example-label {
  margin: 12px 0 6px;
  font-size: 0.82rem;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.hero-example {
  margin: 0;
  padding: 12px 6px;
  border: 1px solid rgba(16, 74, 66, 0.19);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  overflow: auto;
}

.hero-example code {
  display: block;
  white-space: pre;
  font-size: 0.82rem;
  line-height: 1.5;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* Keep scrollbars visually inside rounded containers. */
:is(.hero-example, .output-panel, .output-json, .rich-editor, textarea) {
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 89, 77, 0.52) transparent;
  background-clip: padding-box;
}

:is(.hero-example, .output-panel, .output-json, .rich-editor, textarea)::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

:is(.hero-example, .output-panel, .output-json, .rich-editor, textarea)::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px;
}

:is(.hero-example, .output-panel, .output-json, .rich-editor, textarea)::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  background-color: rgba(79, 89, 77, 0.52);
}

:is(.hero-example, .output-panel, .output-json, .rich-editor, textarea)::-webkit-scrollbar-thumb:hover {
  background-color: rgba(79, 89, 77, 0.68);
}

:is(.hero-example, .output-panel, .output-json, .rich-editor, textarea)::-webkit-scrollbar-button,
:is(.hero-example, .output-panel, .output-json, .rich-editor, textarea)::-webkit-scrollbar-button:single-button {
  width: 0;
  height: 0;
  display: none;
}

:is(.hero-example, .output-panel, .output-json, .rich-editor, textarea)::-webkit-scrollbar-corner {
  background: transparent;
}

code {
  font-family: 'IBM Plex Mono', monospace;
  background: rgba(10, 124, 111, 0.1);
  padding: 1px 6px;
  border-radius: 8px;
}

.controls {
  grid-area: controls;
  padding: 22px;
  display: grid;
  gap: 16px;
}

.workflow-container {
  position: relative;
}

.loading-banner {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(248, 249, 245, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.loading-banner-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(420px, calc(100vw - 24px));
  max-width: 100%;
  text-align: center;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(13, 127, 113, 0.35);
  box-shadow: 0 12px 28px rgba(17, 38, 34, 0.18);
  background: rgba(255, 255, 252, 0.95);
  color: #0b655a;
  font-size: 0.84rem;
  font-weight: 500;
}

.loading-banner[hidden] {
  display: none;
}

.loading-spinner {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 2px solid rgba(13, 127, 113, 0.25);
  border-top-color: rgba(13, 127, 113, 0.95);
  animation: spinner-rotate 0.7s linear infinite;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.workflow-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 5px;
  border: 1px solid rgba(16, 74, 66, 0.19);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.tab-button {
  border: 1px solid rgba(16, 74, 66, 0.16);
  border-radius: 10px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-1);
  font-weight: 520;
}

.tab-button.active {
  background: linear-gradient(120deg, rgba(10, 124, 111, 0.2), rgba(242, 182, 50, 0.26));
  border-color: rgba(10, 124, 111, 0.42);
  color: var(--ink-0);
}

.workflow {
  border: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  display: grid;
  gap: 14px;
}

.workflow-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 620;
  line-height: 1.3;
  color: var(--text-green);
  cursor: default;
}

.workflow-subtitle {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-green);
  cursor: default;
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel.active {
  animation: panel-fade-in 180ms ease-out;
}

@keyframes panel-fade-in {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.controls-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.controls-toolbar h2 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 640;
  letter-spacing: -0.01em;
  color: var(--text-green);
}

.toolbar-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.toolbar-actions > button {
  width: 100%;
}

.quiz-tree {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  max-height: none;
  overflow: visible;
  display: grid;
  gap: 10px;
}

.quiz-tree-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.course-group {
  border: 1px solid rgba(16, 74, 66, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.course-group summary {
  cursor: pointer;
  padding: 10px 11px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink-0);
}

.course-group[open] summary {
  border-bottom: 1px solid rgba(16, 74, 66, 0.11);
}

.course-content {
  padding: 9px 11px 11px;
  display: grid;
  gap: 10px;
}

.section-group {
  display: grid;
  gap: 7px;
}

.section-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 530;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.quiz-links {
  display: grid;
  gap: 6px;
}

.quiz-link {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(16, 74, 66, 0.18);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(10, 124, 111, 0.05);
  color: var(--ink-0);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.quiz-link:hover {
  transform: none;
  filter: brightness(1.01);
}

.quiz-link.active {
  background: rgba(10, 124, 111, 0.18);
  border-color: rgba(10, 124, 111, 0.46);
}

.quiz-link-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.quiz-link-meta {
  display: block;
  font-size: 0.76rem;
  margin-top: 3px;
  color: var(--ink-2);
}

.selected-quiz-meta {
  border: 1px dashed rgba(16, 74, 66, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px 13px;
  display: grid;
  gap: 4px;
  cursor: default;
}

.selected-quiz-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 630;
}

.selected-quiz-line {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-2);
}

.selected-quiz-warning {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: #8a4a00;
}

.output {
  grid-area: output;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-self: start;
  position: sticky;
  top: 1vh;
  height: calc(100vh - 2vh);
  height: calc(100dvh - 2vh);
  min-height: 0;
  max-height: calc(100vh - 2vh);
  max-height: calc(100dvh - 2vh);
  overflow: hidden;
  cursor: default;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  font-weight: 640;
  letter-spacing: -0.01em;
  color: var(--text-green);
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  cursor: default;
}

.output-header h2 {
  margin: 0;
}

.output-panel {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  background: transparent;
  box-shadow: none;
  padding: 12px 2px;
  border: 1px solid rgba(14, 56, 50, 0.15);
  border-radius: 14px;
}

.output-summary {
  display: grid;
  gap: 12px;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.output-panel.mode-json .output-summary {
  display: none;
}

.output-panel.mode-summary .output-json {
  display: none;
}

.summary-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.summary-card-lead {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(16, 74, 66, 0.16);
  border-radius: 12px;
  padding: 14px;
}

.summary-headline {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 610;
}

.summary-meta {
  margin: 7px 0 0;
  color: var(--ink-2);
  font-size: 0.85rem;
}

.question-card-title {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 620;
}

.question-stem {
  margin: 8px 0 0;
  color: var(--ink-0);
  line-height: 1.45;
}

.answers-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.answer-item {
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(10, 124, 111, 0.06);
  border: 1px solid rgba(10, 124, 111, 0.12);
  font-size: 0.86rem;
}

.answer-item.correct {
  background: rgba(10, 124, 111, 0.14);
  border-color: rgba(10, 124, 111, 0.35);
  font-weight: 600;
}

.summary-note {
  font-size: 0.82rem;
  color: var(--ink-2);
  margin: 2px 0 0;
}

.row {
  display: grid;
  gap: 14px;
}

.row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.row[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field-label {
  font-size: 0.86rem;
  font-weight: 540;
  letter-spacing: 0.01em;
  color: var(--text-green);
  line-height: 1.35;
}

.field-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-green);
  opacity: 0.75;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea,
.rich-editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--input-text-dark);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
  font-size: 0.89rem;
}

input::placeholder,
textarea::placeholder {
  color: #8b9584;
}

select {
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, #4f594d 50%),
    linear-gradient(135deg, #4f594d 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px), 100% 0;
  background-size: 5px 5px, 5px 5px, 2.5em 100%;
  background-repeat: no-repeat;
}

textarea, .rich-editor {
  resize: vertical;
  min-height: 360px;
  line-height: 1.55;
  max-height: 560px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* .rich-editor {
  width: 100%;
  min-height: 360px;
  max-height: 560px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 4px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--input-text-dark);
  line-height: 1.55;
  overflow-y: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
} */

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.rich-editor:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
}

.field.field-missing .field-label {
  color: #a33a3a;
}

input.field-missing,
select.field-missing,
textarea.field-missing,
.rich-editor.field-missing,
.quiz-tree.field-missing,
.selected-quiz-meta.field-missing {
  border-color: #c84e4e;
  box-shadow: 0 0 0 3px rgba(200, 78, 78, 0.2);
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(70, 68, 62, 0.58);
}

.inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  font-size: 0.89rem;
  font-weight: 520;
  transition: transform 0.14s ease, filter 0.14s ease, opacity 0.14s ease, background-color 0.14s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

button:active {
  transform: translateY(0);
}

button.primary {
  background: linear-gradient(120deg, var(--accent), #1f9d8f);
  color: #fff;
  font-weight: 600;
}

button.ghost {
  background: #edf0e5;
  color: var(--ink-0);
  border: 1px solid rgba(79, 89, 77, 0.22);
}

.actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  padding-top: 6px;
}

.validate-action {
  display: flex;
  justify-content: flex-start;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  filter: grayscale(0.14);
}

button:disabled:hover {
  transform: none;
  filter: none;
}

.rich-editor[aria-disabled='true'] {
  cursor: not-allowed;
  user-select: none;
  opacity: 0.62;
  filter: grayscale(0.14);
}

body.is-ui-loading .controls,
body.is-ui-loading .output {
  user-select: none;
}

.output-json {
  margin: 0;
  background: #171a18;
  color: #ddffe0;
  border-radius: 12px;
  padding: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  min-height: 510px;
  max-height: 72vh;
  white-space: pre-wrap;
  overflow: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

button#updateSendButton, button#createSendButton {
  width: 100%;
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'hero'
      'controls'
      'output';
  }

  .row.two {
    grid-template-columns: 1fr;
  }

  .output {
    position: static;
    top: auto;
    height: auto;
    min-height: 300px;
    max-height: none;
    padding: 18px;
  }

  .output-panel {
    padding: 12px;
  }

  .output-json {
    min-height: 260px;
  }

  .hero-example {
    overflow-x: hidden;
  }

  .hero-example code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .controls {
    padding: 18px;
  }

  .hero {
    padding: 18px;
  }

  .toolbar-actions {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .hero-example {
    padding: 12px;
  }
}

/* ---------- Modal de configurações do quiz ---------- */

.row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-1);
  color: var(--ink-0);
  box-shadow: var(--shadow);
}

.settings-modal::backdrop {
  background: rgba(20, 20, 12, 0.42);
  backdrop-filter: blur(2px);
}

.settings-modal-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}

.settings-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.settings-modal-header h2 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 640;
  letter-spacing: -0.01em;
  color: var(--text-green);
}

.settings-modal-subtitle {
  margin: 6px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 60ch;
}

.settings-modal-body {
  display: grid;
  gap: 18px;
  padding: 20px 24px;
  overflow-y: auto;
}

.settings-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--line);
}

.settings-modal-actions {
  display: flex;
  gap: 12px;
}

.settings-group {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.settings-group legend {
  padding: 0 8px;
  font-size: 0.86rem;
  font-weight: 640;
  color: var(--text-green);
}

.settings-source-hint,
.settings-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.settings-source-hint {
  background: #edf0e5;
  color: var(--ink-1);
  border: 1px solid var(--line);
}

.settings-error {
  background: #fdeceb;
  color: #8f2a22;
  border: 1px solid #f0c4c0;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.35;
}

.checkbox-field input[type='checkbox'],
.review-grid input[type='checkbox'] {
  width: 17px;
  height: 17px;
  flex: none;
  margin: 0;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--accent);
}

.completion-conditions {
  display: grid;
  gap: 12px;
}

.completion-conditions[hidden] {
  display: none;
}

.field.inline-number {
  max-width: 220px;
}

.review-grid-scroll {
  overflow-x: auto;
}

.review-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.review-grid th,
.review-grid td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.review-grid thead th {
  font-weight: 600;
  color: var(--text-green);
  white-space: nowrap;
}

.review-grid tbody th {
  text-align: left;
  font-weight: 480;
  color: var(--ink-1);
  white-space: nowrap;
}

.review-grid tbody tr:last-child th,
.review-grid tbody tr:last-child td {
  border-bottom: none;
}

.final-feedback-list {
  display: grid;
  gap: 12px;
}

.final-feedback-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

/* Rótulo vazio reserva a altura do label; o botão centraliza no resto da linha. */
.final-feedback-remove {
  align-self: stretch;
  grid-template-rows: auto 1fr;
  align-items: center;
  justify-items: start;
}

/* The global textarea rule sizes the quiz text editors; feedback messages are short. */
.final-feedback-row textarea {
  min-height: 76px;
  max-height: 220px;
}

.icon-button {
  width: 34px;
  height: 34px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink-1);
  background: #edf0e5;
  border: 1px solid rgba(79, 89, 77, 0.22);
  border-radius: 10px;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--ink-0);
  border-color: var(--line-strong);
}

@media (max-width: 720px) {
  .row.three {
    grid-template-columns: minmax(0, 1fr);
  }

  .final-feedback-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .final-feedback-row .field:first-child {
    grid-column: 1 / -1;
  }
}
