#experimental-account-fields { margin-block: 1.5rem; overflow-x: auto; }
#experimental-account-table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; }
#experimental-account-table caption { text-align: left; padding-block: .75rem; font-weight: 600; }
#experimental-account-table th, #experimental-account-table td { vertical-align: top; padding: .75rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#experimental-account-table td .quiet { display: block; margin-block: .25rem; }
#experimental-unassigned pre { white-space: pre-wrap; overflow-wrap: anywhere; }
:root {
  color-scheme: light;
  --paper: #f6f4ee;
  --surface: #fffef9;
  --ink: #233833;
  --muted: #64706a;
  --line: #dcded4;
  --teal: #146657;
  --soft: #e8efea;
  --amber: #875511;
  --amber-bg: #f7edda;
  --red: #9a392c;
  --radius: 10px;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  touch-action: manipulation;
}

button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 15px;
  font-weight: 600;
  transition: background .15s;
}

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

button:hover:not(:disabled) {
  filter: brightness(.94);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ae7b31;
  outline-offset: 3px;
}

input,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #b9c4bb;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}

label {
  display: block;
  font-weight: 600;
  margin: 20px 0 7px;
}

.primary {
  background: var(--teal);
  color: white;
  white-space: nowrap;
}

.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.quiet {
  background: transparent;
  color: var(--teal);
  padding: 7px 9px;
}

.topbar {
  height: 82px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -.7px;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: var(--ink);
  color: white;
  font-size: 28px;
  font-family: Georgia, serif;
}

.edition {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  margin-left: 10px;
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 600;
  color: var(--muted);
}

.session {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
}

.login-layout {
  max-width: 1100px;
  margin: 90px auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 100px;
  align-items: center;
}

.auth-panel { min-width: 0; }
.auth-panel > .notice { margin-bottom: 16px; }
#auth-toggle { margin-bottom: 16px; }
#auth-status:not(:empty) { padding: 12px; background: var(--soft); border-radius: 6px; }

.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.8px;
  color: var(--teal);
  margin: 0 0 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -1.1px;
  margin-bottom: 12px;
}

h2 {
  font-size: 19px;
  letter-spacing: -.4px;
  margin-bottom: 10px;
}

h3 {
  font-size: 15px;
}

.intro h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 60px;
  line-height: 1.06;
  font-weight: 400;
  letter-spacing: -2px;
}

.lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 390px;
  margin: 26px 0 45px;
}

.principle {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 25px;
  max-width: 390px;
}

.principle > span {
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 24px;
}

.principle p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px #23383308;
}

.login-card {
  padding: 36px;
}

.login-card .primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
}

.muted,
.fine {
  color: var(--muted);
}

.fine {
  font-size: 12px;
  line-height: 1.6;
}

.login-card .fine {
  margin-bottom: 0;
}

.error {
  color: var(--red);
  font-size: 13px;
  white-space: pre-wrap;
}

.error:empty,
.message:empty {
  display: none;
}

.error:not(:empty) {
  margin-top: 16px;
}

.workspace {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: calc(100vh - 82px);
}

.directory {
  padding: 30px 20px;
  background: #efefe7;
  border-right: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.section-heading h2 {
  margin: 0;
}

.directory h2 {
  font-size: 16px;
}

.client-list {
  margin-top: 20px;
  min-height: 160px;
}

.client-button {
  display: flex;
  width: 100%;
  align-items: center;
  text-align: left;
  gap: 10px;
  background: transparent;
  color: var(--ink);
  margin: 4px 0;
  padding: 12px 10px;
  overflow-wrap: anywhere;
}

.client-button.active {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 2px 5px #23383305;
}

.avatar {
  background: var(--soft);
  color: var(--teal);
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 6px;
  font-size: 11px;
}

.client-label {
  min-width: 0;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px -7px;
}

.pager button {
  font-size: 11px;
}

.boundary {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 35px;
}

.workarea {
  padding: 36px 38px;
  min-width: 0;
  max-width: 1650px;
  width: 100%;
}

.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 6px 0 30px;
}

.client-header h1 {
  overflow-wrap: anywhere;
}

.client-header .muted {
  font-size: 13px;
  margin-bottom: 0;
}

.reports-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.reports {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.report {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
  text-align: left;
  color: var(--ink);
  min-width: 0;
}

.report.selected {
  border-color: var(--teal);
  box-shadow: inset 0 3px var(--teal);
}

.report-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.report-name {
  font-size: 15px;
  font-weight: 650;
}

.report-id {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}

.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 650;
  background: var(--amber-bg);
  color: var(--amber);
  white-space: nowrap;
}

.badge.partial {
  background: var(--soft);
  color: var(--teal);
}

.badge.failed,
.badge.needs_attention {
  background: #f6e6df;
  color: var(--red);
}

.empty {
  padding: 26px;
  border: 1px dashed #bcc7bd;
  border-radius: 7px;
  color: var(--muted);
  grid-column: 1/-1;
  font-size: 13px;
}

.review {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.notice,
.message {
  padding: 13px 16px;
  background: var(--amber-bg);
  color: #715124;
  border: 1px solid #e6d9bc;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 15px;
}

.message {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--line);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 12px;
  color: var(--muted);
  margin: 15px 0;
}

