@charset "UTF-8";
:root {
  --ink: #28353d;
  --muted: #77818a;
  --wine: #934458;
  --wine-dark: #703247;
  --rose: #f4e9ec;
  --paper: #fff;
  --canvas: #f4f5f5;
  --line: #e2e6e7;
  --nav: #26363f;
  --good: #347568;
  --amber: #966927;
  --radius: 12px;
  font-family:
    Raleway,
    "Avenir Next",
    Avenir,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #bf8696;
}
button {
  cursor: pointer;
}
a {
  color: var(--wine);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 7px;
  padding: 9px 13px;
  font-weight: 600;
  line-height: 1.25;
  transition: background 0.15s;
}
button:hover {
  background: #f3f0f1;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: var(--wine);
  border-color: var(--wine);
  color: white;
}
.primary:hover {
  background: var(--wine-dark);
}
.secondary {
  background: var(--rose);
  border-color: transparent;
  color: var(--wine-dark);
}
.text-button {
  border: 0;
  background: transparent;
  padding: 5px 0;
  color: var(--wine);
}
.small {
  font-size: 11px;
  padding: 6px 8px;
}
.icon-button {
  padding: 5px 8px;
  border-color: transparent;
  background: transparent;
}
input,
select,
textarea {
  background: white;
  border: 1px solid #d6dcdf;
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.55;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--wine);
}
input[type="range"] {
  padding: 0;
  accent-color: var(--wine);
}
label {
  display: block;
  color: #54616b;
  font-size: 12px;
  font-weight: 600;
  margin: 13px 0 5px;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.9px;
  line-height: 1.2;
  font-weight: 600;
}
h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 15px;
  font-weight: 650;
}
p {
  line-height: 1.65;
}
svg {
  vertical-align: middle;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: var(--wine);
  margin-bottom: 13px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  padding: 4px 6px;
  background: #edf0f1;
  color: #65747e;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.3px;
}
.tag.rose {
  background: var(--rose);
  color: var(--wine);
}
.tag.green {
  background: #e7f1ed;
  color: var(--good);
}
.tag.amber {
  background: #f8efdf;
  color: var(--amber);
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 12px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  letter-spacing: -0.7px;
  font-weight: 500;
  color: inherit;
}
.brand strong {
  font-weight: 700;
}
.brand-mark {
  width: 29px;
  height: 29px;
  border: 1.5px solid currentColor;
  border-radius: 9px;
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  font-size: 20px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 1000;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 12px;
}
.loading {
  padding: 80px;
  text-align: center;
}
.notice {
  border-left: 3px solid var(--wine);
  background: #f8f1f3;
  padding: 13px 17px;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 0 6px 6px 0;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
}
.empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
}
.footer {
  font-size: 9px;
  line-height: 1.7;
  color: #7b858c;
  padding: 22px 28px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
}
.shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  border: 2px solid #8d969e;
  background: var(--canvas);
  box-shadow: inset 0 0 0 1px #ffffffb3;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--nav);
  color: #dce2e5;
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
}
.sidebar .brand {
  margin: 0 10px 28px;
  color: white;
}
.sidebar .tag {
  background: #ffffff10;
  color: #c6cfd4;
  margin: 0 10px 27px;
  align-self: start;
}
.nav-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #82939e;
  margin: 25px 14px 10px;
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  width: 100%;
  border: 0;
  color: #bfcbd1;
  background: transparent;
  padding: 12px 13px;
  margin: 2px 0;
  font-size: 12px;
  font-weight: 500;
}
.nav-button:hover {
  background: #ffffff08;
  color: white;
}
.nav-button.active {
  background: #fff;
  color: var(--wine);
  box-shadow: 0 3px 10px #0001;
}
.nav-button .nav-number {
  opacity: 0.55;
  width: 17px;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 11px 0;
  font-size: 10px;
  color: #95a5af;
  line-height: 1.6;
}
.main-column {
  min-width: 0;
}
.topbar {
  height: 66px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  gap: 10px;
}
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  background: var(--rose);
  color: var(--wine);
  border-radius: 50%;
  width: 31px;
  height: 31px;
  font-size: 11px;
  font-weight: 700;
}
.user-name {
  font-size: 11px;
  font-weight: 600;
}
.user-role {
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
}
.content {
  padding: 28px 30px;
  max-width: 1900px;
  margin: auto;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin: 8px 0 25px;
}
.page-head p {
  font-size: 12px;
  color: var(--muted);
  max-width: 650px;
  margin-bottom: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 25px 0;
}
.stat {
  padding: 18px 21px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat b {
  display: block;
  font-size: 27px;
  font-weight: 500;
  margin-bottom: 5px;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
}
.case-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
.case-category-tabs [aria-selected="true"] {
  background: #8e1b29;
  color: white;
  border-color: #711320;
}
.case-category-tabs .tag {
  margin-left: 0.5rem;
}
.demo-catalogue-section {
  margin-top: 1.5rem;
}
.demo-catalogue-section .form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.demo-catalogue-section [data-demo-results] button {
  margin: 0.2rem 0.2rem 0.2rem 0;
}
@media (max-width: 720px) {
  .demo-catalogue-section .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #case-category-panel > .section-heading {
    flex-wrap: wrap;
  }
  #case-category-panel .searchbar {
    width: 100%;
    max-width: none;
  }
  [data-demo-results] table,
  [data-demo-results] tbody,
  [data-demo-results] tr,
  [data-demo-results] th,
  [data-demo-results] td {
    display: block;
    width: auto;
  }
  [data-demo-results] thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  [data-demo-results] tr[data-demo-id] {
    border: 1px solid var(--line);
    border-radius: 7px;
    margin: 0.75rem 0;
  }
  [data-demo-results] tr[data-demo-id] th,
  [data-demo-results] tr[data-demo-id] td {
    border: 0;
    padding: 0.5rem 0.75rem;
  }
  [data-demo-results] tr[data-demo-id] td:nth-child(2)::before,
  [data-demo-results] tr[data-demo-id] td:nth-child(3)::before {
    display: block;
    font-weight: 700;
    margin-bottom: 0.25rem;
  }
  [data-demo-results] tr[data-demo-id] td:nth-child(2)::before {
    content: "Setting / subtype";
  }
  [data-demo-results] tr[data-demo-id] td:nth-child(3)::before {
    content: "Markers / history";
  }
}
.patient-creation {
  margin-bottom: 1.5rem;
}
.case-list {
  display: grid;
  gap: 13px;
}
.case-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 150px;
  gap: 24px;
  align-items: center;
  padding: 23px 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  border-left: 3px solid #bb7b8b;
}
.case-card h3 {
  margin: 10px 0 6px;
  font-size: 17px;
}
.case-card p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}
.case-card .date {
  font-size: 12px;
}
.searchbar {
  display: flex;
  gap: 12px;
  max-width: 500px;
}
.searchbar select {
  max-width: 170px;
}
.workspace-head {
  margin-bottom: 19px;
}
.case-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
}
.timeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: auto;
  margin: 20px 0;
}
.timeline-node {
  position: relative;
  min-width: 160px;
  flex: 1;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 11px;
}
.timeline-node small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}
.timeline-node.selected {
  border-color: #b47385;
  background: #fbf5f7;
  box-shadow: inset 0 0 0 1px #b47385;
}
.timeline-node.planned {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}
.timeline-link {
  width: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #aab3b9;
}
.context-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px 16px;
}
.context-bar label {
  margin: 0 0 4px;
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.context-bar select {
  font-size: 12px;
  max-width: 500px;
  padding: 7px;
}
.action-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 17px 0 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--canvas);
  padding: 8px 0;
}
.state-line {
  font-size: 10px;
  color: var(--muted);
}
.state-line strong {
  color: var(--wine);
  font-weight: 600;
}
.pane-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 11px;
}
.pane-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 10px;
  font-weight: 400;
}
.pane-controls input[type="range"] {
  max-width: 90px;
}
.panes {
  display: grid;
  grid-template-columns: var(--prior, 1fr) var(--current, 1.12fr) var(
      --scenario,
      1fr
    );
  gap: 13px;
  align-items: start;
}
.pane {
  display: flex;
  flex-direction: column;
  height: 840px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  overflow: hidden;
  min-width: 0;
}
.pane.current {
  border-color: #ba8291;
  box-shadow: 0 3px 20px #a4435708;
}
.pane-header {
  flex: 0 0 auto;
  padding: 15px 15px 13px;
  border-bottom: 1px solid var(--line);
  min-height: 0;
}
.pane-header .pane-title {
  font-size: 12px;
  font-weight: 700;
}
.pane-header select {
  margin-top: 11px;
  font-size: 10px;
  padding: 7px;
}
.pane.current .pane-header {
  background: #fcf7f8;
}
.pane.scenario .pane-header {
  background: #f9f8f3;
}
.pane-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #ccd2d5 transparent;
}
.pane-section {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f1;
  min-height: 0;
}
.pane-section h4 {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: #78858d;
  margin: 0 0 8px;
}
.pane-section p {
  font-size: 11px;
  line-height: 1.55;
  margin-bottom: 8px;
}
.pane-section textarea {
  font-size: 11px;
  min-height: 90px;
}
.pane-section label {
  font-size: 10px;
}
.source-note {
  border-left: 2px solid #d1d8dc;
  padding-left: 10px;
  margin: 13px 0;
}
.source-note strong {
  font-size: 11px;
}
.source-note blockquote {
  font-size: 10px;
  line-height: 1.6;
  color: #77818a;
  margin: 7px 0;
}
.source-note .meta {
  font-size: 9px;
  color: #88939a;
  line-height: 1.6;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
  margin-bottom: 9px;
  text-align: left;
  width: 100%;
  font-weight: 400;
}
.metric .value {
  display: block;
  font-size: 19px;
  line-height: 1.5;
  color: var(--wine);
  font-weight: 600;
  margin: 6px 0;
}
.metric small {
  font-size: 10px;
  line-height: 1.5;
  display: block;
  color: var(--muted);
}
.assumptions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.assumptions input {
  font-size: 12px;
  padding: 7px;
}
.assumptions label {
  font-size: 9px;
  line-height: 1.5;
  margin-top: 5px;
}
.assumptions .unit {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.panes.expanded {
  grid-template-columns: 1fr;
}
.panes.expanded .pane:not(.is-expanded) {
  display: none;
}
.pane-tabs {
  display: none;
}
.override {
  border-left: 2px solid var(--amber);
  padding-left: 8px;
  color: var(--amber);
  font-size: 10px;
  margin: 8px 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 34px 0 15px;
  gap: 15px;
}
.section-heading h2 {
  margin: 0;
}
.evidence-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 15px;
}
.evidence-item {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.evidence-item:last-child {
  border-bottom: 0;
}
.evidence-item h3 {
  font-size: 12px;
  margin-bottom: 7px;
}
.evidence-item p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.reference-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.reference-tabs button {
  font-size: 10px;
}
.reference-tabs button.active {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--wine);
}
.graph-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.graph-item {
  border: 1px dashed #d5dadf;
  border-radius: 8px;
  padding: 15px;
}
.graph-item h3 {
  font-size: 12px;
  margin: 9px 0;
}
.graph-item p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.versions {
  display: grid;
  gap: 10px;
}
.version-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.version-row h3 {
  font-size: 12px;
  margin: 0 0 5px;
}
.version-row p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.version-row a {
  font-size: 11px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
td select {
  min-width: 120px;
}
.report-status {
  padding: 10px;
  background: var(--rose);
  font-size: 12px;
  margin-bottom: 15px;
}
.land {
  background: #fcfbfa;
  min-height: 100vh;
}
.land header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 7%;
  border-bottom: 1px solid var(--line);
}
.land .brand {
  color: var(--wine);
}
.hero {
  padding: 85px 7% 70px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 70px;
  align-items: center;
  max-width: 1450px;
  margin: auto;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.13;
  letter-spacing: -2px;
  font-weight: 500;
  max-width: 650px;
}
.hero h1 em {
  font-style: normal;
  color: var(--wine);
}
.hero .intro {
  color: var(--muted);
  font-size: 16px;
  max-width: 490px;
  line-height: 1.8;
  margin: 25px 0 30px;
}
.hero button {
  padding: 13px 18px;
}
.hero-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.8;
}
.hero-preview {
  border: 1px solid #dfe2e4;
  background: white;
  border-radius: 15px;
  padding: 26px;
  box-shadow: 0 25px 60px #28353d0d;
  transform: rotate(-1deg);
}
.hero-preview .eyebrow {
  font-size: 9px;
}
.mini-title {
  font-size: 19px;
  line-height: 1.5;
  margin: 16px 0 22px;
}
.mini-row {
  padding: 15px 0;
  display: flex;
  align-items: center;
  gap: 15px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.mini-num {
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--rose);
  color: var(--wine);
  font-size: 10px;
}
.features {
  padding: 35px 7% 55px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  border-top: 1px solid var(--line);
}
.features h3 {
  font-size: 15px;
}
.features p {
  font-size: 12px;
  color: var(--muted);
  max-width: 320px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background: linear-gradient(120deg, #eef0f1, #fcf9fa);
}
.login-card {
  max-width: 430px;
  width: 100%;
  padding: 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 15px 70px #26363f0c;
}
.login-card .brand {
  color: var(--wine);
  margin-bottom: 35px;
}
.login-card h1 {
  font-size: 25px;
}
.login-card button[type="submit"] {
  width: 100%;
  margin: 20px 0 15px;
}
.login-card .hint {
  margin: 20px 0;
}
.form-error {
  color: #9c334d;
  background: #f9edf0;
  border-radius: 6px;
  font-size: 12px;
  padding: 10px;
  margin-top: 13px;
}
.form-error:empty {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0;
  width: min(850px, 94vw);
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 25px 90px #0003;
}
dialog::backdrop {
  background: #1d2b3866;
  backdrop-filter: blur(2px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}
.dialog-head h2 {
  margin: 0;
  font-size: 19px;
}
.dialog-body {
  padding: 22px 24px;
}
.dialog-body p {
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.dialog-body iframe {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
}
.report-layout {
  display: grid;
  gap: 18px;
}
.inspect-dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  font-size: 12px;
  gap: 10px;
}
.inspect-dl dt {
  color: var(--muted);
}
.inspect-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    11px/1.6 ui-monospace,
    monospace;
  padding: 15px;
  background: #f3f5f6;
  border-radius: 6px;
  max-height: 350px;
  overflow: auto;
}
#toast {
  position: fixed;
  bottom: 23px;
  right: 25px;
  max-width: 440px;
  background: #26363f;
  color: white;
  font-size: 12px;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 7px 25px #0002;
  z-index: 100;
  display: none;
}
#toast.visible {
  display: block;
}
#toast.error {
  background: #87384b;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--wine);
  padding: 6px 0;
}
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.6;
  font-weight: 400;
}
.check-label input {
  flex-shrink: 0;
  margin-top: 3px;
}
.nowrap {
  white-space: nowrap;
}
section[id] {
  scroll-margin-top: 80px;
}
@media (min-width: 1600px) {
  .pane {
    height: 900px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 12px;
  }
  .sidebar .brand {
    font-size: 19px;
    margin-left: 4px;
  }
  .content {
    padding: 24px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .pane-section {
    padding: 12px;
  }
  .context-bar {
    align-items: flex-start;
  }
  .case-card {
    grid-template-columns: 1fr 120px;
  }
  .case-card .date-group {
    display: none;
  }
  .hero {
    gap: 35px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .graph-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 850px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 18px;
    gap: 14px;
    overflow: auto;
  }
  .sidebar .brand {
    margin: 0;
    font-size: 18px;
    white-space: nowrap;
  }
  .sidebar .brand-mark {
    width: 24px;
    height: 24px;
  }
  .sidebar .tag,
  .sidebar .nav-label,
  .sidebar-bottom,
  .sidebar .reference-nav {
    display: none;
  }
  .sidebar nav {
    display: flex;
  }
  .nav-button {
    width: auto;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 10px;
  }
  .nav-button .nav-number {
    display: none;
  }
  .topbar {
    height: 57px;
  }
  .content {
    padding: 22px 18px;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .panes {
    display: block;
  }
  .pane-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
  }
  .pane-tabs button {
    flex: 1;
    font-size: 11px;
  }
  .pane-tabs .active {
    background: var(--wine);
    color: white;
  }
  .panes .pane {
    display: none;
  }
  .panes .pane.mobile-active {
    display: flex;
  }
  .panes.expanded .pane.is-expanded {
    display: flex;
  }
  .pane {
    height: 780px;
  }
  .pane-controls .width-control {
    display: none;
  }
  .context-bar {
    flex-direction: column;
  }
  .action-strip {
    align-items: flex-start;
    flex-direction: column;
  }
  .state-line {
    font-size: 9px;
  }
  .evidence-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 50px;
    gap: 45px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .hero-preview {
    max-width: 540px;
    transform: none;
  }
  .features {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .features p {
    max-width: none;
  }
  .case-card {
    gap: 15px;
    padding: 19px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 15px;
  }
  .stat b {
    font-size: 24px;
  }
  .graph-grid {
    grid-template-columns: 1fr 1fr;
  }
  .version-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .inspect-dl {
    grid-template-columns: 1fr;
  }
  .inspect-dl dd {
    margin-bottom: 9px;
  }
}
@media (max-width: 500px) {
  .sidebar {
    flex-wrap: wrap;
  }
  .sidebar nav {
    width: 100%;
    overflow: auto;
  }
  .topbar .breadcrumb span:last-child {
    display: none;
  }
  .content {
    padding: 19px 13px;
  }
  .page-head {
    flex-direction: column;
  }
  .case-card {
    grid-template-columns: 1fr;
  }
  .case-card button {
    justify-self: start;
  }
  .stats .stat span {
    font-size: 9px;
  }
  .graph-grid,
  .grid2 {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 38px;
  }
  .land header {
    padding: 22px 7%;
  }
  .land header .tag {
    display: none;
  }
  .dialog-head {
    padding: 18px;
  }
  .dialog-body {
    padding: 18px;
  }
  .user-name {
    font-size: 10px;
  }
  .action-strip button {
    font-size: 11px;
    padding: 8px 10px;
  }
  .footer {
    padding: 20px 14px;
  }
  .pane-controls {
    gap: 7px;
    flex-wrap: wrap;
  }
}

.dependency-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 780px;
  margin: 8px 0;
}
.dependency-strip button {
  font-size: 10px;
  white-space: nowrap;
}
.dependency-line {
  flex: 1;
  min-width: 18px;
  border-top: 1px dashed #b9a0a9;
}
.dependency-strip > span.hint {
  font-size: 10px;
  text-align: center;
}
@media (max-width: 500px) {
  .dependency-strip {
    gap: 5px;
    flex-wrap: wrap;
  }
  .dependency-strip button {
    font-size: 9px;
    padding: 6px;
  }
  .dependency-strip > span.hint {
    max-width: 70px;
    font-size: 9px;
  }
}

/* Bounded customization remains a compact, optional workspace tool. */
.patient-context-summary {
  border: 1px solid var(--line);
  border-left: 3px solid var(--wine);
  border-radius: 10px;
  background: #fff;
  padding: 13px 16px;
  margin: 16px 0;
}
.patient-context-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 0.85fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.patient-context-grid > div {
  min-width: 0;
}
.context-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #68747d;
  margin-bottom: 4px;
}
.patient-context-grid p {
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
}
.context-attention {
  background: #fff4df;
  border-radius: 6px;
  padding: 6px 8px;
}
.workspace-customization {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  margin: 14px 0;
}
.workspace-customization > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
}
.workspace-customization > summary > span:first-child::before {
  content: "+ ";
  color: var(--wine);
}
.workspace-customization[open] > summary > span:first-child::before {
  content: "− ";
}
.customization-content {
  padding: 0 15px 15px;
}
.customization-status p {
  margin: 5px 0;
  font-size: 12px;
}
.presentation-settings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 0;
}
.presentation-settings strong {
  font-size: 11px;
  font-weight: 600;
}
.customization-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}
.customization-controls select {
  flex: 1;
}
.customization-controls button {
  flex-shrink: 0;
  font-size: 11px;
}
.customization-alert {
  margin: 12px 0;
}
.customization-notice {
  font-size: 12px;
  border-left: 3px solid var(--wine);
  padding-left: 10px;
}
.customization-proposal {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.proposal-summary {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.customization-proposal th,
.customization-proposal td {
  overflow-wrap: anywhere;
}
.assumption-proposal {
  background: #f2edf8;
  color: #604379;
}
.capture-explanation {
  margin-bottom: 0;
  padding-top: 10px;
}
#display-history code {
  font-size: 10px;
  overflow-wrap: anywhere;
  word-break: break-all;
}
#display-history .version-row > div {
  min-width: 0;
}
.source-detail {
  margin-top: 8px;
}
.source-detail > summary {
  font-size: 10px;
  color: var(--wine);
  cursor: pointer;
}
[data-workspace-density="compact"] .pane-section {
  padding: 12px;
}
[data-workspace-density="compact"] .source-note {
  padding: 9px;
  margin-top: 8px;
}
[data-workspace-density="compact"] .pane-section p {
  margin-top: 6px;
  margin-bottom: 7px;
}
[data-workspace-density="compact"] .pane-section textarea {
  min-height: 54px;
  line-height: 1.4;
}
[data-workspace-density="compact"] .metric {
  padding: 10px;
}
[data-workspace-emphasis="attention"] .context-attention,
[data-workspace-emphasis="attention"] #next-evidence .evidence-item {
  border-left: 3px solid #bb7d1d;
  background: #fff6e7;
  padding-left: 10px;
}
[data-workspace-emphasis="assumptions"]
  .pane-section[data-section="assumptions"] {
  background: #f5f0fa;
  border-left: 3px solid #8865a2;
}
[data-workspace-emphasis="assumptions"] .override {
  background: #f0e9f7;
  color: #604379;
}
@media (max-width: 1050px) {
  .patient-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .customization-controls {
    flex-wrap: wrap;
  }
  .customization-controls select {
    flex-basis: 100%;
  }
}
@media (max-width: 500px) {
  .patient-context-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .patient-context-summary {
    padding: 12px;
  }
  .presentation-settings {
    grid-template-columns: repeat(2, 1fr);
  }
  .workspace-customization > summary {
    align-items: flex-start;
  }
  .workspace-customization > summary .tag {
    font-size: 8px;
  }
  .customization-controls button {
    flex: 1;
  }
  #display-history .row {
    gap: 12px;
  }
}

