:root {
  --ink: #223e46;
  --muted: #536b71;
  --primary: #235d60;
  --rail: #193f49;
  --mint: #c0dad0;
  --bg: #f2f5f5;
  --line: #dce5e7;
  --know: #326780;
  --know-bg: #ecf3f7;
  --scroll-track: #edf2f2;
  --scroll-thumb: #a0b6b7;
  --scroll-hover: #779498;
  --scroll-active: #416a71;
  --paper: #fffef9;
  --citation: #8a641c;
  --citation-bg: #fbf1cc;
  --danger: #a43d33;
}
body {
  color: var(--ink);
}
button {
  background: var(--primary);
}
button.ghost {
  background: #fff;
}
button.ghost:hover {
  background: #eaf1f2;
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
.case-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -3px;
  background: #e6efe9;
  color: #234b50;
  width: 42px;
  height: 42px;
  display: grid;
  place-content: center;
  border-radius: 12px;
  line-height: 1;
}
.case-logo span {
  color: #6d8b76;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.2;
}
.wordmark > span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.8px;
  font-weight: 500;
  margin-top: 7px;
  color: #c4d8da;
}
.brand {
  padding-inline: 9px;
  margin-bottom: 30px;
}
.workspace-card {
  background: #214650;
  border-color: #4a6b73;
}
.workspace-card div > span {
  color: #c3d7d8;
}
.org-mark {
  background: #3a5b60;
}
.rail-company {
  border-color: #4a6b73;
}
.rail-note {
  font-size: 12px;
  white-space: pre-line;
}
.rail {
  background: var(--rail);
  scrollbar-color: #64828b var(--rail);
  padding-top: 27px;
}
.side a {
  padding: 11px 12px;
  font-size: 12px;
  gap: 10px;
}
.side small {
  font-size: 9px;
  color: #c0d3d6;
}
.side a:hover {
  background: #31545c;
}
.side a[aria-current="step"] {
  background: #dceae6;
  color: #203f43;
  border-color: #dceae6;
}
.side a[aria-current="step"] small {
  color: #476666;
}
.side a[aria-current="step"] .num {
  background: #235d60;
  border-color: #235d60;
}
.side .num {
  width: 25px;
  height: 25px;
  border-color: #78939c;
  font-size: 10px;
}
.rail-label {
  font-size: 9px;
  letter-spacing: 1.2px;
  margin-left: 13px;
}
.rail-bottom {
  padding-top: 25px;
}
.side .done .num::after {
  content: none;
}
.side .done .num {
  color: #d1e5d8;
}
.side .done a[aria-current] .num {
  color: #fff;
}
.progress-track {
  background: #395d66;
}
.rail-company span {
  letter-spacing: 0.25px;
}
.top {
  min-height: 73px;
  padding: 14px 28px;
}
.top-context {
  font-size: 11px;
}
.controls #export,
.controls #reset {
  font-size: 11px;
  min-height: 40px;
  padding: 9px 12px;
}
.controls #export svg {
  width: 14px;
}
.controls select {
  font-size: 12px;
  min-height: 40px;
}
.case-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  padding: 19px 28px 0;
  font-size: 11px;
  color: var(--muted);
}
.case-id {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid #bcced1;
  color: #355d65;
  letter-spacing: 0.3px;
}
.case-context .tag {
  margin-left: auto;
  background: #e4edea;
  color: #3c5f52;
  font-size: 9px;
}
.banner {
  margin: 14px 28px 0;
  font-size: 10px;
  line-height: 1.75;
  background: #fff9e9;
  color: #725a25;
  border-color: #e8dcbc;
}
.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 355px;
  gap: 25px;
  padding: 30px 28px 40px;
  align-items: start;
}
.case-layout > * {
  min-width: 0;
}
main h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 12px 0 20px;
  line-height: 1.3;
}
.screen-category {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}
.screen-category svg {
  width: 14px;
  height: 14px;
  color: #4b7b84;
}
.step-indicator {
  font-size: 10px;
}
.who {
  margin-bottom: 27px;
  gap: 9px;
}
.avatar {
  background: #dde9e9;
  color: #315d64;
}
.who-copy {
  font-size: 10px;
}
.who-copy strong {
  font-size: 11px;
}
.case-status {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.screen-intro {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.85;
  margin: 0 0 24px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1px;
  color: #486c6d;
}
.overview-hero {
  display: flex;
  gap: 25px;
  padding: 27px;
  background: #e4eeea;
  border: 1px solid #cfded9;
  border-radius: 15px;
}
.overview-hero h2 {
  font-size: 25px;
  line-height: 1.45;
  letter-spacing: -0.6px;
  margin: 12px 0 15px;
  max-width: 530px;
}
.overview-hero p {
  font-size: 13px;
  line-height: 1.9;
  margin: 0;
  color: #446467;
}
.hero-emblem {
  flex-shrink: 0;
  width: 58px;
  height: 65px;
  display: grid;
  place-items: center;
  border: 1px solid #a8c1b6;
  border-radius: 12px;
  background: #eff5ed;
  color: #5b8072;
}
.hero-emblem svg {
  width: 30px;
  height: 30px;
}
.case-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.case-stats > div {
  padding: 18px 15px;
  border-right: 1px solid var(--line);
}
.case-stats > div:last-child {
  border: 0;
}
.case-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 750;
  color: #2b545c;
  line-height: 1.3;
}
.case-stats span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.6;
}
.coverage-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px 19px;
  border: 1px solid #d6e2e5;
  border-radius: 11px;
  background: #eaf1f4;
  font-size: 12px;
  line-height: 1.85;
  color: #45616c;
  margin: 20px 0;
}
.coverage-note > svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin-top: 3px;
}
.coverage-note strong {
  font-size: 12px;
  color: #2c5360;
}
.coverage-note p {
  margin: 0;
}
.coverage-note div p {
  margin-top: 5px;
  font-size: 11px;
}
.privacy-card h2 {
  font-size: 16px;
}
.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.7;
  cursor: pointer;
  margin: 17px 0;
}
.toggle-row input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--primary);
  margin-top: 2px;
}
.mask-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  border: 1px dashed #c4d5d8;
  border-radius: 9px;
  background: #f5f8f8;
  padding: 14px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  margin: 12px 0;
}
.privacy-card .chip {
  font-size: 10px;
}
.section-heading {
  margin: 28px 0 14px;
  align-items: center;
}
.section-heading h2 {
  font-size: 15px;
}
.section-heading button {
  font-size: 10px;
  min-height: 38px;
  padding: 8px 10px;
}
.document-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.document-row {
  display: flex;
  width: 100%;
  text-align: left;
  justify-content: initial;
  gap: 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  border-radius: 0;
  padding: 15px 17px;
  color: var(--ink);
  font-weight: 400;
  min-height: 75px;
}
.document-row:last-child {
  border: 0;
}
.document-row:hover {
  background: #f4f8f8;
  box-shadow: none;
  filter: none;
}
.file-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 39px;
  background: #eef3f4;
  border: 1px solid #d5e1e4;
  border-radius: 6px;
  flex-shrink: 0;
  color: #61808a;
}
.file-icon svg {
  width: 19px;
  height: 19px;
}
.document-name {
  flex: 1;
  min-width: 0;
}
.document-name strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}
.document-name small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 6px;
}
.doc-quality {
  font-size: 9px;
  color: #4e6f64;
  font-weight: 500;
  max-width: 120px;
  line-height: 1.7;
}
.doc-quality.low {
  color: #876528;
}
.document-arrow {
  font-size: 16px;
  color: #6a858c;
  margin-left: 5px;
}
.citation-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.citation {
  background: #f8fafa;
  color: #365e6a;
  border: 1px solid #d2e0e4;
  font-size: 10px;
  font-weight: 600;
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 6px;
  gap: 5px;
  line-height: 1.5;
}
.citation svg {
  width: 12px;
  height: 12px;
}
.citation > span {
  font-size: 9px;
  color: #52666e;
  border-left: 1px solid #cfdce0;
  padding-left: 5px;
  margin-left: 2px;
}
.citation:hover {
  background: #edf4f7;
  filter: none;
  box-shadow: none;
}
.citation.selected {
  background: #f9f0d2;
  border-color: #d8c58a;
  color: #725822;
}
.citation.selected > span {
  color: #80682f;
  border-color: #dacaa0;
}
.evidence-panel {
  position: sticky;
  top: 18px;
  background: #e9eff0;
  border: 1px solid #d6e1e4;
  border-radius: 14px;
  min-width: 0;
  overflow: hidden;
}
.panel-tabs {
  display: flex;
  padding: 8px;
  gap: 6px;
  border-bottom: 1px solid #d4e0e3;
  background: #e7edef;
}
.panel-tabs button {
  flex: 1;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 11px;
  background: transparent;
  color: #536d77;
  border-radius: 7px;
  border: 1px solid transparent;
  gap: 7px;
  font-weight: 550;
}
.panel-tabs button[aria-pressed="true"] {
  background: #fff;
  border-color: #d5e0e3;
  color: #244e5a;
  box-shadow: 0 2px 4px #193f4905;
}
.panel-tabs button:hover {
  background: #f4f8f9;
  filter: none;
  box-shadow: none;
}
.panel-tabs svg {
  width: 14px;
  height: 14px;
}
.panel-tabs button > span {
  font-size: 9px;
  padding: 1px 5px;
  background: #e6efeb;
  color: #416458;
  border-radius: 4px;
}
.panel-content {
  padding: 16px;
  max-height: calc(100vh - 115px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.source-toolbar {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  align-items: center;
}
.source-toolbar select {
  min-width: 0;
  flex: 1;
  max-width: 200px;
  font-size: 10px;
  min-height: 34px;
  padding: 7px;
}
.source-toolbar > div {
  display: flex;
  gap: 4px;
}
.source-toolbar button {
  min-height: 34px;
  width: 30px;
  font-size: 14px;
  padding: 0;
}
.source-disclaimer {
  font-size: 10px;
  color: #4f6871;
  line-height: 1.8;
  margin: 12px 0 16px;
}
.document-page {
  padding: 27px 22px;
  background: var(--paper);
  border: 1px solid #dcddd4;
  box-shadow: 0 3px 10px #193f4908;
  border-radius: 2px;
  min-height: 420px;
}
.paper-kicker {
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.9px;
  color: #6a7470;
  padding-bottom: 12px;
  border-bottom: 1px solid #d9dfd7;
}
.paper-case {
  font-family: ui-monospace, monospace;
  font-size: 9px;
  color: #5d6d63;
  margin-top: 19px;
}
.document-page h2 {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.6;
  margin: 10px 0 14px;
  letter-spacing: -0.3px;
  color: #2c4846;
}
.paper-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #67756d;
  margin-bottom: 18px;
}
.paper-identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-block: 1px solid #e2e5dd;
  font-size: 9px;
  color: #526a62;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.source-passage {
  position: relative;
  padding: 17px 0 12px;
  border-bottom: 1px solid #e8e9df;
  font-family: Georgia, serif;
  font-size: 13px;
  color: #3f5048;
  line-height: 1.95;
  overflow-wrap: anywhere;
}
.source-passage .passage-id {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.5px;
  color: #63786a;
  display: block;
  margin-bottom: 7px;
}
.source-passage p {
  margin: 0;
}
.source-passage mark {
  color: #4e431e;
  background: #f6e7a6;
  box-shadow:
    4px 0 #f6e7a6,
    -4px 0 #f6e7a6;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 2px 0;
  line-height: 2;
}
.source-passage.highlighted {
  margin-inline: -7px;
  padding-inline: 7px;
  background: #fffcf0;
  border-radius: 3px;
}
.paper-footer {
  font-size: 8px;
  border-top: 1px solid #d9dfd7;
  margin-top: 35px;
  padding-top: 12px;
  color: #596b5d;
}
.scan-warning {
  font-size: 9px;
  color: #805d25;
  background: #fff3ce;
  border: 1px solid #e7d7a6;
  border-radius: 5px;
  padding: 8px;
  margin: 14px 0;
}
.activity-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.activity-head h2 {
  font-size: 14px;
  margin: 0;
}
.activity-head > span {
  font-size: 10px;
  color: #45685a;
  background: #dae7df;
  border-radius: 5px;
  padding: 2px 7px;
}
.activity-list {
  list-style: none;
  padding: 0;
  margin: 22px 0;
}
.activity-list li {
  border-left: 1px solid #becdd0;
  padding: 0 0 23px 18px;
  margin-left: 4px;
  position: relative;
  font-size: 11px;
}
.activity-list li::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7c9c95;
  left: -4px;
  top: 5px;
}
.activity-list li > strong {
  display: block;
  font-weight: 650;
}
.activity-list li > span {
  font-size: 10px;
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.activity-list time {
  font-size: 9px;
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.activity-list .citation {
  font-size: 9px;
}
.activity-list .citation > span {
  display: none;
}
.panel-content > button {
  width: 100%;
  font-size: 11px;
}
.evidence-panel > [data-action="restore"] {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
  font-size: 10px;
}
.record-empty {
  text-align: center;
  padding: 30px 15px;
  font-size: 11px;
  color: var(--muted);
}
.record-empty > svg {
  width: 34px;
  height: 34px;
  color: #7d9c92;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 23px;
  font-size: 11px;
}
.filter-bar select {
  font-size: 11px;
  min-height: 37px;
  max-width: 100%;
  min-width: 0;
}
.filter-bar > span {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.case-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-timeline li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  position: relative;
  padding: 0 0 27px 20px;
  border-left: 1px solid #c2d6d9;
  margin-left: 5px;
}
.case-timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5e8c8e;
}
.timeline-date time {
  font-size: 11px;
  display: block;
  font-weight: 650;
  margin-top: 2px;
}
.timeline-date .chip {
  display: inline-block;
  margin-top: 9px;
  font-size: 8px;
}
.timeline-content {
  padding: 15px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.timeline-content p {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
}
.timeline-content .citation-row {
  margin-bottom: 0;
}
.question-options {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}
.question-options h2 {
  font-size: 11px;
  color: var(--muted);
  font-weight: 550;
  margin: 0 0 15px;
}
.question-option {
  display: flex;
  width: 100%;
  text-align: left;
  justify-content: initial;
  background: #f7fafa;
  border: 1px solid #dfe9e9;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 550;
  color: #2d535d;
  padding: 14px 13px;
  margin-top: 9px;
  line-height: 1.7;
  gap: 13px;
}
.question-option > span {
  font-size: 10px;
  font-weight: 700;
  color: #506e73;
  flex-shrink: 0;
}
.question-option svg {
  width: 16px;
  height: 16px;
  margin-left: auto;
}
.question-option.active {
  background: #e4eeeb;
  border-color: #a6c1b7;
}
.question-option:hover {
  background: #edf4f2;
  filter: none;
  box-shadow: none;
}
.question-card > label,
.card > label:not(.toggle-row),
.flag-controls > label,
.draft-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 9px;
}
textarea {
  width: 100%;
  min-height: 95px;
  padding: 13px 15px;
  border: 1px solid #ccdcdf;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.85;
  background: #fafcfc;
  color: var(--ink);
  resize: none;
}
textarea:hover {
  border-color: #a4bcbf;
}
textarea:focus-visible {
  outline-offset: 2px;
}
.question-card .row {
  justify-content: flex-end;
  margin-top: 12px;
}
.question-card .meta:empty {
  display: none;
}
.answer-card {
  padding: 26px;
  background: #f7fbfd;
  border: 1px solid #c9dde6;
  border-left: 3px solid #6494ab;
  border-radius: 13px;
  margin-top: 24px;
}
.answer-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #436d83;
  font-weight: 650;
}
.answer-label svg {
  width: 17px;
  height: 17px;
}
.answer-card h2 {
  font-size: 20px;
  line-height: 1.5;
  margin: 17px 0 13px;
  letter-spacing: -0.3px;
}
.answer-card > p {
  font-size: 14px;
  line-height: 1.95;
}
.source-caption {
  font-size: 10px;
  color: var(--muted);
  margin-top: 20px;
}
.missing-answer {
  background: #fffbf1;
  border-color: #e4d5ad;
  border-left-color: #a3853e;
}
.missing-answer .answer-label {
  color: #806525;
}
.flag-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 23px;
  margin: 17px 0;
}
.flag-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.flag-index {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 35px;
  background: #f7efe0;
  color: #795a2d;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
}
.flag-heading h2 {
  font-size: 17px;
  line-height: 1.5;
  margin: 4px 0 0;
  letter-spacing: -0.2px;
}
.flag-kicker {
  font-size: 9px;
  color: #866628;
}
.flag-heading .chip {
  margin-left: auto;
  max-width: 120px;
  flex-shrink: 0;
  font-size: 8px;
}
.flag-card > p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.flag-controls {
  border-top: 1px solid var(--line);
  padding-top: 19px;
  margin-top: 18px;
}
.flag-controls select {
  font-size: 12px;
  width: 100%;
  margin-bottom: 16px;
}
.flag-controls textarea {
  min-height: 85px;
  margin-bottom: 12px;
}
.flag-controls button {
  min-height: 38px;
  font-size: 11px;
}
.inline-feedback {
  font-size: 11px;
  color: #866128;
  line-height: 1.8;
  margin-top: 10px;
}
.inline-feedback:empty {
  display: none;
}
.legal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 24px;
}
.legal-card {
  padding: 21px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.legal-top {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.legal-icon {
  background: #f0eff6;
  color: #726587;
  border-radius: 8px;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.legal-icon svg {
  width: 18px;
  height: 18px;
}
.legal-top .status {
  white-space: normal;
  line-height: 1.7;
  font-size: 9px;
}
.legal-card h2 {
  font-size: 15px;
  line-height: 1.6;
  margin: 16px 0 9px;
}
.legal-card .reference-label {
  font-size: 10px;
  color: #7b6c8b;
  line-height: 1.8;
}
.legal-card > p:not(.reference-label) {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.draft-progress {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 12px 15px;
  background: #e7eeee;
  border-radius: 8px;
  margin-bottom: 22px;
}
.draft-card {
  padding: 23px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid #b2bcc0;
  border-radius: 12px;
  margin: 17px 0;
}
.draft-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 17px;
}
.draft-heading h2 {
  font-size: 16px;
  letter-spacing: -0.3px;
  margin: 0;
}
.draft-badge {
  font-size: 9px;
  font-weight: 550;
  background: #edf0f1;
  color: #576e77;
  border-radius: 5px;
  padding: 4px 8px;
}
.draft-card textarea {
  min-height: 125px;
  background: #f6f8f8;
  border-color: #dce3e5;
}
.draft-card .row {
  margin-top: 15px;
}
.draft-card .row button {
  font-size: 11px;
  min-height: 38px;
}
.draft-card.state-accepted,
.draft-card.state-authored {
  border-left-color: #6b997e;
}
.state-accepted .draft-badge,
.state-authored .draft-badge {
  background: #e7f1ea;
  color: #416c50;
}
.state-accepted textarea,
.state-authored textarea {
  background: #f9fcf9;
}
.state-edited {
  border-left-color: #b69b5f;
}
.state-edited .draft-badge {
  background: #f7efdd;
  color: #866b2c;
}
.state-rejected {
  border-left-color: #ad7b73;
  background: #fcf8f7;
}
.state-rejected .draft-badge {
  background: #f5e8e4;
  color: #8c5044;
}
.state-writing {
  border-left-color: #738ea4;
}
.draft-ready {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 17px;
  border: 1px solid #ddd8ca;
  background: #f8f4ea;
  border-radius: 9px;
  font-size: 12px;
  color: #78653b;
  margin-top: 25px;
}
.draft-ready svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.draft-ready.is-ready {
  border-color: #c5dacb;
  color: #3d6d4e;
  background: #eaf3ed;
}
.review-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.review-summary > div {
  padding: 18px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.review-summary > div > span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-bottom: 12px;
}
.review-summary strong {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}
.review-summary svg {
  width: 15px;
  height: 15px;
}
.ready {
  color: #447158;
}
.pending {
  color: #886a2d;
}
.review-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.review-version h2 {
  margin: 0;
  font-size: 16px;
}
.review-version > span {
  font-size: 10px;
  color: var(--muted);
}
.review-check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #e8eeee;
  cursor: pointer;
}
.review-check:last-child {
  border: 0;
}
.review-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}
.review-person {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}
.review-person strong {
  display: block;
  font-size: 12px;
}
.review-person div > span {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.review-person > .chip {
  margin-left: auto;
}
.card [data-action="jurist"] {
  margin-top: 15px;
  font-size: 12px;
}
.approval-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 21px;
  background: #e7efeb;
  border: 1px solid #ccdcd3;
  border-radius: 13px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.approval-card > div {
  flex: 1;
}
.approval-card h2 {
  font-size: 13px;
  margin: 0;
}
.approval-card p {
  font-size: 10px;
  margin: 5px 0;
  color: var(--muted);
}
.approval-card button {
  font-size: 11px;
  min-height: 40px;
}
.audit-entry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px;
  margin: 12px 0;
}
.audit-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.audit-head > span {
  font-family: ui-monospace, monospace;
  font-size: 9px;
  color: #526a71;
  background: #f0f4f4;
  padding: 2px 6px;
  border-radius: 4px;
}
.audit-head strong {
  font-size: 12px;
  font-weight: 650;
}
.audit-head time {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
}
.audit-entry > p {
  font-size: 12px;
}
.audit-entry .meta {
  font-size: 10px;
}
.audit-entry pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.85 var(--font-body);
  padding: 13px;
  background: #f5f8f8;
  border-radius: 8px;
}
.audit-entry details {
  font-size: 11px;
  margin-top: 15px;
}
.audit-entry summary {
  cursor: pointer;
  min-height: 34px;
  padding: 5px 0;
  color: var(--primary);
}
.audit-entry details h3 {
  font-size: 11px;
}
.quality-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin: 24px 0;
}
.quality-kpi {
  padding: 23px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.quality-kpi > span:first-child {
  display: block;
  font-size: 11px;
  font-weight: 550;
  min-height: 36px;
  line-height: 1.7;
}
.quality-kpi > strong {
  display: block;
  font-family: var(--font-display);
  font-size: 35px;
  letter-spacing: -1px;
  color: #305d65;
  margin: 12px 0 7px;
}
.quality-kpi > small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.quality-kpi .method-label {
  display: inline-block;
  font-size: 9px;
  background: #f8f0dc;
  color: #7b632e;
  border: 1px solid #e8ddbb;
  border-radius: 5px;
  padding: 3px 7px;
  margin-top: 19px;
}
.fairness-row {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.fairness-row > span {
  font-size: 12px;
  min-width: 130px;
}
.fairness-row small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.fairness-row .bar {
  flex: 1;
  min-width: 30px;
  margin: 0;
  background: #e5edec;
}
.fairness-row .bar span {
  background: #759b91;
}
.fairness-row > strong {
  font-family: var(--font-display);
  font-size: 12px;
  min-width: 47px;
  text-align: right;
}
.table-card caption {
  text-align: left;
  padding: 19px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.table-card table {
  min-width: 480px;
  font-size: 11px;
}
.table-card thead th:last-child {
  background: #f5f8f8;
  color: var(--ink);
}
.table-card td:last-child {
  background: #fff;
}
.table-card tbody th {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  min-width: 90px;
  width: auto;
}
.gate .case-layout {
  grid-template-columns: 1fr;
  min-height: calc(100vh - 245px);
}
.gate .evidence-panel {
  display: none;
}
.gate .case-context .tag {
  display: none;
}
.gate-stage {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 45px;
  padding: 40px 15px;
  max-width: 1100px;
  margin: auto;
}
.gate-story h1 {
  font-size: clamp(35px, 3.2vw, 51px);
  letter-spacing: -1.6px;
  line-height: 1.3;
  margin-bottom: 25px;
  white-space: pre-line;
}
.gate-story p {
  font-size: 13px;
  max-width: 350px;
}
.gate-story .gate-eyebrow {
  color: #4e7774;
  letter-spacing: 1.5px;
  font-size: 9px;
  margin-bottom: 20px;
}
.gate-card {
  padding: 30px;
  border-radius: 17px;
}
.gate-card h2 {
  font-size: 23px;
}
.gate-access {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #506e7a;
  background: #edf3f6;
  border-radius: 6px;
  padding: 7px 10px;
  width: fit-content;
}
.gate-access svg {
  width: 14px;
  height: 14px;
}
.gate-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.gate-highlights span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #486768;
}
.gate-highlights svg {
  width: 14px;
  height: 14px;
}
.gate-document {
  position: relative;
  padding: 18px 20px;
  margin-top: 36px;
  width: 222px;
  border: 1px solid #c6d9d8;
  border-radius: 14px;
  background: #e8f0ed;
  transform: rotate(-3deg);
}
.gate-document > span:first-child {
  font-family: ui-monospace, monospace;
  font-size: 8px;
  color: #43635f;
  letter-spacing: 0.7px;
}
.mini-paper {
  padding: 20px 16px 24px;
  border: 1px solid #dcddd4;
  background: #fffef9;
  border-radius: 3px;
  margin-top: 11px;
  box-shadow: 0 3px 10px #193f4908;
}
.mini-paper i {
  display: block;
  height: 5px;
  background: #d4ddd5;
  width: 100%;
  margin: 10px 0;
  border-radius: 2px;
}
.mini-paper i:nth-child(2),
.mini-paper i:last-child {
  width: 70%;
}
.mini-paper i.mini-highlight {
  height: 11px;
  background: #e9d690;
}
.gate-cite {
  position: absolute;
  right: -26px;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #d2dbd2;
  border-radius: 7px;
  padding: 8px 13px;
  font-size: 9px;
  box-shadow: 0 4px 10px #193f4909;
  transform: rotate(3deg);
  color: #79632b;
}
.gate-cite svg {
  width: 12px;
  height: 12px;
}
.gate-private {
  font-size: 10px;
}
.gate-error {
  font-size: 11px;
}
.gate-error:empty {
  display: none;
}
.gate-card input[aria-invalid="true"] {
  border-color: var(--danger);
}
.gate .rail-note {
  display: block;
}
.gate .rail-label,
.gate .journey-progress {
  display: none;
}
#source-dialog {
  max-width: 620px;
  width: calc(100% - 24px);
  max-height: 92dvh;
  padding: 16px;
  background: #e9eff0;
  overflow-y: auto;
}
#source-dialog .dialog-top {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 15px;
}
#source-dialog-title {
  font-size: 17px;
  margin: 0;
}
.dialog-top button {
  font-size: 12px;
  min-height: 38px;
  padding: 8px 12px;
}
#source-dialog .document-page {
  padding: 27px;
}
#source-dialog .source-toolbar select {
  max-width: none;
}
#source-dialog .document-page h2 {
  font-size: 20px;
}
#source-dialog .source-passage {
  font-size: 14px;
}
.foot {
  font-size: 10px;
  padding: 19px 28px;
}
.screen-bottom > span {
  font-size: 9px;
}
.screen-bottom button {
  font-size: 11px;
}
.screen-bottom {
  margin-top: 32px;
}
.card {
  padding: 23px;
}
.card h2 {
  font-size: 16px;
}
.status-message {
  background: var(--rail);
  font-size: 12px;
}
@media (min-width: 1700px) {
  .case-layout {
    grid-template-columns: minmax(0, 1fr) 425px;
    gap: 32px;
    max-width: 1600px;
    margin: auto;
    padding: 35px 40px;
  }
  .document-page {
    padding: 32px 27px;
  }
  .source-passage {
    font-size: 14px;
  }
  .overview-hero h2 {
    font-size: 29px;
  }
  main h1 {
    font-size: 36px;
  }
}
@media (max-width: 1250px) {
  .case-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 18px;
    padding: 26px 22px;
  }
  .case-context {
    padding-inline: 22px;
  }
  .banner {
    margin-inline: 22px;
  }
  .panel-content {
    padding: 12px;
  }
  .document-page {
    padding: 22px 16px;
  }
  .source-toolbar select {
    max-width: 165px;
  }
  .legal-list {
    grid-template-columns: 1fr;
  }
  .case-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-stats > div:nth-child(2) {
    border-right: 0;
  }
  .case-stats > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .case-stats > div {
    padding: 15px;
  }
  .case-timeline li {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .timeline-date {
    display: flex;
    gap: 12px;
    align-items: center;
  }
  .timeline-date .chip {
    margin: 0;
  }
  .flag-heading {
    align-items: flex-start;
  }
  .flag-heading .chip {
    font-size: 8px;
    max-width: 85px;
  }
  .overview-hero {
    padding: 22px;
    gap: 15px;
  }
  .overview-hero h2 {
    font-size: 22px;
  }
  .hero-emblem {
    width: 43px;
    height: 52px;
  }
  .hero-emblem svg {
    width: 24px;
  }
  .review-summary {
    grid-template-columns: 1fr;
  }
  .review-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 15px;
  }
  .review-summary > div > span {
    margin: 0;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .doc-quality {
    max-width: 85px;
  }
  .gate-stage {
    gap: 28px;
    padding-inline: 0;
  }
  .gate-story h1 {
    font-size: 35px;
  }
}
@media (max-width: 1050px) {
  .case-layout {
    grid-template-columns: 1fr;
  }
  .evidence-panel {
    position: static;
  }
  .panel-content {
    max-height: 620px;
    padding: 20px;
  }
  .evidence-panel:has(.document-page) .panel-content {
    max-height: 430px;
  }
  .document-page {
    max-width: 600px;
    margin: auto;
  }
  .legal-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .case-stats > div:nth-child(-n + 2) {
    border-bottom: 0;
  }
  .case-stats > div:nth-child(2) {
    border-right: 1px solid var(--line);
  }
  .review-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .review-summary > div {
    display: block;
  }
  .review-summary > div > span {
    margin-bottom: 10px;
  }
  .gate-stage {
    grid-template-columns: 1fr;
  }
  .gate-story h1 {
    font-size: 40px;
  }
  .gate-story p {
    max-width: 480px;
  }
  .gate-document {
    display: none;
  }
  .gate-card {
    max-width: 470px;
    width: 100%;
  }
  .gate .case-layout {
    min-height: 0;
  }
  .gate .rail {
    height: 100vh;
  }
  .top-context > span:first-child {
    display: none;
  }
  .context-divider {
    display: none;
  }
  .case-layout {
    padding-inline: 24px;
  }
  .case-context {
    padding-inline: 24px;
  }
  .banner {
    margin-inline: 24px;
  }
}
@media (max-width: 700px) {
  .app-shell {
    display: block;
  }
  .rail {
    position: relative;
    height: auto;
    padding: 17px 16px 0;
    overflow: visible;
  }
  .brand {
    margin: 0 0 17px;
    padding: 0;
  }
  .workspace-card,
  .rail-label,
  .rail-bottom {
    display: none;
  }
  .side ol {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-color: #7b969b var(--rail);
  }
  .side li {
    flex-shrink: 0;
    margin: 0;
  }
  .side a {
    padding: 9px 12px;
    font-size: 12px;
    min-height: 43px;
    gap: 8px;
  }
  .side small {
    display: none;
  }
  .side .num {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }
  .top {
    padding: 12px 16px;
    gap: 10px;
    min-height: 65px;
  }
  .top-context {
    font-size: 11px;
  }
  .controls {
    gap: 6px;
  }
  .controls #export,
  .controls #reset {
    font-size: 10px;
    padding: 8px 9px;
    min-height: 40px;
  }
  .controls #export svg {
    display: none;
  }
  .controls select {
    font-size: 11px;
    padding: 8px 6px;
    min-height: 40px;
  }
  .case-context {
    padding: 15px 16px 0;
    gap: 8px;
    font-size: 10px;
  }
  .case-context > #case-label {
    flex-basis: 100%;
    order: 3;
    font-size: 11px;
    line-height: 1.7;
  }
  .case-context .tag {
    font-size: 9px;
  }
  .case-id {
    font-size: 9px;
  }
  .banner {
    margin: 12px 16px 0;
    padding: 12px;
    font-size: 10px;
  }
  .case-layout {
    padding: 25px 16px 30px;
    gap: 25px;
  }
  main h1 {
    font-size: 29px;
    letter-spacing: -0.8px;
  }
  .screen-category {
    font-size: 9px;
  }
  .step-indicator {
    font-size: 9px;
  }
  .case-status {
    font-size: 8px;
    padding: 3px 5px;
  }
  .who-copy strong {
    font-size: 10px;
  }
  .avatar {
    width: 29px;
    height: 29px;
    font-size: 10px;
  }
  .overview-hero {
    padding: 22px;
    gap: 14px;
  }
  .overview-hero h2 {
    font-size: 23px;
    line-height: 1.5;
  }
  .overview-hero p {
    font-size: 12px;
  }
  .hero-emblem {
    display: none;
  }
  .case-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-stats > div:nth-child(2) {
    border-right: 0;
  }
  .case-stats > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .case-stats strong {
    font-size: 25px;
  }
  .case-stats span {
    font-size: 10px;
  }
  .coverage-note {
    padding: 15px;
    gap: 10px;
  }
  .coverage-note p {
    font-size: 11px;
  }
  .document-row {
    padding: 14px 13px;
    gap: 10px;
  }
  .document-name strong {
    font-size: 12px;
  }
  .document-name small {
    font-size: 9px;
  }
  .doc-quality {
    font-size: 8px;
    max-width: 72px;
  }
  .document-arrow {
    display: none;
  }
  .section-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .section-heading h2 {
    font-size: 14px;
  }
  .section-heading button {
    font-size: 9px;
  }
  .card {
    padding: 20px;
  }
  .privacy-card .meta {
    font-size: 11px;
  }
  .toggle-row {
    font-size: 11px;
  }
  .mask-preview {
    font-size: 10px;
  }
  .case-timeline li {
    padding-left: 17px;
    padding-bottom: 20px;
  }
  .timeline-content {
    padding: 14px;
  }
  .timeline-content p {
    font-size: 12px;
  }
  .filter-bar {
    gap: 8px;
    padding: 12px;
  }
  .filter-bar label {
    font-size: 10px;
  }
  .filter-bar select {
    font-size: 10px;
    max-width: 220px;
  }
  .question-options {
    padding: 18px;
  }
  .question-option {
    font-size: 12px;
    padding: 13px 10px;
    gap: 9px;
  }
  .answer-card {
    padding: 21px;
  }
  .answer-card h2 {
    font-size: 19px;
  }
  .answer-card > p {
    font-size: 13px;
  }
  .answer-label {
    font-size: 9px;
  }
  .legal-list {
    grid-template-columns: 1fr;
  }
  .flag-card {
    padding: 20px;
  }
  .flag-heading h2 {
    font-size: 16px;
  }
  .flag-heading .chip {
    max-width: 95px;
  }
  .flag-heading {
    flex-wrap: wrap;
    gap: 9px;
  }
  .flag-heading > div {
    flex: 1;
    min-width: 140px;
  }
  .flag-heading > .chip {
    margin-left: 42px;
    max-width: none;
  }
  .flag-card > p {
    font-size: 12px;
  }
  .flag-controls select {
    font-size: 11px;
  }
  .draft-card {
    padding: 20px;
  }
  .draft-heading h2 {
    font-size: 15px;
  }
  .draft-card textarea {
    font-size: 13px;
  }
  .draft-badge {
    font-size: 9px;
  }
  .draft-ready {
    font-size: 11px;
  }
  .review-summary {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .review-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .review-summary > div > span {
    margin: 0;
  }
  .review-check {
    font-size: 12px;
  }
  .approval-card {
    padding: 20px;
  }
  .approval-card > button {
    width: 100%;
    margin-top: 8px;
  }
  .audit-head time {
    margin: 0;
    flex-basis: 100%;
    font-size: 9px;
  }
  .audit-entry {
    padding: 18px;
  }
  .quality-grid {
    gap: 10px;
  }
  .quality-kpi {
    padding: 20px 16px;
  }
  .quality-kpi > strong {
    font-size: 30px;
  }
  .quality-kpi > span:first-child {
    font-size: 11px;
  }
  .quality-kpi .method-label {
    font-size: 8px;
    padding: 3px 5px;
    line-height: 1.7;
  }
  .fairness-row {
    gap: 10px;
  }
  .fairness-row > span {
    font-size: 11px;
    min-width: 115px;
  }
  .fairness-row > strong {
    font-size: 11px;
    min-width: 42px;
  }
  .evidence-panel .panel-content {
    padding: 17px;
  }
  .source-toolbar select {
    max-width: none;
  }
  .evidence-panel:has(.document-page) .panel-content {
    max-height: 420px;
  }
  .paper-identity {
    font-size: 10px;
  }
  .gate .rail {
    height: auto;
    padding-bottom: 17px;
  }
  .gate .brand {
    margin-bottom: 0;
  }
  .gate-stage {
    padding: 12px 0 20px;
    gap: 30px;
  }
  .gate-story h1 {
    font-size: 37px;
    line-height: 1.3;
    letter-spacing: -1.4px;
  }
  .gate-story .gate-eyebrow {
    font-size: 8px;
  }
  .gate-story p {
    font-size: 13px;
  }
  .gate-highlights {
    gap: 10px;
  }
  .gate-highlights span {
    font-size: 9px;
  }
  .gate-card {
    padding: 25px;
  }
  .gate-card h2 {
    font-size: 23px;
  }
  .gate .top {
    justify-content: flex-end;
  }
  .gate .top-context {
    display: none;
  }
  .foot {
    padding: 18px 16px;
    font-size: 9px;
  }
  .screen-bottom > span {
    max-width: 140px;
    text-align: right;
    font-size: 9px;
  }
  .screen-bottom button {
    font-size: 11px;
    padding: 10px 12px;
  }
  .row > button {
    flex-grow: 1;
  }
  .status-message {
    font-size: 11px;
  }
}
@media (forced-colors: active) {
  .highlighted mark {
    background: Highlight;
    color: HighlightText;
  }
  .citation.selected {
    border: 2px solid Highlight;
  }
  .case-logo {
    border: 1px solid CanvasText;
  }
  .ready,
  .pending {
    color: CanvasText;
  }
  .draft-card {
    border-left: 3px solid CanvasText;
  }
  .bar span {
    background: Highlight;
  }
}

/* Generated document-and-evidence symbol; fixed geometry preserves the existing shell. */
.case-logo {
  display: grid;
  place-items: center;
  background: #eff4ee;
}
.case-logo img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}
