/* Research Design workspace — document-first (.rd-*) */

.rd-shell {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: var(--bg, var(--bg-page));
  color: var(--text);
}

.rd-header {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 20%, transparent));
  background: var(--card-bg);
  flex-shrink: 0;
}

.rd-header__lead {
  display: flex;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.rd-header__title-block {
  min-width: 0;
  flex: 1;
}

.rd-header__workspace-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rd-header__project-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  min-width: 0;
}

.rd-header__project-title {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  padding: 4px 0;
  outline: none;
}

.rd-header__project-title::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.rd-header__project-title:focus {
  box-shadow: 0 1px 0 0 var(--accent, #6366f1);
}

.rd-header__project-title--readonly {
  cursor: default;
  user-select: text;
}

.rd-header__status {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.rd-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.rd-header__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text-muted) 16%, transparent);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.rd-header__close:hover {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text);
  border-color: color-mix(in srgb, var(--text-muted) 28%, transparent);
}

.rd-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.rd-nav {
  width: 220px;
  flex-shrink: 0;
  padding: 24px 12px 24px 20px;
  border-right: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 15%, transparent));
  background: var(--card-bg);
}

.rd-nav__label {
  margin: 0 0 12px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rd-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rd-nav__item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.rd-nav__item:hover {
  background: color-mix(in srgb, var(--text-muted) 8%, transparent);
  color: var(--text);
}

.rd-nav__item--active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text);
  font-weight: 600;
}

.rd-nav__item--future {
  display: none;
}

.rd-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px 20px 32px;
}

.rd-main > .rd-step {
  width: 100%;
}

.rd-step {
  max-width: 720px;
}

.rd-step--split {
  max-width: none;
}

.rd-step--wide {
  max-width: none;
}

.rd-step--wide > .rd-step__subtitle {
  max-width: none;
}

.rd-step--split > .rd-step__subtitle {
  margin-bottom: 14px;
  max-width: none;
}

.rd-step-split {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-height: calc(100vh - 220px);
}

.rd-step-split__editor {
  flex: 6;
  min-width: 0;
}

.rd-step-split__aside {
  flex: 4;
  min-width: 300px;
  max-width: 44%;
  flex-shrink: 0;
  position: sticky;
  top: 8px;
}

.rd-step-split__editor .rd-editor {
  min-height: calc(100vh - 240px);
  height: calc(100vh - 240px);
  max-height: calc(100vh - 240px);
  resize: none;
}

.rd-step-split__aside .rd-toolbar {
  flex-direction: column;
  align-items: stretch;
  margin-top: 0;
  gap: 10px;
}

.rd-step-split__aside .rd-toolbar__hint {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.rd-step-split__aside .rd-toolbar__hint--saved {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.32);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.06);
}

.rd-step-split__aside .rd-toolbar__hint--saved::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
  flex-shrink: 0;
}

.rd-step-split__aside .rd-toolbar__hint--dirty {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.rd-step-split__aside .rd-toolbar__hint--dirty::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  flex-shrink: 0;
}

.rd-step-split__aside .rd-toolbar__hint--empty {
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text-muted) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-muted) 14%, transparent);
}

.rd-step-split__aside .rd-toolbar__hint--flash {
  animation: rd-status-flash 0.7s ease;
}

@keyframes rd-status-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

.rd-step-split__aside .rd-toolbar__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-self: flex-start;
  gap: 6px;
}

.rd-step-split__aside .rd-toolbar__actions .btn,
.rd-step-split__aside .rd-generate-zone__actions .btn {
  flex: 0 1 auto;
  min-width: 0;
  justify-content: center;
  padding: 5px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 28px;
  border-radius: 7px;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}

.rd-step-split__aside .rd-generate-zone {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 12%, transparent));
}

.rd-step-split__aside .rd-generate-zone__label {
  margin-bottom: 8px;
}

.rd-generate-zone__actions {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.rd-step-split__aside .rd-generate-zone .rd-length-picker {
  margin-bottom: 10px;
}

.rd-step-split__aside .rd-length-option {
  flex: 1 1 100%;
  border-radius: 10px;
}

.rd-import-zone {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 15%, transparent));
}

.rd-import-zone__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.rd-import-zone__actions .btn {
  flex: 1 1 auto;
  font-size: 0.82rem;
  padding: 7px 12px;
}

.rd-step-split__aside .rd-import-zone .rd-generate-zone__label {
  margin-bottom: 8px;
}

.rd-step-split__aside .rd-suggestions {
  width: 100%;
  max-height: calc(100vh - 430px);
  overflow-y: auto;
  padding-right: 2px;
}