.evidence-grid {
  display: grid;
  grid-template-columns: minmax(230px, .85fr) minmax(260px, 1.15fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.observations {
  padding: 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.observations label {
  margin-top: 0;
  font-size: 12px;
}

.span-list {
  max-height: 540px;
  overflow: auto;
  margin-top: 15px;
}

.span-button {
  display: block;
  background: transparent;
  border: 1px solid var(--line);
  width: 100%;
  text-align: left;
  color: var(--ink);
  font-weight: 400;
  padding: 12px;
  margin: 7px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.span-button.selected {
  background: var(--soft);
  border-color: var(--teal);
}

.span-button small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}

.source {
  background: #e9ece5;
  padding: 20px;
  min-width: 0;
}

.source h3 {
  margin-bottom: 5px;
}

.source .fine {
  margin-bottom: 14px;
}

.sheet {
  position: relative;
  background: white;
  border: 1px solid #cdd4cb;
  width: 100%;
  box-shadow: 0 6px 16px #2338330b;
  overflow: hidden;
  min-height: 180px;
}

.source-span {
  position: absolute;
  overflow: hidden;
  white-space: pre;
  line-height: 1;
  color: #56625b;
  pointer-events: none;
}

.source-region {
  position: absolute;
  border: 2px solid #156958;
  background: #2a9a7526;
  pointer-events: none;
}

.selected-text {
  background: var(--surface);
  padding: 13px;
  margin-top: 14px;
  font-size: 12px;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.provenance {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
  margin-top: 10px;
}

.review-panel {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 20px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.review-form {
  max-width: 760px;
  margin: 18px 0;
}

.review-form textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.review-form textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.review-panel > button {
  margin: 6px 8px 6px 0;
  white-space: normal;
  text-align: left;
}

.review-history {
  padding-left: 24px;
  max-height: 360px;
  overflow: auto;
}

.review-history li {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 12px;
}

.review-note {
  white-space: pre-wrap;
}

.review-panel summary {
  cursor: pointer;
  padding: 12px 0;
}

.candidate-report-facts { margin-block: 24px; overflow-x: auto; }
.candidate-report-facts table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
.candidate-report-facts caption { text-align: left; padding-block: 12px; }
.candidate-report-facts th, .candidate-report-facts td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; white-space: pre-wrap; }
#round1-workflow { margin-block: 24px; padding-block: 20px; border-block: 1px solid var(--line); min-width: 0; }
#round1-workflow section { margin-block: 28px; }
.case-form { max-width: 760px; margin-block: 18px; }
.case-form textarea { width: 100%; padding: 12px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
.case-form textarea:focus-visible { outline: 3px solid #ae7b31; outline-offset: 3px; }
.case-confirm { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; }
.case-confirm input { width: auto; margin-top: 5px; flex: 0 0 auto; }
.case-letter { border: 1px solid var(--line); padding: 18px; margin-block: 20px; border-radius: var(--radius); min-width: 0; }
.case-facts, .case-events { padding-left: 22px; overflow-wrap: anywhere; }
.case-finding, .letter-text, .case-report-facts { white-space: pre-wrap; overflow-wrap: anywhere; }
.letter-text { font: inherit; padding: 20px; background: var(--surface); border: 1px solid var(--line); }
.case-tools { display: flex; flex-wrap: wrap; gap: 8px; }
#approved-print-letter { display: none; }
@media print {
  body > * { display: none !important; }
  body > #approved-print-letter { display: block !important; white-space: pre-wrap; overflow-wrap: anywhere; font: 12pt/1.5 Georgia, serif; color: black; background: white; margin: 0; }
  @page { margin: 20mm; }
}

footer {
  margin-top: 45px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  background: var(--surface);
  color: var(--ink);
  max-width: 530px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 25px 100px #142b3330;
}

dialog::backdrop {
  background: #142b3370;
  backdrop-filter: blur(3px);
}

dialog .primary {
  margin-top: 10px;
  width: 100%;
}

dialog .eyebrow {
  margin: 0;
}

.file-box {
  border: 1px dashed #a9b8ac;
  padding: 16px;
  border-radius: 7px;
  background: var(--paper);
}

.file-box input {
  border: 0;
  padding: 0;
  background: none;
}

.file-box p {
  margin: 10px 0 0;
}

dialog .notice {
  margin-top: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 10;
  padding: 10px;
  background: var(--ink);
  color: white;
}

.skip:focus {
  top: 10px;
}

[hidden] {
  display: none!important;
}

@media (min-width: 1450px) {
  .workarea {
    padding: 42px 54px;
  }
}

@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .workarea {
    padding: 26px 22px;
  }

  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .observations {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .span-list {
    max-height: 280px;
  }

  .login-layout {
    gap: 40px;
  }

  .intro h1 {
    font-size: 48px;
  }

  .edition {
    display: none;
  }
}

@media (max-width: 650px) {
  .topbar {
    height: 68px;
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .session {
    gap: 4px;
  }

  .session > span {
    display: none;
  }

  .login-layout {
    grid-template-columns: 1fr;
    margin: 20px auto;
    gap: 20px;
    padding: 20px;
  }

  .intro h1 {
    font-size: 42px;
  }

  .lede {
    margin: 18px 0;
  }

  .principle {
    display: none;
  }

  .login-card {
    padding: 25px;
  }

  .workspace {
    display: block;
  }

  .directory {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px;
  }

  .client-list {
    min-height: 0;
    max-height: 180px;
    overflow: auto;
  }

  .boundary {
    display: none;
  }

  .pager {
    margin: 8px 0;
  }

  .client-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .workarea {
    padding: 24px 16px;
  }

  .reports {
    grid-template-columns: 1fr;
  }

  .review > .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    gap: 10px;
  }

  .source {
    padding: 14px;
  }

  .client-header h1 {
    font-size: 29px;
  }

  footer {
    margin-top: 26px;
  }
}