.soc-assessment {
  padding: 11px;
  border: 1px solid #ddc8ce;
  border-left: 3px solid var(--wine);
  border-radius: 8px;
  background: #fffafb;
  margin: 9px 0 14px;
}
.soc-assessment h5,
.hypothesis-heading {
  font-size: 12px;
  margin: 0 0 8px;
}
.soc-assessment p {
  font-size: 11px;
  line-height: 1.5;
}
.soc-assessment .tag {
  font-size: 8px;
  white-space: normal;
}
.hypothesis-heading {
  color: #654879;
  padding-top: 3px;
}
.assumption-basis,
.source-passage-link {
  font-size: 10px;
  text-align: left;
  white-space: normal;
  line-height: 1.45;
}
.inline-evidence {
  margin: -3px 0 12px;
}
.soc-report-status {
  margin: 13px 0;
}
.note-selector {
  display: grid;
  gap: 9px;
  margin: 10px 0 15px;
}
.note-selector > div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.note-selector label {
  margin: 0;
  align-items: flex-start;
}
.note-evidence-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.note-evidence-item blockquote {
  margin: 8px 0;
  font-size: 12px;
  border-left: 3px solid #bbabca;
  padding: 0 10px;
}
.owner-ai-config {
  max-width: 850px;
}
.owner-ai-config input:not([type="checkbox"]) {
  max-width: 620px;
}
.owner-ai-config .check-label {
  margin: 15px 0;
}