.rd-step-split__aside #rd-purpose-suggestions,
.rd-step-split__aside #rd-questions-suggestions {
  width: 100%;
}

.rd-step-split__aside .rd-suggestion {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.rd-step-split__aside .rd-suggestion .btn {
  align-self: stretch;
  width: 100%;
}

.rd-step-split__aside .rd-suggestion__text {
  font-size: 0.84rem;
  line-height: 1.5;
}

.rd-step-split__editor .rd-rq-panel {
  margin-bottom: 12px;
}

.rd-step-split__editor .rd-rq-custom {
  margin-top: 0;
}

.rd-step[hidden] {
  display: none !important;
}

.rd-step__heading {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.rd-step__subtitle {
  margin: 0 0 28px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 540px;
}

.rd-editor-wrap {
  position: relative;
}

.rd-editor-wrap--formatted {
  display: flex;
  flex-direction: column;
}

.rd-format-host {
  margin-bottom: 10px;
}

.rd-format-host .rd-format-bar {
  border-radius: 10px;
}

.rd-format-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 20%, transparent));
  border-radius: 10px 10px 0 0;
  background: var(--card-bg);
}

.rd-editor-wrap--formatted .rd-format-bar {
  border-bottom: none;
  margin-bottom: 0;
}

.rd-editor-wrap--formatted .rd-editor {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.rd-format-bar__size-wrap {
  display: inline-flex;
  margin: 0;
}

.rd-format-bar__size {
  min-width: 52px;
  height: 32px;
  padding: 4px 28px 4px 10px;
  border: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 25%, transparent));
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.rd-format-bar__align {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rd-format-bar__align-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rd-format-bar__align-btn:hover {
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
  color: var(--text);
}

.rd-format-bar__align-btn.is-active {
  border-color: var(--card-border, color-mix(in srgb, var(--text-muted) 35%, transparent));
  background: color-mix(in srgb, var(--text-muted) 14%, transparent);
  color: var(--text);
}

.rd-editor {
  display: block;
  width: 100%;
  min-height: min(70vh, 640px);
  padding: 28px 32px;
  border: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 20%, transparent));
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", "Palatino Linotype", serif;
  font-size: 1.05rem;
  line-height: 1.75;
  resize: vertical;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rd-editor:focus {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.rd-editor::placeholder {
  color: var(--text-muted);
  opacity: 0.65;
  font-style: italic;
}

.rd-editor--streaming {
  opacity: 0.92;
}

.rd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.rd-toolbar__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.rd-toolbar__hint--dirty {
  color: var(--accent, #818cf8);
}

.rd-toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rd-toolbar__actions .btn {
  font-size: 0.85rem;
  padding: 7px 14px;
}

.rd-toolbar__actions .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.rd-generate-zone {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 12%, transparent));
}

.rd-generate-zone__label {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rd-suggestions {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rd-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 20%, transparent));
  border-radius: 10px;
  background: var(--card-bg);
}

.rd-suggestion__text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}

.rd-suggestion__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.rd-suggestion--added .rd-suggestion__text {
  opacity: 0.85;
}

.rd-suggestion--rejected .rd-suggestion__text {
  opacity: 0.75;
}

.rd-questions-purpose-preview {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid color-mix(in srgb, var(--accent, #5b8def) 55%, transparent);
  background: color-mix(in srgb, var(--card-bg) 92%, var(--accent, #5b8def) 8%);
}

.rd-questions-purpose-preview__label {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
}

.rd-questions-purpose-preview__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  max-height: 4.5em;
  overflow: hidden;
}

.rd-suggestion__add[disabled],
.rd-suggestion__add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  color: var(--text-muted);
  border-color: color-mix(in srgb, var(--text-muted) 35%, transparent);
  background: color-mix(in srgb, var(--text-muted) 8%, transparent);
}

.rd-questions-instructions {
  margin: 0 0 14px;
}

.rd-questions-instructions__label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.rd-questions-instructions__input {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 22%, transparent));
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  line-height: 1.45;
}

.rd-questions-instructions__hint {
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.rd-rq-panel {
  margin-bottom: 16px;
}

.rd-rq-empty {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.rd-rq-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rd-rq-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 20%, transparent));
  border-radius: 10px;
  background: var(--card-bg);
}

.rd-rq-item--selected {
  border-color: rgba(99, 102, 241, 0.35);
}

.rd-rq-item--primary {
  box-shadow: inset 3px 0 0 rgba(99, 102, 241, 0.65);
}

.rd-rq-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.rd-rq-item__check {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.rd-rq-item__text {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 20%, transparent));
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  letter-spacing: normal;
  word-break: break-word;
  white-space: pre-wrap;
  resize: vertical;
  overflow-y: hidden;
  background: var(--input-bg, transparent);
  color: var(--text);
}

