:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  background: #f5f7fb;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8faff 0%, #eef3fb 100%);
}

.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.centered {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.panel {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(23, 32, 51, 0.08);
}

.form {
  display: grid;
  gap: 16px;
  min-width: min(100%, 420px);
}

label {
  display: grid;
  gap: 8px;
}

input {
  border: 1px solid #c8d3e6;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #c8d3e6;
  border-radius: 12px;
  padding: 14px;
  font: inherit;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: #2649d8;
  color: white;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: #e8eefc;
  color: #2649d8;
}

.button:hover {
  background: #1f3fbe;
}

.button.secondary:hover {
  background: #dbe5fb;
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}

.states h2,
.panel h1 {
  margin-top: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: #5a6785;
  margin: 0 0 8px;
}

.notice,
.subtle {
  color: #5a6785;
}

#discoveries-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

#discoveries-list li {
  border: 1px solid #dce5f5;
  border-radius: 16px;
  padding: 16px;
}

a {
  color: #2649d8;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid #87a2ff;
  outline-offset: 3px;
}

::selection {
  background: #cbd7ff;
  color: #172033;
}

.review-shell {
  max-width: 860px;
}

.review-header,
.review-actions,
.item-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
}

.review-header {
  margin: 28px 0 40px;
}

.review-header h1 {
  margin: 0 0 8px;
  max-width: 18ch;
}

.review-progress {
  display: grid;
  gap: 5px;
  max-width: 30ch;
  padding-top: 6px;
  color: #5a6785;
}

.review-progress strong,
.review-fields dt,
.item-heading span {
  color: #172033;
}

.review-section {
  padding: 30px 0;
  border-top: 1px solid #dce5f5;
}

.review-section h2 {
  margin: 0 0 20px;
}

.review-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
}

.review-fields div {
  display: grid;
  gap: 7px;
}

.review-fields dt {
  font-weight: 700;
}

.review-fields dd {
  margin: 0;
  max-width: 68ch;
  line-height: 1.55;
}

.investigation-item {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 14px 42px rgba(23, 32, 51, 0.08);
}

.item-heading h3 {
  margin: 0;
}

.item-heading span {
  font-size: 0.875rem;
  font-weight: 700;
}

.review-actions {
  justify-content: flex-end;
  padding-top: 24px;
}

.participant-panel {
  width: min(100%, 680px);
}

.participant-panel h1 {
  max-width: 22ch;
}

.participant-panel p,
.participant-panel dd {
  line-height: 1.6;
}

.participant-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.participant-routes button {
  border: 0;
  background: transparent;
  color: #2649d8;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.manual-invitation-panel {
  width: min(100%, 720px);
}

.manual-invitation-panel h1 {
  margin-top: 0;
}

.copy-field {
  display: grid;
  gap: 10px;
  margin: 28px 0 24px;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.copy-row input {
  min-width: 0;
}

.copy-status {
  min-height: 1.5em;
  margin: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .review-header,
  .review-actions,
  .item-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .review-fields {
    grid-template-columns: 1fr;
  }

  .review-actions .button {
    width: 100%;
  }

  .copy-row {
    grid-template-columns: 1fr;
  }
}
