.detail-buttons {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.notes-dialog {
  width: min(1120px, 96vw);
  height: min(900px, 94vh);
  max-width: none;
  border-radius: 0;
}
.notes-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #f7f9f8;
}
.notes-shell.version-review-shell {
  grid-template-rows: auto 1fr;
}
.notes-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto minmax(330px, 1fr);
  gap: 18px;
  height: auto;
  min-height: 92px;
  padding: 18px 78px 18px 28px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.notes-head .eyebrow {
  margin: 0;
  justify-self: start;
}
.notes-head h2 {
  font:
    500 28px Georgia,
    serif;
  margin: 0;
  justify-self: center;
}
.note-counts {
  display: flex;
  gap: 10px;
  justify-self: end;
}
.note-counts span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 8px;
  background: #e8f1ed;
  color: var(--muted);
  font-size: 12px;
}
.note-counts b {
  font-size: 20px;
  color: var(--green);
}
.note-counts .adopted-count {
  border: 1px solid #a9d0c2;
  background: #dff1e9;
  color: #155d49;
  font-weight: 800;
}
.note-counts .adopted-count b {
  color: #0f6c50;
}
.note-counts .pending-count {
  background: #fff0db;
  color: #8b5510;
}
.note-counts .pending-count b {
  color: #a85e00;
}
.version-filter-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 11px 24px;
  border-bottom: 1px solid var(--line);
  background: #f2f7f5;
}
.version-filter-bar strong {
  margin-right: 4px;
  color: var(--green);
  font-size: 13px;
}
.version-filter-bar button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #cfddd8;
  border-radius: 18px;
  background: white;
  color: #53645d;
  font-size: 12px;
  font-weight: 800;
}
.version-filter-bar button b {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #edf2ef;
  font-size: 11px;
}
.version-filter-bar button.active {
  border-color: var(--green2);
  background: #dfeee8;
  color: var(--green);
}
.version-filter-bar button.active b {
  background: white;
}
.version-filter-bar button[data-version-filter='pending'] {
  border-color: #e5b66e;
  color: #8b5510;
}
.version-filter-bar button[data-version-filter='pending'].active {
  border-color: #c67712;
  background: #ffedcf;
  color: #744400;
}
.version-clause-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.notes-list.version-review-list {
  padding: 0;
}
.version-review-content {
  padding: 24px;
}
.clause.return-highlight,
.note-card.return-highlight {
  outline: 3px solid rgb(47 128 104 / 25%);
  outline-offset: 2px;
}
.version-clause-heading h3 {
  margin: 0;
}
.version-clause-heading span {
  color: var(--muted);
  font-size: 12px;
}
.version-notes-heading {
  margin-top: 30px;
}
.review-complete {
  padding: 32px 20px;
  border: 1px dashed #a8c7bd;
  border-radius: 10px;
  background: #f1f8f5;
  text-align: center;
  color: var(--green);
}
.review-complete p {
  margin: 7px 0 0;
  color: var(--muted);
}
.notes-list {
  padding: 24px;
  overflow: auto;
}
.note-card {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid #c8892d;
  border-radius: 10px;
  background: white;
  overflow: hidden;
}
.note-card.replied {
  border-left-color: #2f8068;
}
.note-card.no_reply {
  border-left-color: #8d9993;
}
.note-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 17px;
  background: #f7f9f8;
  border-bottom: 1px solid var(--line);
}
.note-tag {
  padding: 4px 8px;
  border-radius: 5px;
  background: #f8ebd5;
  color: #9b6217;
  font-size: 11px;
  font-weight: 800;
}
.note-status {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.full-clause,
.word-comment,
.reply-area {
  padding: 17px 20px;
}
.full-clause {
  background: #fffaf1;
  border-bottom: 1px solid #eee2cf;
}
.full-clause h4,
.word-comment h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.full-clause p,
.word-comment p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.75;
}
.word-comment {
  border-bottom: 1px solid var(--line);
}
.word-comment small {
  display: block;
  margin-top: 10px;
  color: #8a9690;
}
.reply-area label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}
.reply-area textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #9bbcb2;
  border-radius: 8px;
  line-height: 1.6;
}
.note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.empty-note {
  text-align: center;
  color: var(--muted);
  padding: 80px 20px;
}
@media (max-width: 1000px) {
  .notes-head {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 68px 18px 24px;
  }
  .notes-head h2,
  .note-counts {
    justify-self: start;
  }
  .note-counts {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .notes-list {
    padding: 12px;
  }
  .version-filter-bar {
    padding: 10px 12px;
  }
  .version-review-content {
    padding: 12px;
  }
  .version-filter-bar strong {
    width: 100%;
  }
  .note-counts {
    flex-wrap: wrap;
  }
  .detail-buttons {
    flex-direction: column;
  }
}
