.approved-resource-section,
.suggested-resource-section,
.lesson-approved-resources {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.approved-resource-section:first-child { margin-top: 0; }

.approved-resource-section h3,
.suggested-resource-section h3,
.lesson-approved-resources h3,
.approved-resource-form h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.lesson-approved-resources > p {
  margin: 0 0 12px;
  color: var(--muted);
}

.approved-resource-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.approved-resource-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.approved-resource-content {
  min-width: 0;
  flex: 1;
}

.approved-resource-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.approved-resource-list a > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approved-resource-list a > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.resource-engagement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.resource-engagement > strong { font-weight: 700; }
.resource-engagement.status-helpful > strong { color: var(--green); }
.resource-engagement.status-needs_help > strong { color: var(--orange); }

.resource-feedback-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.resource-feedback-actions > span { color: var(--muted); }

.resource-feedback-actions button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}

.resource-feedback-actions button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--surface-subtle);
  color: var(--accent-dark);
}

.approved-resource-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.approved-resource-form > label,
.approved-resource-form > div > label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.approved-resource-form > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.approved-resource-form input,
.approved-resource-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.approved-resource-form button { justify-self: start; }

.approved-resource-form output {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.approved-resource-form output.error { color: #b42318; }

@media (max-width: 520px) {
  .approved-resource-list li,
  .approved-resource-list a {
    align-items: flex-start;
  }

  .approved-resource-list a {
    flex-direction: column;
    gap: 7px;
  }

  .approved-resource-list a > strong { white-space: normal; }

  .resource-engagement {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-feedback-actions { justify-content: flex-start; }
  .approved-resource-form > div { grid-template-columns: 1fr; }
}
