:root {
  --application-nav-width: 168px;
}
body.has-application-nav {
  padding-left: var(--application-nav-width);
}
.application-nav {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--application-nav-width);
  z-index: 65;
  background: #f5f7fa;
  border-right: 1px solid #ccd5df;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 7px;
  box-sizing: border-box;
  overflow-y: auto;
}
.application-nav[hidden] {
  display: none;
}
.application-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  color: #25344b;
  border-radius: 4px;
  font-size: 13px;
}
.application-nav button:hover {
  background: #e4eaf3;
}
.application-nav button[aria-current="page"] {
  border-color: #b3c8ed;
  background: #e6efff;
  color: #16469a;
}
.application-nav svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}
.application-nav .application-nav-toggle {
  border-bottom-color: #ccd5df;
  margin-bottom: 12px;
}
body.application-nav-icons {
  --application-nav-width: 52px;
}
.application-nav-icons .application-nav span {
  display: none;
}
.application-nav-icons .application-nav button {
  justify-content: center;
  padding: 8px 2px;
}
.case-builder {
  position: fixed;
  inset: 8px 8px 8px calc(var(--application-nav-width) + 8px);
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 1px solid #b9c6d5;
  border-radius: 4px;
  z-index: 60;
  background: #fff;
  color: #202b3b;
  font:
    14px Arial,
    sans-serif;
}
.case-builder[open] {
  display: flex;
  flex-direction: column;
}
.case-builder * {
  box-sizing: border-box;
  letter-spacing: 0;
}
.case-builder button,
.case-builder select,
.case-builder input,
.case-builder textarea {
  font: inherit;
}
.case-builder button {
  cursor: pointer;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 8px;
  background: #f7f9fc;
  color: #20395c;
  border: 1px solid #c4d0df;
  border-radius: 4px;
}
.case-builder button:hover {
  background: #e6effc;
  border-color: #8ca9d1;
}
.case-builder button:disabled {
  opacity: 0.45;
  cursor: default;
}
.case-builder svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.case-builder input,
.case-builder select,
.case-builder textarea {
  min-width: 0;
  max-width: 100%;
  border: 1px solid #b9c7d9;
  border-radius: 3px;
  padding: 7px;
  background: #fff;
  color: #25344b;
}
.case-builder input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.case-builder button:focus-visible,
.case-builder input:focus-visible,
.case-builder select:focus-visible,
.case-builder textarea:focus-visible {
  outline: 2px solid #2166de;
  outline-offset: 2px;
}
.cb-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid #c3cfdf;
  background: #fff;
  flex: 0 0 auto;
}
.cb-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  flex: 1 1 250px;
}
.cb-heading > div {
  min-width: 0;
}
.cb-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: #52657e;
}
.cb-heading h2 {
  margin: 3px 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.cb-heading p {
  margin: 0;
  font-size: 13px;
  color: #52657e;
  overflow-wrap: anywhere;
}
.cb-issue-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.cb-issue-nav select {
  width: 220px;
}
.cb-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  padding-top: 7px;
  border-top: 1px solid #e0e6ef;
}
.cb-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.cb-toolbar output {
  margin-left: auto;
  font-size: 12px;
  color: #146b4b;
}
.cb-error,
.cb-toolbar output.cb-error {
  color: #a22335;
}
.cb-body {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
.cb-catalog {
  flex: 0 0 250px;
  border-right: 1px solid #c9d3df;
  display: flex;
  min-height: 0;
  flex-direction: column;
  background: #f7f9fc;
}
.cb-catalog[hidden] {
  display: none;
}
.cb-catalog header,
.cb-working > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #d3dce8;
  gap: 8px;
}
.cb-catalog h3,
.cb-working h3 {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.cb-catalog-controls {
  display: grid;
  gap: 7px;
  padding: 10px;
}
.cb-catalog-controls small {
  font-size: 11px;
  color: #556987;
}
.cb-segmented {
  display: flex;
}
.cb-segmented button {
  flex: 1;
  border-radius: 0;
}
.cb-segmented [aria-pressed="true"] {
  background: #e1ebfc;
  color: #164a9d;
}
.cb-catalog-list {
  overflow: auto;
  flex: 1;
  padding: 0 8px;
}
.cb-map {
  flex: 1 1 0;
  min-width: 0;
  overflow: auto;
  padding: 20px;
  background: #f0f3f7;
}
.cb-map-flow {
  min-width: 320px;
  max-width: 1600px;
  margin: auto;
}
.cb-map-empty {
  flex: 1;
  padding: 30px;
}
.cb-issue-node {
  margin: 0 auto;
  width: fit-content;
  max-width: 90%;
  padding: 14px 24px;
  border: 2px solid #506981;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.cb-flow-line {
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #536b84;
}
.cb-flow-line svg {
  height: 28px;
  width: 28px;
}
.cb-section {
  margin-bottom: 12px;
  border-bottom: 1px solid #c6d1df;
  background: #fff;
}
.cb-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  gap: 5px;
  background: #e9eef5;
  border-top: 1px solid #c6d1df;
  border-bottom: 1px solid #c6d1df;
}
.cb-section-title {
  text-align: left;
  justify-content: flex-start !important;
  background: transparent !important;
  border: 0 !important;
  padding: 2px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  min-width: 0;
  overflow-wrap: anywhere;
}
.cb-section-title span {
  font-size: 11px;
  color: #60738e;
}
.cb-section header > div {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.cb-section header > div button {
  padding: 4px;
  min-height: 26px;
  border-color: transparent;
  background: transparent;
}
.section-common {
  max-width: 760px;
  margin: auto;
  border-bottom-color: #94bca9;
}
.section-common > header {
  background: #e3f3e9;
  border-color: #94bca9;
}
.section-disputed > header,
.section-adverse > header {
  background: #fae7ea;
  border-color: #dfb6bd;
}
.section-interpretations > header {
  background: #fff2d7;
}
.cb-sides-scroll {
  overflow-x: auto;
  margin-bottom: 16px;
}
.cb-sides {
  display: grid;
  grid-template-columns: repeat(var(--cb-side-count), minmax(290px, 1fr));
  gap: 18px;
  min-width: calc(var(--cb-side-count) * 300px);
}
.cb-side-heading {
  padding: 10px 12px;
  border-top: 4px solid #40729e;
  background: #e5eef7;
  min-height: 70px;
}
.cb-side-heading h3 {
  margin: 0 0 5px;
  font-size: 17px;
}
.cb-side-heading p {
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.side-1 .cb-side-heading {
  border-color: #947340;
  background: #f4eddd;
}
.side-2 .cb-side-heading {
  border-color: #487563;
  background: #e7f1ec;
}
.side-3 .cb-side-heading {
  border-color: #8b5069;
  background: #f3e7ee;
}
.side-4 .cb-side-heading {
  border-color: #717746;
  background: #eef0df;
}
.cb-shared-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px 18px;
}
.cb-list {
  min-height: 46px;
  padding: 6px;
}
.cb-empty {
  font-size: 12px;
  color: #75839a;
  margin: 8px;
}
.cb-record {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  border: 1px solid #c6d1df;
  border-radius: 3px;
  padding: 8px 6px;
  background: #fff;
  margin-bottom: 6px;
  min-width: 0;
}
.cb-record-content {
  flex: 1;
  min-width: 0;
}
.cb-record-content > button {
  border: 0;
  background: transparent;
  text-align: left;
  justify-content: flex-start;
  padding: 0;
  min-height: 0;
  line-height: 1.35;
  color: #233f67;
  overflow-wrap: anywhere;
  width: 100%;
}
.cb-record strong {
  font-size: 13px;
}
.cb-record-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  font-size: 10px;
}
.cb-record-content small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  color: #536780;
}
.cb-type,
.cb-review {
  padding: 2px 4px;
  border-radius: 2px;
  background: #eef1f6;
}
.type-fact {
  background: #e5eefc;
  color: #19458c;
}
.type-position {
  background: #dcf0ea;
  color: #146957;
}
.type-pattern {
  background: #ffe4b7;
  color: #80520c;
}
.type-legal_rule,
.type-legal_unit,
.type-authority {
  background: #e9e5fa;
  color: #604497;
}
.review-needs_review,
.review-ai_extracted {
  background: #fff0cd;
  color: #896005;
}
.review-human_verified {
  background: #dcf1e6;
  color: #196847;
}
.review-rejected {
  background: #f3dedf;
  color: #913944;
}
.cb-drag-handle {
  cursor: grab;
  color: #8b99ac;
  padding-top: 2px;
  flex: 0 0 16px;
  touch-action: none;
}
.cb-record-tools {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cb-record-tools button {
  padding: 2px;
  min-height: 24px;
  width: 24px;
  border-color: transparent;
  background: transparent;
}
.cb-interpretation {
  font-size: 12px;
  border-left: 2px solid #dfba68;
  padding-left: 6px;
  margin: 7px 0 0;
}
.cb-pattern {
  border: 2px solid #bb903f;
  margin-bottom: 10px;
  background: #fffaf0;
}
.cb-pattern > .cb-record {
  border: 0;
  border-bottom: 1px solid #d6b46e;
  border-radius: 0;
  background: #fff0cf;
  margin: 0;
}
.cb-pattern-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px;
  font-size: 12px;
}
.cb-pattern-facts {
  padding-left: 18px;
}
.sortable-ghost {
  opacity: 0.25;
}
.sortable-fallback {
  box-shadow: 0 4px 14px #0003;
  z-index: 90 !important;
}
.cb-working {
  width: 420px;
  flex: 0 0 420px;
  min-height: 0;
  border-left: 1px solid #bccbdc;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.cb-working-content {
  overflow: auto;
  padding: 12px;
  flex: 1;
  min-width: 0;
}
.cb-working-content h4 {
  margin: 20px 0 8px;
  border-bottom: 1px solid #d5deea;
  padding-bottom: 6px;
  font-size: 14px;
}
.cb-working-content h5 {
  margin: 10px 0 6px;
  font-size: 13px;
}
.cb-working-content p {
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.cb-working form {
  display: grid;
  gap: 12px;
}
.cb-working label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}
.cb-working label input,
.cb-working label textarea,
.cb-working label select {
  font-size: 13px;
  font-weight: 400;
  width: 100%;
}
.cb-working fieldset {
  border: 0;
  border-bottom: 1px solid #d0dae7;
  padding: 0 0 14px;
  display: grid;
  gap: 10px;
}
.cb-working legend {
  padding: 8px 0;
  font-weight: 700;
  font-size: 14px;
}
.cb-working form > button,
.cb-working form footer button {
  width: 34px;
}
.cb-working footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cb-pick-records {
  max-height: 270px;
  overflow: auto;
  border: 1px solid #c7d3e2;
}
.cb-pick-records label {
  display: flex;
  align-items: flex-start;
  padding: 7px;
  border-bottom: 1px solid #e0e6ef;
  gap: 7px;
  cursor: pointer;
}
.cb-pick-records label input {
  width: 16px;
  margin-top: 2px;
}
.cb-pick-records span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cb-pick-records small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
  color: #5d6e87;
}
.cb-record-id {
  font-size: 11px !important;
  color: #617591;
}
.cb-connection,
.cb-side-interpretation,
.cb-intelligence,
.cb-comparison {
  padding: 10px 0;
  border-bottom: 1px solid #d5deea;
}
.cb-issue-choice {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  margin-bottom: 6px;
  width: 100%;
  text-align: left;
}
.cb-working pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.cb-confirm {
  max-width: 440px;
  border: 1px solid #bac7d8;
  border-radius: 4px;
  padding: 20px;
  z-index: 100;
}
.cb-confirm::backdrop {
  background: #17203366;
}
.cb-confirm footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cb-confirm button {
  padding: 8px 10px;
}
.cb-busy [data-cb-form] {
  pointer-events: none;
  opacity: 0.7;
}
.cb-map { background: #fff; padding: 16px; }
.cb-map-flow { min-width: 280px; max-width: 1700px; }
.case-builder .cb-issue-node { display: flex; flex-direction: column; width: 280px; max-width: 100%; min-height: 88px; margin: 0 auto 16px; padding: 12px; background: #e4edff; border: 1px solid #254d9d; color: #162d59; border-radius: 4px; text-align: center; white-space: normal; }
.cb-issue-node strong { font-size: 16px; }
.cb-issue-node span { font-size: 13px; line-height: 1.4; }
.cb-overview-agreement { margin-bottom: 18px; }
.cb-overview-agreement .section-common { max-width: none; }
.cb-case-columns { display: grid; grid-template-columns: repeat(var(--cb-column-count), minmax(0, 1fr)); min-width: calc(var(--cb-column-count) * 260px + (var(--cb-column-count) - 1) * 16px); gap: 16px; align-items: start; }
.cb-side { min-width: 0; }
.cb-side-heading { background: #fff !important; border: 0 !important; min-height: 0; padding: 0 0 8px; text-align: center; }
.cb-side-heading h3 { font-size: 16px; color: #163b2c; }
.side-1 .cb-side-heading h3 { color: #7f2630; }
.cb-side-heading p { font-size: 11px; color: #546471; }
.cb-section { border: 1px solid #c6d1df; border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.cb-section > header { border-top: 0; gap: 6px; }
.cb-section > header > button[data-cb-action="label"] { padding: 3px; min-height: 24px; width: 24px; flex: 0 0 24px; border: 0; background: transparent; }
.cb-section-title { line-height: 1.4; flex-wrap: wrap; }
.cb-section-title svg { flex: 0 0 16px; }
.section-position { background: #edf7f0; border-color: #8dbca1; }
.section-position > header, .section-supporting > header { background: #dff1e6; border-color: #9ec4af; }
.side-1 .section-position { background: #fff0f1; border-color: #d9a0a5; }
.side-1 .section-position > header { background: #fbe2e5; border-color: #d9a0a5; }
.section-position .cb-list { min-height: 78px; }
.section-position .cb-record-content > button { font-size: 14px; }
.cb-side-branch { display: flex; height: 22px; justify-content: space-around; margin-top: -12px; }
.cb-side-branch span:first-child { color: #28744d; }
.cb-side-branch span:last-child { color: #a53143; }
.cb-facts-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.cb-facts-pair .cb-section-title { font-size: 12px !important; }
.cb-legal-spine { min-width: 0; padding-top: 38px; }
.cb-map-arrow { height: 24px; display: flex; justify-content: center; color: #234364; }
.cb-legal-spine .section-rules { border-color: #c7a45d; }
.section-rules > header { background: #fff0ca; }
.section-evidence > header { background: #e6edfa; }
.section-patterns > header { background: #e3f3f2; }
.section-notes > header { background: #edf6f6; }
.cb-section-actions, .cb-panel-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 6px; border-top: 1px solid #e1e7ef; }
.case-builder .cb-section-actions button { background: transparent; border: 0; padding: 3px; color: #1556af; font-size: 12px; min-height: 28px; }
.cb-section-actions > button:first-child { flex: 1; justify-content: flex-start; text-align: left; }
.cb-section-actions > button:last-child:not(:first-child) { width: 28px; padding: 4px; flex: 0 0 28px; }
.cb-record { position: relative; border: 0; border-bottom: 1px solid #e1e7ef; border-radius: 0; background: transparent; padding: 7px 2px; gap: 5px; }
.cb-record:last-child { border-bottom: 0; }
.cb-record-meta { gap: 3px; }
.cb-record-tools { position: absolute; right: 2px; top: 5px; flex-direction: column; gap: 1px; opacity: 0; }
.cb-record:hover > .cb-record-tools, .cb-record:focus-within > .cb-record-tools { opacity: 1; }
.cb-record { min-height: 50px; margin: 0; padding-right: 25px; }
.cb-overview-agreement .cb-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
.cb-overview-agreement .cb-record { min-height: 50px; }
.case-builder .cb-record-tools button { width: 22px; min-height: 22px; height: 22px; padding: 3px; border: 0; background: transparent; }
.cb-record-tools svg { width: 14px; height: 14px; }
.cb-facts-pair .cb-record-meta time { display: none; }
.cb-pattern { border: 0; border-bottom: 1px solid #c7dfdd; background: transparent; border-radius: 0; padding: 0 0 8px; }
.cb-pattern > .cb-record { border: 0; border-bottom: 1px solid #c7dfdd; background: transparent; }
.cb-pattern-heading { padding: 4px; }
.cb-bottom-timeline { margin-top: 4px; }
.cb-timeline-rail { display: flex; gap: 0; overflow-x: auto; border: 1px solid #afbddd; border-bottom: 0; padding: 12px 8px 8px; background: #f0f3ff; border-radius: 4px 4px 0 0; }
.case-builder .cb-timeline-rail button { flex: 0 0 145px; width: 145px; min-height: 75px; position: relative; display: flex; flex-direction: column; justify-content: flex-start; text-align: center; padding: 20px 8px 6px; white-space: normal; background: transparent; border: 0; border-top: 2px solid var(--cb-event-color); border-radius: 0; font-size: 11px; }
.cb-timeline-rail button::before { content: ""; position: absolute; top: -5px; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--cb-event-color); }
.cb-timeline-rail strong { overflow-wrap: anywhere; }
.cb-tabs { display: flex; gap: 8px; border-bottom: 1px solid #ccd5df; margin-bottom: 12px; overflow: auto; }
.case-builder .cb-tabs button { border: 0; background: transparent; border-radius: 0; padding: 8px 3px; min-width: max-content; font-size: 12px; }
.case-builder .cb-tabs [aria-selected="true"] { color: #1556af; border-bottom: 2px solid #2463bd; }
.cb-detail-heading { display: flex; gap: 8px; align-items: flex-start; }
.cb-detail-heading h4 { margin: 0 0 10px; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.cb-detail-heading > button { flex: 0 0 30px; }
.cb-source-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #dce3eb; }
.case-builder .cb-source-row button { text-align: left; justify-content: flex-start; border: 0; background: transparent; }
.cb-details-list { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 8px; font-size: 12px; }
.cb-details-list dt { font-weight: 700; }
.cb-details-list dd { margin: 0; overflow-wrap: anywhere; }
.cb-quick-original { margin-top: 12px; border-top: 1px solid #d5deea; padding-top: 8px; }
.cb-working form .cb-panel-actions > button { width: auto; }
.cb-upload { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; font-size: 12px; }
.cb-upload input { max-width: 160px; font-size: 11px; }
.cb-working p, .cb-working pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1200px) {
  .cb-catalog {
    flex-basis: 205px;
  }
  .cb-working {
    flex-basis: 360px;
    width: 360px;
  }
  .cb-map {
    padding: 12px;
  }
  .cb-body.with-working .cb-catalog {
    display: none;
  }
}
@media (max-width: 760px) {
  :root {
    --application-nav-width: 52px;
  }
  .application-nav span {
    display: none;
  }
  .application-nav button {
    justify-content: center;
    padding: 8px 2px;
  }
  .case-builder {
    inset: 4px 4px 4px calc(var(--application-nav-width) + 4px);
  }
  .cb-header {
    padding: 8px;
    gap: 7px;
  }
  .cb-heading h2 {
    font-size: 18px;
  }
  .cb-issue-nav {
    width: 100%;
  }
  .cb-issue-nav select {
    flex: 1;
    width: 120px;
  }
  .cb-issue-nav button {
    font-size: 11px;
  }
  .cb-toolbar {
    gap: 4px;
  }
  .cb-toolbar output {
    width: 100%;
    margin: 0;
  }
  .cb-body {
    flex-direction: column;
    overflow: auto;
  }
  .cb-catalog {
    flex: 0 0 260px;
    border-bottom: 1px solid #c6d1df;
    border-right: 0;
  }
  .cb-catalog-controls {
    grid-template-columns: 1fr 1fr;
  }
  .cb-map {
    flex: 1 0 450px;
  }
  .cb-map-flow {
    min-width: 0;
  }
  .cb-shared-sections {
    grid-template-columns: minmax(0, 1fr);
  }
  .cb-body.with-working .cb-working {
    flex: 1 0 auto;
    width: 100%;
    order: -1;
    border: 0;
  }
  .cb-body.with-working .cb-map {
    display: none;
  }
  .cb-working-content {
    overflow: visible;
  }
  .cb-issue-node {
    padding: 10px;
    font-size: 15px;
  }
}

/* The map is a reference diagram; its contents are edited in the right pane. */
.cb-map-tools { display:flex; gap:6px; flex-wrap:wrap; align-items:center; padding:7px 12px; border-bottom:1px solid #d1dae7; }
.cb-map-tools label { display:flex; gap:5px; align-items:center; margin-left:auto; font-size:12px; }
.cb-pane-tabs { display:none; }
.cb-catalog { flex:0 0 230px; min-width:0; }
.cb-working { flex:0 0 360px; width:360px; min-width:0; }
.cb-body.with-working .cb-catalog:not([hidden]) { display:flex; }
.cb-catalog-item { display:flex; gap:6px; align-items:center; padding:10px 3px; border-bottom:1px solid #dce4ef; }
.cb-catalog-item > div { flex:1; min-width:0; }
.cb-catalog-item strong { display:block; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.cb-catalog-item small { display:block; color:#586d8b; font-size:10px; margin-top:3px; }
.case-builder .cb-catalog-item button { width:28px; height:28px; min-height:28px; padding:4px; flex:0 0 28px; color:#165bd0; }
.cb-catalog-item .cb-on-map { color:#18724a; }
.cb-catalog-destination { border-left:3px solid #2563eb; padding:6px; background:#eaf2ff; font-size:11px; overflow-wrap:anywhere; }
.cb-body .cb-map { background:#fff; padding:12px; flex:1 1 0; overflow:auto; min-width:0; min-height:0; }
.cb-diagram-frame { position:relative; margin:0 auto; }
.cb-diagram { position:absolute; left:0; top:0; transform-origin:top left; }
.cb-diagram-arrows { position:absolute; left:0; top:0; overflow:visible; pointer-events:none; }
.cb-diagram-arrows path { fill:none; stroke:#253d65; stroke-width:1.5; }
.cb-diagram-arrows marker path { fill:context-stroke; stroke:none; }
.cb-diagram-arrows .cb-custom-arrow { stroke:#0f766e; stroke-width:2; }
.cb-diagram-arrows .cb-arrow-hit { stroke:transparent; stroke-width:14; pointer-events:stroke; cursor:pointer; }
.cb-diagram-arrows text { font:12px Arial,sans-serif; fill:#0f766e; paint-order:stroke; stroke:#fff; stroke-width:4px; }
.case-builder .cb-diagram-node { position:absolute; display:block; overflow:hidden; border:1px solid #b9c9df; border-radius:4px; background:#f9fbff; padding:0; text-align:left; cursor:pointer; color:#142d4e; }
.cb-diagram-node:hover { box-shadow:0 0 0 1px #719ad5; }
.cb-diagram-node.cb-selected { outline:3px solid #2463eb; outline-offset:1px; }
.cb-diagram-node.cb-connect-source { outline:3px dashed #0f766e; }
.cb-diagram-node > header { display:flex; gap:5px; align-items:center; justify-content:space-between; padding:8px; border-bottom:1px solid #d4ddea; background:#e9f0fa; min-height:34px; }
.cb-diagram-node header strong { font-size:13px; line-height:1.25; overflow-wrap:anywhere; }
.cb-diagram-node header > span { font-size:11px; flex-shrink:0; }
.cb-diagram-node ul { padding:7px 10px 2px 22px; margin:0; }
.cb-diagram-node li { font-size:12px; line-height:1.4; margin-bottom:5px; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.cb-diagram-node li::before { content:none; }
.cb-diagram-node li .cb-map-item::before { content:'\2022'; padding-right:5px; color:#507cae; }
.case-builder .cb-diagram-node .cb-map-item { display:inline; width:auto; max-width:100%; min-height:0; padding:0; margin:0; border:0; border-radius:0; background:transparent; color:inherit; font:inherit; text-align:inherit; white-space:normal; overflow-wrap:anywhere; }
.case-builder .cb-diagram-node .cb-map-item:hover { text-decoration:underline; color:#164fac; }
.case-builder .cb-diagram-node .cb-map-item:focus-visible { outline:2px solid #2463eb; outline-offset:-2px; }
.case-builder .cb-position-preview .cb-map-item { font-size:15px; font-weight:600; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.case-builder .cb-diagram-timeline .cb-map-item { font-size:10px; line-height:1.3; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.cb-record-box-label { display:flex; align-items:center; gap:8px; margin:8px 0; font-size:12px; color:#536780; }
.cb-record-box-label span { flex:1; min-width:0; overflow-wrap:anywhere; }
.cb-diagram-node > small { display:block; font-size:10px; padding:2px 8px; }
.case-builder .cb-diagram-issue { background:#e3ebfc; border-color:#224dd0; text-align:center; padding:12px; }
.cb-diagram-issue strong { display:block; font-size:17px; margin-bottom:7px; }
.cb-diagram-issue span { display:block; font-size:13px; line-height:1.35; }
.cb-diagram-node.section-position { background:#edf8f1; border-color:#92c4a6; }
.cb-diagram-node.section-position > header { background:#d9eee2; }
.cb-diagram-node.section-position.cb-side-tone-1 { background:#fff0f1; border-color:#ed9daa; }
.cb-diagram-node.section-position.cb-side-tone-1 > header { background:#fadddf; }
.cb-position-preview { padding:9px; text-align:center; }
.cb-position-preview strong { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; font-size:15px; line-height:1.3; overflow-wrap:anywhere; }
.cb-position-preview span { display:block; font-size:12px; margin-top:5px; line-height:1.3; }
.cb-diagram-node.section-supporting, .cb-diagram-node.section-common { background:#f0faf4; border-color:#a3cdb5; }
.cb-diagram-node.section-supporting > header, .cb-diagram-node.section-common > header { background:#dfefe5; }
.cb-diagram-node.section-supporting li::before { color:#16824d; }
.cb-agreement-pending { display:block; color:#805414; font-size:11px; font-weight:400; }
.cb-diagram-node.section-common > header, .cb-diagram-node.section-disputed > header { flex-wrap:wrap; gap:2px 8px; }
.cb-diagram-node.section-common > header > span, .cb-diagram-node.section-disputed > header > span { font-size:10px; white-space:nowrap; }
.cb-diagram-node.section-adverse, .cb-diagram-node.section-disputed { background:#fff3f4; border-color:#ecb0b9; }
.cb-diagram-node.section-adverse > header, .cb-diagram-node.section-disputed > header { background:#fce1e5; }
.cb-diagram-node.section-adverse li::before { color:#b4233f; }
.cb-diagram-node.section-rules { background:#fff9ec; border-color:#d7b261; }
.cb-diagram-node.section-rules > header { background:#fff0ce; }
.cb-diagram-node.section-patterns { background:#f0fbfa; border-color:#93cfc8; }
.cb-diagram-node.section-patterns > header { background:#daf1ee; }
.cb-diagram-node.section-timeline { background:#f0edff; border-color:#b7afe2; }
.cb-diagram-node.section-timeline > header { background:#ebe6ff; }
.cb-diagram-timeline { display:flex; padding:12px 8px 8px; overflow-x:auto; height:calc(100% - 35px); box-sizing:border-box; align-items:flex-start; }
.cb-diagram-timeline > div { flex:1 0 140px; min-width:0; position:relative; border-top:2px solid var(--cb-dot); text-align:center; padding:10px 4px 0; }
.cb-diagram-timeline time { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cb-chronology-item { border-left:3px solid var(--cb-timeline-color); padding-left:8px; }
.cb-diagram-timeline i { position:absolute; width:7px; height:7px; background:var(--cb-dot); border-radius:50%; left:calc(50% - 4px); top:-5px; }
.cb-diagram-timeline time, .cb-diagram-timeline span { display:block; font-size:10px; line-height:1.3; overflow-wrap:anywhere; }
.cb-diagram-node.section-notes > header { background:#e1f2f1; }
.cb-diagram-node.section-notes li, .cb-diagram-node.section-interpretations li, .cb-diagram-node.section-unplaced li { -webkit-line-clamp:1; }
.cb-box-heading h2 { font-size:20px; line-height:1.3; margin:0 0 7px; overflow-wrap:anywhere; }
.cb-box-heading small { color:#526783; font-size:11px; }
.cb-box-item { display:flex; gap:5px; align-items:flex-start; border-bottom:1px solid #dce4ef; padding:9px 0; }
.cb-box-item-body { flex:1; min-width:0; }
.case-builder .cb-box-item-body > button { display:block; border:0; background:transparent; text-align:left; padding:0; min-height:0; font-size:13px; overflow-wrap:anywhere; }
.cb-box-item-body small { display:block; font-size:10px; line-height:1.35; margin-top:4px; color:#546b88; }
.cb-box-item-tools { display:grid; grid-template-columns:repeat(2,24px); gap:2px; flex:0 0 50px; }
.case-builder .cb-box-item-tools button { width:24px; height:24px; min-height:24px; padding:3px; border:0; background:transparent; }
.cb-box-item-tools svg { width:15px; height:15px; }
.cb-box-items { margin-bottom:15px; }
.cb-position-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.cb-size-control { display:flex; align-items:center; gap:8px; margin:12px 0; font-size:12px; }
.cb-size-control select { flex:1; min-width:0; }
.cb-body .cb-map.cb-measuring { display:block !important; }
.case-builder .cb-auto-size { min-height:48px; }
.case-builder .cb-auto-size li, .case-builder .cb-auto-size .cb-map-item { display:block; -webkit-line-clamp:unset; overflow:visible; }
.cb-auto-size ul { padding-bottom:10px; }
.cb-auto-size .cb-position-preview > div + div { margin-top:8px; }
.cb-auto-size .cb-diagram-timeline { height:auto; }
.cb-pending { display:flex; align-items:center; gap:5px; border-bottom:1px solid #dce4ef; padding:6px 0; }
.case-builder .cb-pending > button:first-child { flex:1; min-width:0; text-align:left; justify-content:flex-start; font-size:12px; overflow-wrap:anywhere; }
.cb-derived-status { display:block; font-size:11px; color:#5b6c84; padding:10px 0; }
@media (max-width:1100px) {
  .cb-pane-tabs { display:flex; gap:4px; flex-wrap:wrap; }
  .cb-map-tools label { margin-left:0; }
  .cb-body { flex-direction:row; overflow:hidden; }
  .cb-body .cb-catalog, .cb-body.with-working .cb-catalog:not([hidden]), .cb-body .cb-working, .cb-body.with-working .cb-working, .cb-body .cb-map, .cb-body.with-working .cb-map { display:none; }
  .cb-body.cb-screen-map .cb-map, .cb-body.cb-screen-catalog .cb-catalog:not([hidden]), .cb-body.cb-screen-details .cb-working { display:flex; flex:1 1 0; width:100%; min-height:0; border:0; }
  .cb-body.cb-screen-map .cb-map { display:block; }
  .cb-working-content { overflow:auto; }
  .cb-catalog-controls { grid-template-columns:minmax(0,1fr); }
  .cb-pane-tabs [aria-pressed='true'] { color:#1d4ed8; background:#e8f0ff; }
}
/* Record actions and existing Pattern members in the Case Builder working panel. */
.cb-record-actions { display:flex; flex-wrap:wrap; gap:6px; padding:10px 0; border-bottom:1px solid #d5deea; margin-bottom:12px; }
.cb-record-actions button { display:inline-flex; align-items:center; gap:5px; }
.cb-record-actions .cb-delete-original { color:#a32132; border-color:#e7bac1; }
.cb-pattern-member { display:grid; grid-template-columns:minmax(0,1fr) minmax(105px,.8fr); gap:10px; padding:12px 0; border-bottom:1px solid #d5deea; }
.cb-pattern-member button { text-align:left; overflow-wrap:anywhere; }
.cb-pattern-member small { display:block; margin-top:5px; }
.cb-pattern-files { display:flex; flex-direction:column; gap:6px; }
.cb-pattern-evidence { display:inline-flex; align-items:flex-start; gap:5px; text-align:left; max-width:100%; }
.cb-pattern-evidence svg { flex:none; width:16px; height:16px; }
.cb-pattern-evidence span { min-width:0; overflow-wrap:anywhere; }
.cb-preserve-text { white-space:pre-wrap; }