@supports (field-sizing: content) {
  .rd-rq-item__text {
    field-sizing: content;
  }
}

.rd-rq-item__primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.rd-rq-item__reject {
  margin-left: auto;
}

.rd-rq-custom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.rd-rq-custom__input {
  flex: 1 1 100%;
  min-width: 0;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 20%, transparent));
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  letter-spacing: normal;
  resize: vertical;
  background: var(--input-bg, transparent);
  color: var(--text);
}

.rd-length-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.rd-length-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 25%, transparent));
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.rd-length-option input {
  accent-color: var(--accent, #6366f1);
}

.rd-length-option:has(input:checked) {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.08);
  color: var(--text);
}

.rd-busy {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 768px) {
  .rd-body {
    flex-direction: column;
  }

  .rd-nav {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--card-border, color-mix(in srgb, var(--text-muted) 15%, transparent));
    padding: 12px 16px;
  }

  .rd-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .rd-main {
    padding: 20px 16px 32px;
  }

  .rd-step-split {
    flex-direction: column;
    min-height: 0;
  }

  .rd-step-split__aside {
    width: 100%;
    max-width: none;
    min-width: 0;
    position: static;
  }

  .rd-step-split__aside .rd-toolbar__actions {
    flex-wrap: wrap;
    align-self: flex-start;
  }

  .rd-step-split__aside .rd-toolbar__actions .btn,
  .rd-step-split__aside .rd-generate-zone__actions .btn {
    flex: 0 1 auto;
  }

  .rd-step-split__editor .rd-editor {
    min-height: 50vh;
    height: auto;
    max-height: none;
    resize: vertical;
  }

  .rd-step-split__aside .rd-toolbar {
    flex-direction: row;
    margin-top: 16px;
  }

  .rd-step-split__aside .rd-toolbar__actions {
    flex-direction: row;
    align-self: flex-start;
  }

  .rd-step-split__aside .rd-generate-zone__actions .btn {
    width: auto;
  }

  .rd-editor {
    min-height: 50vh;
    padding: 20px 18px;
  }

  .rd-header {
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .rd-header__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.rd-hypothesis-block {
  margin-bottom: 24px;
}

.rd-hypothesis-context {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  font-size: 0.84rem;
  line-height: 1.4;
}

.rd-hypothesis-pairs-host {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.rd-hypothesis-pair-card {
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  width: 100%;
}

.rd-hypothesis-pair-card--expanded {
  padding: 0 12px 10px;
}

.rd-hypothesis-pair-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.rd-hypothesis-pair-card--expanded .rd-hypothesis-pair-card__head {
  padding-left: 0;
  padding-right: 0;
}

.rd-hypothesis-pair-card__chevron {
  flex-shrink: 0;
  width: 1.1rem;
  opacity: 0.7;
}

.rd-hypothesis-pair-card__primary {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, #6366f1);
}

.rd-hypothesis-pair-card__rq-preview {
  flex: 1;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rd-hypothesis-pair-card__rq-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.rd-hypothesis-pair-card__rq-text {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.rd-hypothesis-pair-card__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.rd-hypothesis-pair-card__dot--saved {
  background: #22c55e;
}

.rd-hypothesis-pair-card__dot--dirty {
  background: #f59e0b;
}

.rd-hypothesis-pair-card__grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

@media (min-width: 768px) {
  .rd-hypothesis-pair-card__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.rd-hypothesis-pair-card__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  min-width: 0;
}

.rd-hypothesis-pair-card__field > span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.rd-hypothesis-pair-card__field--full {
  margin-bottom: 6px;
}

.rd-hypothesis-pair-card .rd-editor--autogrow {
  min-height: 96px;
  max-height: none;
  height: auto;
  resize: vertical;
  overflow-y: hidden;
  padding: 12px 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  box-shadow: none;
}

.rd-hypothesis-pair-card .rd-editor--autogrow[data-field="expectation"] {
  min-height: 112px;
}

@supports (field-sizing: content) {
  .rd-hypothesis-pair-card .rd-editor--autogrow {
    field-sizing: content;
    min-height: 96px;
  }
  .rd-hypothesis-pair-card .rd-editor--autogrow[data-field="expectation"] {
    min-height: 112px;
  }
}

.rd-toolbar--pair {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.rd-generate-zone--inline {
  margin-bottom: 6px;
}

.rd-hypothesis-empty {
  margin: 12px 0 0;
  font-size: 0.88rem;
}

.rd-hypothesis-block__label {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.rd-editor--compact {
  min-height: 120px;
}
