:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182230;
  background: #f4f6f8;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: #f4f6f8;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

.review-topbar {
  min-height: 104px;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #f8fafc;
  background: #15212d;
}

.brand-link {
  display: inline-block;
  margin-bottom: 4px;
  color: #65d4ca;
  font-size: 14px;
  text-decoration: none;
}

.review-topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.review-topbar nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.review-topbar nav a {
  padding: 9px 12px;
  border: 1px solid #526170;
  border-radius: 6px;
  color: #f8fafc;
  text-decoration: none;
}

#reviewerBadge {
  color: #c8d1da;
  font-size: 14px;
}

.progress-band {
  padding: 18px 32px 16px;
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 2fr) auto;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #dce2e8;
  background: #ffffff;
}

.progress-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.progress-copy strong {
  font-size: 17px;
}

.progress-copy span,
.progress-counts {
  color: #667281;
  font-size: 13px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e5eaee;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: #16877d;
  transition: width 180ms ease;
}

.progress-counts {
  display: flex;
  gap: 16px;
  white-space: nowrap;
}

.progress-counts b {
  color: #182230;
}

.error-banner {
  margin: 16px 32px 0;
  padding: 12px 14px;
  border: 1px solid #e3a7a7;
  border-radius: 6px;
  color: #8a2020;
  background: #fff1f1;
}

.review-workspace {
  width: min(1500px, calc(100% - 64px));
  margin: 24px auto;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr);
  gap: 20px;
}

.source-pane,
.review-pane,
.done-state {
  border: 1px solid #d9e0e6;
  border-radius: 8px;
  background: #ffffff;
}

.source-pane,
.review-pane {
  min-height: 500px;
  padding: 24px;
}

.pane-header {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pane-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.case-meta {
  min-height: 18px;
  margin: 0 0 4px;
  color: #718091;
  font-size: 13px;
}

.secondary-link {
  color: #176f68;
  font-size: 14px;
  text-decoration: none;
}

#clipPlayer {
  width: 100%;
  height: 48px;
  margin: 28px 0 24px;
}

.transcript-block {
  min-height: 180px;
  padding: 18px;
  border-left: 4px solid #16877d;
  background: #f2f8f7;
}

.transcript-block span {
  color: #687684;
  font-size: 13px;
}

.transcript-block p {
  margin: 12px 0 0;
  font-size: 19px;
  line-height: 1.55;
}

.signal-line {
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: #556372;
  font-size: 13px;
}

.signal-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.signal-tags span {
  padding: 4px 7px;
  border-radius: 4px;
  color: #465363;
  background: #edf1f4;
}

.save-status {
  min-height: 20px;
  color: #16877d;
  font-size: 13px;
}

.review-instruction {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #16877d;
  color: #52606e;
  background: #f2f8f7;
  font-size: 14px;
  line-height: 1.5;
}

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #52606e;
  font-size: 14px;
  font-weight: 600;
}

.full-field {
  margin-top: 22px;
}

textarea,
input {
  width: 100%;
  border: 1px solid #bdc8d2;
  border-radius: 6px;
  color: #182230;
  background: #ffffff;
  outline: none;
}

textarea,
input {
  padding: 12px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

textarea:focus,
input:focus {
  border-color: #16877d;
  box-shadow: 0 0 0 3px rgba(22, 135, 125, 0.14);
}

.notes-field {
  margin-top: 18px;
}

.review-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

button.primary {
  border: 1px solid #16877d;
  color: #ffffff;
  background: #16877d;
}

button.secondary {
  border: 1px solid #bdc8d2;
  color: #344150;
  background: #ffffff;
}

.done-state {
  width: min(720px, calc(100% - 40px));
  margin: 72px auto;
  padding: 36px;
  text-align: center;
}

.done-state h2 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: 0;
}

.done-state p {
  color: #667281;
}

.done-state a {
  color: #176f68;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .review-topbar,
  .progress-band {
    padding-left: 20px;
    padding-right: 20px;
  }

  .review-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-band {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .progress-counts {
    flex-wrap: wrap;
  }

  .review-workspace {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .review-topbar nav,
  .review-actions {
    width: 100%;
  }

  .review-topbar nav,
  .review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .source-pane,
  .review-pane {
    min-height: auto;
    padding: 18px;
  }
}