.combination-card {
  border: 1px solid #d9cedc;
  border-left: 3px solid #887098;
  border-radius: 7px;
  padding: 11px;
  margin: 10px 0;
  background: #faf8fb;
}
.combination-card p {
  margin: 5px 0;
}
.combination-list {
  margin-bottom: 14px;
}
.quick-practice li {
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Reference cockpit: compact provenance and deliberate analysis intake. */
.reference-recovery {
  margin-top: 20px;
}
.reference-recovery td:first-child {
  width: 26%;
}
.reference-recovery td:nth-child(2) {
  width: 16%;
}
.reference-recovery td {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .reference-recovery table,
  .reference-recovery tbody {
    display: block;
  }
  .reference-recovery thead {
    display: none;
  }
  .reference-recovery tr {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }
  .reference-recovery td,
  .reference-recovery td:first-child,
  .reference-recovery td:nth-child(2) {
    width: auto;
    border: 0;
    padding: 6px 3px;
  }
  .reference-recovery td:last-child {
    grid-column: 1 / -1;
  }
}
.reference-subnav {
  font-size: 11px;
  padding: 8px 12px 8px 28px;
}
.reference-context {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.reference-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.reference-lane {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px;
  min-width: 0;
}
.reference-lane.helpful {
  background: #f7eef0;
  border-color: #e8d0d8;
}
.reference-lane .eyebrow {
  font-size: 10px;
  margin-bottom: 14px;
}
.reference-lane p {
  font-size: 12px;
  line-height: 1.65;
}
.reference-lane h3 {
  font-size: 15px;
}
.reference-counts {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 3px 8px;
}
.reference-counts strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.reference-counts span {
  font-size: 11px;
  color: var(--muted);
}
.reference-soc {
  border-left: 4px solid var(--amber);
  margin: 26px 0;
}
.reference-soc p {
  max-width: 850px;
  font-size: 13px;
  line-height: 1.7;
}
.reference-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.reference-module-card {
  text-align: left;
  padding: 22px;
  border-radius: 12px;
  min-width: 0;
}
.reference-module-card h3 {
  font-size: 19px;
  margin: 16px 0 10px;
}
.reference-module-card p {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  min-height: 43px;
  color: #59656e;
}
.reference-module-number {
  display: flex;
  justify-content: space-between;
  color: var(--wine);
  font-size: 11px;
}
.reference-module-number span {
  font-size: 19px;
}
.reference-classification {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 26px 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.reference-classification p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.reference-dataset-list {
  display: grid;
  gap: 8px;
}
.reference-dataset {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px 18px;
}
.reference-dataset .check-label {
  margin: 0;
  min-width: 0;
}
.reference-dataset .check-label span {
  min-width: 0;
}
.reference-dataset .check-label strong {
  display: block;
  overflow-wrap: anywhere;
}
.reference-dataset .check-label .hint {
  display: block;
  margin-top: 6px;
}
.reference-dataset-state {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.reference-dataset-state .hint {
  flex-basis: 100%;
}
.reference-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 20px;
}
#reference-run-form label {
  margin-top: 14px;
}
#reference-run-form textarea {
  width: 100%;
}
.reference-results {
  margin-top: 30px;
  scroll-margin-top: 25px;
}
.reference-results-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.reference-result,
.research-analysis-item {
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.reference-result h3 {
  margin: 12px 0;
}
.reference-result p,
.research-analysis-item p {
  font-size: 12px;
  line-height: 1.7;
}
.reference-upload-schema {
  margin: 16px 0;
  font-size: 12px;
  line-height: 1.7;
}
.reference-raw,
.dialog-body pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.7;
  max-height: 350px;
  overflow: auto;
  padding: 12px;
  background: #f3f5f5;
  border-radius: 7px;
}
.dialog-body code {
  word-break: break-all;
}
.reference-findings {
  margin: 16px 0;
  padding: 12px;
  background: #f4f1f5;
  border: 1px solid #e3dce7;
  border-radius: 8px;
}
.reference-finding {
  padding: 8px 0;
  border-bottom: 1px solid #e3dce7;
}
.reference-finding:last-of-type {
  border-bottom: 0;
}
.reference-finding p {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.reference-version-note {
  margin: 24px 0;
}
@media (max-width: 1200px) {
  .reference-lanes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reference-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reference-dataset {
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr);
  }
  .reference-dataset > button {
    justify-self: start;
  }
}
@media (max-width: 650px) {
  .reference-context {
    align-items: flex-start;
    flex-direction: column;
  }
  .reference-context .row {
    width: 100%;
  }
  .reference-context button {
    font-size: 11px;
  }
  .reference-lanes,
  .reference-module-grid,
  .reference-form-grid,
  .reference-classification {
    grid-template-columns: 1fr;
  }
  .reference-lane {
    padding: 15px;
  }
  .reference-counts {
    grid-template-columns: auto 1fr auto 1fr auto 1fr;
    gap: 3px 5px;
  }
  .reference-counts strong {
    font-size: 18px;
  }
  .reference-counts span {
    font-size: 9px;
    line-height: 1.5;
  }
  .reference-dataset {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .reference-module-card {
    padding: 18px;
  }
  .reference-module-card p {
    min-height: 0;
  }
  #reference-page h1 {
    font-size: 30px;
  }
  #reference-page .tag {
    white-space: normal;
    line-height: 1.5;
  }
  .reference-results .row {
    align-items: flex-start;
  }
}
.reference-seed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0;
}
.reference-seed p {
  font-size: 12px;
  line-height: 1.65;
  max-width: 700px;
}
.reference-seed > button {
  flex-shrink: 0;
}
@media (max-width: 650px) {
  .reference-seed {
    display: block;
  }
  .reference-seed > button {
    margin-top: 10px;
  }
}
.mobile-reference-nav {
  display: none;
}
@media (max-width: 850px) {
  .mobile-reference-nav {
    display: block;
  }
}
.reference-cell-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}
.reference-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.reference-cell > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
}
.reference-cell > summary strong {
  display: block;
  overflow-wrap: anywhere;
}
.reference-cell > summary .hint {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.reference-cell > summary > span:first-child {
  min-width: 0;
}

/* Two primary cockpits; sidebar visibility is a personal display preference. */
.sidebar {
  overflow-y: auto;
}
.sidebar .brand {
  margin-bottom: 18px;
}
.sidebar > .tag {
  margin-bottom: 17px;
}
.cockpit-navigation {
  display: grid;
  gap: 10px;
}
.cockpit-button {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 15px 12px;
  border-radius: 9px;
  min-height: 70px;
}
.cockpit-button span:not(.cockpit-nav-icon) {
  font-size: 14px;
  line-height: 1.3;
}
.cockpit-button small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 5px;
}
.cockpit-nav-icon {
  font-size: 21px;
}
.workspace-launch {
  color: white;
  background: var(--wine);
  border-color: var(--wine);
}
.workspace-launch:hover {
  background: var(--wine-dark);
  border-color: var(--wine-dark);
}
.reference-launch {
  background: #ffffff0c;
  border-color: #70858f;
  color: #e7edf0;
}
.reference-launch:hover {
  background: #ffffff18;
  color: white;
}
.cockpit-button.selected {
  box-shadow: 0 0 0 2px #dfacb9;
}
.reference-launch.selected {
  background: #fff;
  color: var(--wine);
  border-color: white;
}
.owner-navigation {
  margin-top: 18px;
  border-top: 1px solid #ffffff20;
  padding-top: 10px;
}
.shell.sidebar-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.shell.sidebar-hidden > .sidebar,
.sidebar[hidden] {
  display: none;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 14px;
}
.topbar-start {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.sidebar-toggle {
  white-space: nowrap;
  font-size: 11px;
  flex-shrink: 0;
}
.content > section {
  scroll-margin-top: 82px;
}
@media (max-width: 1150px) {
  .cockpit-button {
    padding: 13px 10px;
    gap: 8px;
  }
  .cockpit-button span:not(.cockpit-nav-icon) {
    font-size: 12px;
  }
  .topbar-start {
    gap: 12px;
  }
  .topbar .breadcrumb {
    font-size: 10px;
    gap: 7px;
  }
}
@media (max-width: 850px) {
  .sidebar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    overflow: visible;
  }
  .sidebar .brand {
    margin: 0;
    align-self: flex-start;
  }
  .sidebar .cockpit-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    overflow: visible;
    gap: 12px;
  }
  .cockpit-button {
    min-height: 66px;
    padding: 12px;
  }
  .cockpit-button span:not(.cockpit-nav-icon) {
    font-size: 14px;
    white-space: normal;
  }
  .sidebar .sidebar-context,
  .sidebar .reference-nav {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .sidebar .sidebar-context nav {
    overflow-x: auto;
  }
  .sidebar .owner-navigation {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .sidebar .reference-subnav {
    padding: 8px 12px;
  }
  .topbar .breadcrumb {
    display: none;
  }
  .topbar {
    padding: 0 13px;
  }
  .topbar .row {
    gap: 8px;
  }
}
@media (max-width: 500px) {
  .sidebar {
    padding: 12px 13px;
  }
  .cockpit-button span:not(.cockpit-nav-icon) {
    font-size: 12px;
  }
  .cockpit-button small {
    font-size: 9px;
  }
  .cockpit-nav-icon {
    font-size: 18px;
  }
  .topbar .avatar,
  .topbar .user-role {
    display: none;
  }
  .topbar .user-name {
    font-size: 10px;
    max-width: 90px;
  }
  .sidebar-toggle {
    font-size: 10px;
    padding: 9px;
  }
}

.calculation-current {
  background: #edf6f0;
  border-color: #82ab91;
  color: #245a38;
}
.calculation-stale {
  background: #a32d3e;
  border-color: #a32d3e;
  color: white;
}
.version-hint {
  font-size: 10px;
  color: #687782;
  margin: 6px 0;
}
.context-notes {
  margin: 5px 6px 0 0;
}

/* Restored workflow controls share the compact page renderer. */
.clinical-inputs {
  margin-bottom: 18px;
}
.clinical-inputs > details {
  margin-top: 12px;
}
.clinical-input-row,
.timing-input {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.clinical-input-row p {
  margin: 5px 0;
}
.clinical-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.clinical-editor-grid label {
  display: block;
}
.clinical-editor-grid select {
  width: 100%;
}
.clinical-comparison {
  min-width: 0;
  margin-block: 16px;
}
.therapy-scroll {
  overflow: auto;
  max-width: 100%;
}
.therapy-table {
  min-width: 1060px;
  table-layout: fixed;
}
.therapy-table th,
.therapy-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  min-width: 140px;
}
.therapy-table p {
  font-size: 12px;
}
.therapy-expanded {
  width: min(1400px, 96vw);
  max-width: 96vw;
}
.scenario-actions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.calculation-changes {
  margin-block: 14px;
}
@media (max-width: 640px) {
  .clinical-editor-grid {
    grid-template-columns: 1fr;
  }
}

.decision-ideas {
  margin-bottom: 20px;
}
.decision-idea {
  margin: 8px 0;
  padding: 10px 12px;
  border-left: 3px solid #9cabb3;
  background: #f5f7f8;
  overflow-wrap: anywhere;
}
.decision-idea[data-idea-kind="therapy_discussion"] {
  border-color: #b91530;
  background: #fff5f6;
}
.decision-idea p {
  margin: 6px 0;
}
.scenario-delta {
  padding: 12px;
  border: 1px solid #d8b8be;
  border-radius: 8px;
  margin-bottom: 12px;
}
.scenario-delta li {
  margin: 7px 0;
}
.outcome-limit {
  margin: 12px 0;
  font-size: 12px;
  color: #59636a;
}

/* Source-linked patient overview with optional, version-specific detail. */
.patient-context-summary .patient-context-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.patient-summary-card {
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.patient-summary-card:nth-child(3n) {
  border-right: 0;
}
.patient-summary-card h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--wine);
}
.patient-summary-card dl,
.patient-detail-facts {
  margin: 0;
}
.patient-summary-card .patient-fact {
  margin-bottom: 9px;
}
.patient-fact dt {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.patient-fact dd {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.patient-fact small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.patient-fact-attention dd {
  color: #854d0e;
}
.patient-overview {
  font-size: 12px;
  margin: 10px 0 14px;
  line-height: 1.6;
}
.patient-context-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
}
.patient-expanded {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.patient-expanded > summary {
  font-weight: 700;
  font-size: 13px;
  color: var(--wine);
  cursor: pointer;
}
.patient-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.patient-detail-group {
  min-width: 0;
  padding: 14px;
  background: #f7f8f9;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.patient-detail-group h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
.patient-detail-facts > .patient-fact {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.patient-detail-facts > .patient-fact:last-child {
  border-bottom: 0;
}
.patient-detail-facts dd {
  font-size: 13px;
}
.patient-detail-facts .hint {
  font-size: 11px;
  margin: 5px 0;
}
.patient-missing,
.patient-narrative {
  margin-top: 14px;
  font-size: 12px;
}
.patient-narrative p {
  line-height: 1.6;
}
.patient-context-summary .source-passage-link {
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
}
@media (min-width: 1350px) {
  .patient-context-summary .patient-context-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .patient-summary-card:nth-child(3n) {
    border-right: 1px solid var(--line);
  }
  .patient-summary-card:last-child {
    border-right: 0;
  }
}
@media (max-width: 800px) {
  .patient-context-summary .patient-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .patient-summary-card:nth-child(3n) {
    border-right: 1px solid var(--line);
  }
  .patient-summary-card:nth-child(2n) {
    border-right: 0;
  }
  .patient-detail-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .patient-context-summary .patient-context-grid {
    grid-template-columns: 1fr;
  }
  .patient-summary-card {
    padding: 12px 0;
    border-right: 0 !important;
  }
}

.patient-summary-card .patient-fact-value {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Source disclosure rows stay compact even when the enclosed record is long. */
.pane-scroll > .pane-section > :last-child {
  margin-bottom: 0;
}
.pane-scroll > details.pane-section > .pane-section {
  padding: 10px 0 0;
  border-bottom: 0;
}

.deterministic-summary {
  margin: 8px 0 12px;
}
.deterministic-summary p {
  margin: 7px 0;
}
.field-usage {
  color: #465768;
  background: #f2f5f7;
  padding: 7px 9px;
  font-size: 11px;
}
.narrative-needs-review {
  color: #8a4c13;
  border-left: 2px solid #b88837;
  padding-left: 8px;
}
.note-impact {
  margin: 9px 0;
  padding: 7px 9px;
  background: #f4f6f8;
  border-radius: 5px;
}
.note-impact .hint {
  margin-bottom: 0;
}

.care-coverage {
  border-left: 3px solid var(--red);
  padding: 8px 12px;
  margin: 10px 0;
  background: #f8f6f6;
}
.care-coverage details {
  margin-top: 8px;
}
.therapy-review-states {
  border-bottom: 1px solid #ddd;
  margin-bottom: 8px;
  padding-bottom: 6px;
}
.therapy-review-states p {
  font-size: 12px;
  margin: 3px 0;
}

.applicability-results,
.scientific-results {
  border-top: 1px solid #d8dde1;
  margin-top: 16px;
  padding-top: 12px;
}
.scientific-group {
  padding: 8px;
  margin: 8px 0;
  border: 1px solid #d8dde1;
  background: #f6f8f9;
}
.scientific-group summary {
  font-weight: 600;
}

.owner-ai-config form > label:not(.check-label) {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
}
.owner-ai-test {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.connection-test-status {
  margin-top: 12px;
}

.indication-control {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.indication-control .oc-module-header {
  order: 0;
  font-size: 13px;
  padding: 7px 10px;
  white-space: nowrap;
  overflow-wrap: normal;
}
.indication-control label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
}
.indication-control select {
  width: auto;
  min-width: 180px;
  max-width: 100%;
  margin: 0;
  font-size: 12px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* One application header row, including the analog controls loaded later. */
.shell .topbar {
  height: 58px;
  min-height: 58px;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 0 18px;
}
.shell .topbar-start {
  flex-wrap: nowrap;
  gap: 12px;
  flex: 1 1 auto;
}
.topbar .breadcrumb {
  white-space: nowrap;
}
.shell .topbar .sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  width: auto;
  min-width: 94px !important;
  padding: 7px 14px 7px 20px !important;
}
.topbar-account {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.topbar-identity {
  max-width: 160px;
  overflow: hidden;
}
.topbar-identity .user-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-action-icon {
  display: none;
}
.shell .topbar .topbar-instruments {
  position: relative;
  display: block;
  order: 0;
  flex: 0 0 auto;
  margin: 0;
}
.topbar-instruments summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #a9b7c3;
  border-radius: 7px;
  background: linear-gradient(#fff, #e4e9ed);
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.topbar-instruments summary::-webkit-details-marker {
  display: none;
}
.topbar-instruments summary::marker {
  content: "";
}
.topbar-instruments .instrument-menu {
  position: absolute;
  z-index: 35;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 7px;
  width: 160px;
  padding: 10px;
  background: #fff;
  border: 1px solid #a9b7c3;
  border-radius: 8px;
  box-shadow: 0 5px 14px #17273626;
}
@media (max-width: 1550px) {
  .topbar .breadcrumb {
    display: none;
  }
}
@media (max-width: 1100px) {
  .topbar-account .avatar,
  .topbar-instruments .instrument-label {
    display: none;
  }
  .shell .topbar,
  .shell .topbar-start {
    gap: 8px;
  }
}
@media (max-width: 850px) {
  .topbar .sidebar-toggle-label {
    display: none;
  }
  .shell .topbar .sidebar-toggle {
    width: 38px;
    min-width: 38px !important;
    padding: 7px !important;
    clip-path: none;
    border-radius: 7px !important;
  }
}
@media (max-width: 760px) {
  .topbar .indication-control .oc-module-header {
    max-width: 51vw;
    min-width: 0;
    font-size: 11px;
    padding: 7px 6px;
  }
}
@media (max-width: 650px) {
  .shell .topbar {
    padding: 0 10px;
  }
  .topbar-identity,
  .account-action-label {
    display: none;
  }
  .account-action-icon {
    display: inline;
    font-size: 17px;
  }
  .topbar-account .icon-button,
  .topbar-instruments summary {
    width: 34px;
    height: 34px;
    padding: 6px;
  }
  .topbar-account {
    gap: 6px;
  }
}

.case-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.institution-context {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.institution-switcher {
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 10px 0;
  text-align: left;
  white-space: normal;
  font-size: 12px;
}
.institution-switcher small {
  font-size: 10px;
  font-weight: 400;
}
