:root {
  font:
    16px/1.55 system-ui,
    sans-serif;
  color: #2b243a;
  background: #f7f4fc;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
main {
  max-width: 1040px;
  margin: auto;
  padding: 24px;
}
nav,
.section-heading,
.actions,
.filters {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
nav {
  margin-bottom: 40px;
}
a {
  color: #5b3fba;
}
.brand {
  font-size: 24px;
  font-weight: 750;
  margin-right: auto;
  text-decoration: none;
}
header {
  max-width: 780px;
  margin-bottom: 24px;
}
h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 16px;
  margin: 0;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: #736583;
}
.muted {
  color: #716979;
  font-size: 13px;
}
section {
  background: white;
  border: 1px solid #e4ddee;
  border-radius: 14px;
  padding: 24px;
  margin: 22px 0;
}
section section {
  padding: 20px;
}
.section-heading {
  justify-content: space-between;
}
button,
input,
select {
  font: inherit;
}
button {
  padding: 10px 15px;
  border: 1px solid #694bc1;
  background: #694bc1;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}
button.secondary {
  background: white;
  color: #59429b;
  border-color: #d4c9e6;
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #9c7dea;
  outline-offset: 3px;
}
label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}
input,
select {
  padding: 10px;
  border: 1px solid #cfc3df;
  border-radius: 8px;
  min-width: 0;
  width: 100%;
  background: white;
  color: #2b243a;
}
input[type="file"] {
  max-width: 100%;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.legend span {
  border-radius: 7px;
  padding: 6px 10px;
}
.subject {
  background: #e4f4e8;
}
.other_contributors {
  background: #e5effb;
}
.context {
  background: #f1eef5;
}
.uncertain {
  background: #fff2cf;
}
.speaker {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  border-top: 1px solid #eee;
  padding-top: 14px;
  margin-top: 14px;
}
.speaker p {
  white-space: pre-wrap;
  font-size: 13px;
  max-height: 90px;
  overflow: auto;
}
.passage {
  border: 1px solid #ddd2ea;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  scroll-margin-top: 20px;
}
.passage p.text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0;
  max-height: 330px;
  overflow: auto;
}
.passage .metadata {
  font-size: 12px;
  color: #645a72;
}
.passage .controls {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.passage .controls label {
  min-width: 180px;
  flex: 1;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.filters label {
  min-width: 180px;
}
.danger {
  border-color: #dfc4c4;
}
#errors {
  padding: 16px;
  background: #fff0e8;
  border: 1px solid #dfb29b;
  border-radius: 8px;
  white-space: pre-wrap;
}
#notice {
  color: #4d6d51;
}
#documents {
  list-style: none;
  padding: 0;
}
#documents li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  overflow-wrap: anywhere;
}
#documents button {
  flex-shrink: 0;
}
footer {
  font-size: 13px;
  margin: 40px 0;
}
@media (max-width: 600px) {
  main {
    padding: 16px;
  }
  section,
  section section {
    padding: 16px;
  }
  .speaker {
    grid-template-columns: 1fr;
    gap: 0;
  }
  button {
    min-height: 42px;
  }
  .actions button {
    flex: 1;
    min-width: 140px;
  }
  .filters {
    gap: 8px;
  }
  .passage .controls button {
    flex: 1;
  }
  .passage .controls label {
    width: 100%;
  }
  nav {
    gap: 12px;
    font-size: 14px;
  }
  .brand {
    width: 100%;
  }
  h1 {
    font-size: 32px;
  }
}
.tracker {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 24px 0;
  gap: 0;
}
.tracker li {
  flex: 1;
  border-top: 4px solid #e4ddee;
  padding: 10px 0;
  font-size: 14px;
  color: #716979;
}
.tracker .current {
  border-color: #694bc1;
  color: #59429b;
  font-weight: 700;
}
.tracker .complete {
  border-color: #64936e;
  color: #426c4b;
}
#drop-zone {
  border: 2px dashed #c5b5e3;
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: #faf8ff;
}
#drop-zone.dragging {
  border-color: #694bc1;
  background: #eee7fc;
}
#drop-zone input {
  border: 0;
  margin: auto;
  max-width: 320px;
}
#processing {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: white;
  border-radius: 12px;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #ded4ee;
  border-top-color: #694bc1;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}
details {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #e4ddee;
  border-radius: 10px;
  background: white;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.identity-excerpt {
  display: block;
  width: 100%;
  font-size: 13px;
  color: #716979;
  overflow-wrap: anywhere;
}
#document-name,
#speaker-summary,
#save-summary {
  overflow-wrap: anywhere;
}
#identity-options {
  align-items: flex-start;
}

#speakers-panel {
  border: 0;
  padding: 0;
  margin: 22px 0;
}
