:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #20342d;
  background: #f7f8f5;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px max(24px, calc((100vw - 1120px) / 2));
  background: #fff;
  border-bottom: 1px solid #e2e9e3;
}

.site-header > a:last-child {
  color: #176b52;
  font-weight: 700;
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #183b30;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand span {
  display: grid;
  gap: 3px;
}

.brand strong {
  font-size: 18px;
  letter-spacing: .08em;
}

.brand small,
.small-note,
.privacy-note,
.quiz-heading p {
  color: #6b7b72;
  font-size: 12px;
  line-height: 1.55;
}

.page-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 32px auto 70px;
}

.access-state,
.panel {
  border: 1px solid #e0e8e1;
  border-radius: 18px;
  background: #fff;
}

.access-state {
  max-width: 640px;
  margin: 80px auto;
  padding: 32px;
  text-align: center;
}

.access-state[hidden],
.teacher-app[hidden],
.thread-panel[hidden] {
  display: none;
}

.access-state h1,
.page-heading h1,
.panel h2,
.quiz-heading h3 {
  color: #173d31;
}

.page-heading {
  margin-bottom: 22px;
}

.page-heading h1 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 4vw, 38px);
}

.page-heading > p:last-child {
  color: #607168;
}

.eyebrow {
  margin: 0 0 8px;
  color: #237251;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.panel {
  padding: clamp(20px, 4vw, 30px);
  margin-bottom: 20px;
}

.panel > h2 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.panel form,
.form-grid {
  display: grid;
  gap: 12px;
}

.panel label {
  display: grid;
  gap: 7px;
  color: #344f40;
  font-size: 13px;
  font-weight: 700;
}

.panel input,
.panel select,
.panel textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #ccd9cf;
  border-radius: 9px;
  background: #fff;
  color: #20342d;
}

.panel textarea {
  resize: vertical;
  line-height: 1.5;
}

.panel button {
  justify-self: start;
  min-height: 40px;
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  background: #1d7552;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.panel button:hover {
  background: #155b3e;
}

.panel button:disabled {
  cursor: wait;
  opacity: .65;
}

.panel .secondary-button {
  border: 1px solid #bdd2c2;
  background: #f4f8f4;
  color: #1d6045;
}

.small-note {
  margin: 0;
}

.material-list {
  display: grid;
  gap: 6px;
  color: #4b6254;
  font-size: 13px;
}

.quiz-editor {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #e0e8e1;
}

.quiz-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.quiz-heading h3,
.quiz-heading p {
  margin: 0 0 6px;
}

.quiz-question-editor {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e0e8e1;
  border-radius: 12px;
  margin-bottom: 12px;
}

.quiz-question-editor h4 {
  margin: 0;
  color: #315440;
}

.quiz-option-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.quiz-option-editor select {
  width: 180px;
}

.quiz-option-editor input[type="radio"] {
  width: auto;
  min-height: 0;
}

.inbox-layout {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.5fr);
  gap: 18px;
}

.thread-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.thread-list button {
  width: 100%;
  min-height: unset;
  padding: 12px;
  border: 1px solid #e0e8e1;
  background: #f7faf7;
  color: #30493b;
  text-align: left;
  overflow-wrap: anywhere;
}

.thread-list button[aria-current="true"] {
  border-color: #a8cbb5;
  background: #eaf4ed;
}

.thread-panel {
  padding: 18px;
  border: 1px solid #e0e8e1;
  border-radius: 12px;
}

.thread-panel h3 {
  margin-top: 0;
  color: #173d31;
}

.thread-messages,
.feedback-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.thread-message,
.feedback-item {
  padding: 12px;
  border-radius: 10px;
  background: #f5f8f5;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.thread-message strong,
.feedback-item strong {
  display: block;
  margin-bottom: 4px;
  color: #274735;
  font-size: 12px;
}

.form-status {
  color: #256846;
  font-size: 13px;
}

.form-status.error {
  color: #a1342e;
}

@media (max-width: 700px) {
  .site-header {
    padding: 12px 20px;
  }

  .page-wrap {
    width: min(100% - 28px, 600px);
    margin-top: 20px;
  }

  .form-grid,
  .inbox-layout {
    grid-template-columns: 1fr;
  }

  .quiz-heading {
    align-items: start;
    flex-direction: column;
  }

  .quiz-option-editor {
    grid-template-columns: 1fr;
  }

  .quiz-option-editor select {
    width: 100%;
  }
}
