:root {
  --bg: #f5f5ef;
  --paper: #fffefa;
  --ink: #253b34;
  --muted: #7a8179;
  --line: #e3e5db;
  --green: #2a5949;
  --light: #e5eddf;
  --amber: #a77a31;
  --amber-bg: #f5ebd8;
  --purple: #776896;
  --blue: #527484;
  --shadow: 0 16px 50px #21372a0d;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}
a {
  color: var(--green);
  text-decoration: none;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #739d85;
  outline-offset: 3px;
}
button:hover {
  filter: brightness(0.96);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -1px;
}
h1 {
  font-size: 42px;
  line-height: 1.14;
}
h2 {
  font-size: 31px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 12px;
}
.primary {
  background: var(--green);
  border: 1px solid var(--green);
  color: #fff;
  display: inline-flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  padding: 13px 19px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.secondary {
  background: white;
  border: 1px solid var(--line);
  padding: 11px 15px;
  border-radius: 6px;
}
.text-button {
  font-size: 11px;
  padding: 6px 0;
  white-space: nowrap;
}
.icon-button {
  min-width: 35px;
  min-height: 36px;
  border-radius: 5px;
  font-size: 18px;
}
.small-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #8ba381;
  border-radius: 50%;
  margin-right: 7px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
input,
textarea,
select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: 11px;
  max-width: 100%;
}
label input,
label textarea,
label select {
  display: block;
  width: 100%;
  margin-top: 8px;
}
textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}
select {
  padding: 8px 28px 8px 10px;
  font-size: 11px;
}
kbd {
  font: 10px inherit;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-size: 26px;
  letter-spacing: -0.5px;
}
.brand-mark {
  background: var(--green);
  color: #eff2df;
  width: 34px;
  height: 36px;
  border-radius: 8px;
  font-family: Georgia, serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 27px;
}
.brand-mark span {
  font-size: 12px;
  position: absolute;
  right: 3px;
  top: 1px;
  color: #bbcca8;
}
.login-screen {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  min-height: 100vh;
}
.login-art {
  background: #244f41;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(#a4bc9f26 1px, transparent 1px);
  background-size: 22px 22px;
  min-height: 600px;
}
.orbit {
  position: absolute;
  border: 1px solid #dae3c53d;
  border-radius: 50%;
  width: 540px;
  height: 540px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.orbit-two {
  width: 360px;
  height: 360px;
}
.orbit-three {
  width: 680px;
  height: 680px;
  border-style: dashed;
}
.art-node {
  position: absolute;
  background: #315e4f;
  color: #e2ebd6;
  border: 1px solid #b5c6a34d;
  border-radius: 8px;
  padding: 20px 32px;
  box-shadow: var(--shadow);
  font-family: Georgia, serif;
  font-size: 22px;
}
.n1 {
  left: 16%;
  top: 23%;
  transform: rotate(-8deg);
}
.n2 {
  right: 9%;
  top: 57%;
  transform: rotate(6deg);
}
.n3 {
  left: 13%;
  bottom: 17%;
  font-size: 18px;
}
.art-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #e2e5c8;
  font: 110px Georgia;
}
.art-caption {
  position: absolute;
  bottom: 40px;
  left: 40px;
  color: #acbca1;
  font-size: 10px;
  letter-spacing: 2px;
}
.login-card {
  align-self: center;
  justify-self: center;
  width: min(390px, 85%);
  padding: 40px 0;
}
.login-card .brand {
  margin-bottom: 65px;
}
.login-card h1 {
  margin-bottom: 20px;
}
.login-card form {
  margin-top: 30px;
  display: grid;
  gap: 17px;
}
.login-card .primary {
  width: 100%;
  justify-content: space-between;
  margin-top: 5px;
}
.login-foot {
  font-size: 10px;
  margin-top: 40px;
  color: var(--muted);
}
.form-message {
  color: #936333;
  font-size: 12px;
}
.sidebar {
  width: 236px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 31px 21px 20px;
  background: #f1f2e9;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}
.sidebar > * {
  flex-shrink: 0;
}
.sidebar .brand {
  padding-left: 9px;
}
.project {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 37px 0 32px;
  padding: 13px 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.project b {
  font-size: 11px;
  display: block;
  line-height: 1.7;
}
.project small {
  font-size: 9px;
  color: var(--muted);
}
.project-icon {
  border: 1px solid #c9cdbd;
  border-radius: 6px;
  padding: 10px 6px;
  font-size: 10px;
  font-family: Georgia;
}
.nav-caption {
  color: #92988a;
  font-size: 9px;
  letter-spacing: 1.8px;
  margin: 0 12px 12px;
}
.side-nav {
  display: grid;
  gap: 7px;
}
.side-nav button {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 12px;
  font-size: 11px;
  border-radius: 6px;
  color: #747f71;
  min-height: 43px;
}
.side-nav button > span {
  font-size: 17px;
  min-width: 17px;
}
.side-nav button.active {
  background: #e2e9d9;
  color: var(--green);
  font-weight: 600;
}
.side-nav em {
  font-size: 9px;
  font-style: normal;
  margin-left: auto;
  background: #ffffff7a;
  padding: 2px 5px;
  border-radius: 4px;
}
.side-nav i {
  margin-left: auto;
}
.sidebar-note {
  margin: 40px 10px 20px;
  border-top: 1px solid #d9ddcf;
  padding-top: 23px;
}
.tiny-spark {
  font-size: 27px;
  display: block;
  margin-bottom: 12px;
  color: #a0a98b;
}
.sidebar-note b {
  font: 17px Georgia;
}
.sidebar-note p {
  font-size: 11px;
  margin-top: 9px;
  color: #858c7e;
  line-height: 1.7;
}
.sidebar-note .text-button {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.side-bottom {
  margin-top: auto;
}
.side-bottom > button {
  font-size: 11px;
  width: 100%;
  text-align: left;
  padding: 13px 9px;
}
.side-bottom > button > span:first-child {
  margin-right: 12px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.profile b {
  font-size: 11px;
  display: block;
}
.profile small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.profile > span:last-child {
  margin-left: auto;
}
.avatar {
  display: inline-flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dbe4ca;
  color: #536346;
  font-size: 11px;
}
.main-shell {
  margin-left: 236px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 79px;
  padding: 0 37px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 28px;
  background: #f9f9f4;
}
.view-switch {
  display: flex;
  background: #eeeee6;
  padding: 4px;
  border-radius: 7px;
  gap: 4px;
  flex-shrink: 0;
}
.view-switch button {
  padding: 9px 15px;
  border-radius: 5px;
  font-size: 11px;
  display: flex;
  gap: 9px;
  color: #8b9288;
}
.view-switch button[aria-selected="true"] {
  background: #fffefa;
  color: var(--green);
  box-shadow: 0 1px 5px #29382b12;
}
.search-trigger {
  font-size: 11px;
  color: #93998e;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}
.search-trigger > span {
  font-size: 22px;
}
.top-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.connection-state {
  font-size: 9px;
  color: #7c8776;
  white-space: nowrap;
}
.connection-state i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #91a17e;
  margin-right: 6px;
}
.help-button {
  width: 26px;
  height: 26px;
  border: 1px solid #cfd5c7;
  border-radius: 50%;
  font-size: 12px;
}
#mobile-menu {
  display: none;
}
.workspace {
  padding: 43px 37px 35px;
  flex: 1;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.page-heading h1 {
  font-size: 37px;
}
.page-heading .muted {
  font-size: 12px;
  margin-top: 10px;
}
.heading-dot {
  color: #98ab80;
}
.summary-strip {
  display: flex;
  gap: 25px;
  align-items: center;
  margin: 28px 0 26px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.summary-strip strong {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-right: 6px;
}
.summary-strip .summary-note {
  margin-left: auto;
  font-size: 10px;
}
.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-chips button {
  padding: 8px 12px;
  font-size: 10px;
  border-radius: 20px;
  color: #929789;
}
.filter-chips button.active {
  background: #e7ecdf;
  color: var(--green);
  font-weight: 600;
}
.toolbar-end {
  display: flex;
  gap: 5px;
  align-items: center;
}
.toolbar-end #zoom-level {
  font-size: 9px;
  color: var(--muted);
  min-width: 32px;
  text-align: center;
}
.toolbar-end .icon-button {
  font-size: 15px;
  min-width: 29px;
  min-height: 30px;
}
.toolbar-end select {
  max-width: 160px;
  margin-right: 6px;
}
.content-area {
  min-height: 410px;
}
.document-board {
  background-image: radial-gradient(#dce0d4 0.7px, transparent 0.7px);
  background-size: 15px 15px;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(calc(230px * var(--zoom, 1)), 1fr)
  );
  gap: 18px;
  align-items: stretch;
}
.document-card {
  background: var(--paper);
  border: 1px solid #e1e4d9;
  border-radius: 9px;
  position: relative;
  box-shadow: 0 4px 10px #37492d03;
  transition:
    transform 0.16s,
    box-shadow 0.16s;
  min-height: 228px;
  text-align: left;
  padding: 21px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.document-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #bdcbb2;
}
.document-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.doc-icon {
  width: 29px;
  height: 34px;
  border: 1px solid #c7d0bd;
  color: #859478;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7ef;
  font-size: 18px;
}
.document-card h3 {
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 11px;
}
.document-card .card-description {
  font-size: 10px;
  color: #92988e;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: auto;
  padding-top: 22px;
  color: #a0a697;
  font-size: 9px;
}
.card-footer span:last-child {
  margin-left: auto;
}
.card-master {
  background: #e9efdf;
  border-color: #cdd9bd;
  grid-column: span 2;
  min-height: 260px;
}
.card-master:after {
  content: "✧";
  position: absolute;
  right: 35px;
  top: 36px;
  font-size: 140px;
  font-weight: 100;
  color: #b7c6a36b;
  pointer-events: none;
}
.card-master h3 {
  font-size: 32px;
  max-width: 65%;
  z-index: 1;
}
.card-master .card-description {
  max-width: 58%;
  color: #808e74;
  z-index: 1;
}
.card-master .card-footer {
  color: #73856a;
}
.card-master .card-top {
  margin-bottom: 19px;
}
.card-master .doc-icon {
  background: #dbe5ce;
  border-color: #c4d2b6;
}
.master-arrow {
  font-size: 20px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 500;
  padding: 4px 7px;
  background: #efeee8;
  color: #8c8f83;
}
.badge:before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge.review,
.badge.pending {
  background: var(--amber-bg);
  color: #a98241;
}
.badge.integrated {
  background: #e4eddb;
  color: #6e8861;
}
.badge.draft {
  background: #eae5f0;
  color: #8d7ba5;
}
.badge.legacy {
  background: #e4ebed;
  color: #63818a;
}
.badge.open {
  background: #f2e6dd;
  color: #a58468;
}
.list-layout {
  display: block;
  background: none;
}
.list-layout .document-card {
  width: 100%;
  text-align: left;
  min-height: 90px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 42px 1fr 200px;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}
.list-layout .card-top {
  margin: 0;
}
.list-layout .card-top .badge {
  display: none;
}
.list-layout .card-description {
  display: none;
}
.list-layout .card-footer {
  padding: 0;
  margin: 0;
  justify-content: flex-end;
}
.list-layout h3 {
  font-size: 20px;
  margin: 0;
}
.list-layout .card-master:after {
  display: none;
}
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.empty-state h2 {
  margin: 15px 0;
}
.empty-state p {
  max-width: 470px;
  margin: auto;
  font-size: 12px;
}
.empty-state .primary {
  margin-top: 20px;
}
.workspace-footer {
  margin: 0 37px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 9px;
  color: #929a89;
  padding: 17px 0;
}
.workspace-footer > span:nth-child(2) {
  margin-left: auto;
}
.workspace-footer button {
  font-size: 9px;
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 25px 100px #112d3330;
  border-radius: 13px;
  max-width: calc(100vw - 40px);
}
dialog::backdrop {
  background: #203b344f;
  backdrop-filter: blur(3px);
}
.small-dialog {
  width: 440px;
  padding: 35px;
}
.small-dialog form {
  display: grid;
  gap: 20px;
}
.small-dialog .muted {
  font-size: 12px;
}
.panel-dialog {
  width: 760px;
  max-height: 88vh;
}
.dialog-top {
  padding: 20px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 3;
}
.dialog-top .eyebrow {
  margin: 0;
}
#panel-body {
  padding: 15px 32px 32px;
}
.panel-intro {
  font-size: 12px;
  color: var(--muted);
  margin: 13px 0 24px;
}
.form-stack {
  display: grid;
  gap: 19px;
  margin-top: 24px;
}
.panel-actions {
  display: flex;
  gap: 12px;
  margin-top: 23px;
  flex-wrap: wrap;
}
.help-list {
  list-style: none;
  padding: 0;
  counter-reset: help;
}
.help-list li {
  counter-increment: help;
  display: flex;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
}
.help-list li:before {
  content: counter(help);
  font-family: Georgia;
  font-size: 23px;
  color: #9ead8e;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.legend-row .badge {
  min-width: 100px;
}
.legend-row p {
  color: var(--muted);
}
.note {
  padding: 15px;
  background: #f1f3e9;
  border-left: 3px solid #b0bc94;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.7;
  margin: 18px 0;
}
.warning {
  background: var(--amber-bg);
  border-color: #c7a25e;
}
.stack {
  display: grid;
  gap: 15px;
}
.decision-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 23px;
  background: var(--paper);
  text-align: left;
}
.decision-card h3 {
  font: 23px Georgia;
  margin: 12px 0;
}
.decision-card p {
  font-size: 12px;
  color: var(--muted);
}
.decision-card .decision-foot {
  font-size: 10px;
  color: #8b947e;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}
.decision-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.reply {
  border-left: 2px solid #c9d5be;
  padding: 6px 0 6px 17px;
  margin: 20px 0;
}
.reply small {
  font-size: 10px;
  color: var(--muted);
}
.reply p {
  font-size: 13px;
  margin-top: 8px;
  white-space: pre-wrap;
}
.search-field {
  font-size: 19px;
  width: 100%;
  margin-bottom: 20px;
  padding: 14px;
}
.search-result {
  display: block;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  width: 100%;
}
.search-result small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin: 6px 0;
}
.search-result p {
  font-size: 11px;
  color: var(--muted);
  white-space: pre-wrap;
}
.chapter-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}
.chapter-list {
  display: grid;
  gap: 5px;
  align-content: start;
}
.chapter-list button {
  text-align: left;
  padding: 13px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.5;
  display: flex;
  gap: 10px;
}
.chapter-list button span {
  color: #9ca58d;
  font: 18px Georgia;
}
.chapter-list button.active {
  background: var(--light);
}
.chapter-page {
  background: var(--paper);
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.chapter-page h2 {
  margin: 15px 0 22px;
}
.chapter-page pre,
.object-description {
  font: 13px/1.85 inherit;
  white-space: pre-wrap;
  color: #788373;
}
.chapter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0;
}
.chapter-links button {
  font-size: 10px;
  padding: 6px 10px;
  background: #eff1e6;
  border-radius: 4px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin: 20px 0;
}
.data-table th {
  text-align: left;
  color: #83907b;
  font-weight: 500;
  font-size: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
}
.data-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-break: break-word;
}
.data-table input {
  font-size: 11px;
  width: 100%;
  min-width: 80px;
  padding: 8px;
}
.data-table .undefined {
  color: #b29a74;
  font-style: italic;
}
.code-evidence {
  font:
    10px/1.6 ui-monospace,
    monospace;
  white-space: pre-wrap;
  max-height: 230px;
  overflow: auto;
  background: #f3f3ec;
  padding: 15px;
  border-radius: 6px;
}
.graph-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
}
.graph-stage {
  border: 1px solid var(--line);
  background: #f4f5ed;
  background-image: radial-gradient(#ccd5bf 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  min-height: 590px;
}
.graph-stage svg {
  width: 100%;
  height: 590px;
  touch-action: none;
}
.graph-node {
  cursor: pointer;
}
.graph-node rect {
  fill: var(--paper);
  stroke: #d6decc;
  stroke-width: 1.3;
}
.graph-node.selected rect {
  fill: #e5edd9;
  stroke: #769663;
  stroke-width: 2;
}
.graph-node text {
  fill: #344e40;
  font-family: inherit;
  font-size: 12px;
  pointer-events: none;
}
.graph-node .node-type {
  font-size: 9px;
  fill: #93a087;
}
.graph-line {
  fill: none;
  stroke: #b9c8a7;
  stroke-width: 1.3;
}
.graph-label {
  fill: #8b987f;
  font-size: 9px;
}
.graph-note {
  position: absolute;
  bottom: 15px;
  left: 18px;
  color: #8c9880;
  font-size: 9px;
  pointer-events: none;
}
.graph-aside {
  padding: 23px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 11px;
  align-self: start;
}
.graph-aside h3 {
  font: 22px Georgia;
  margin: 12px 0;
}
.graph-aside p {
  color: var(--muted);
  font-size: 11px;
}
.graph-aside button {
  margin-top: 15px;
  width: 100%;
}
.graph-list {
  display: grid;
  gap: 5px;
  max-height: 290px;
  overflow: auto;
  margin-top: 15px;
}
.graph-list button {
  text-align: left;
  font-size: 10px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.editor-dialog {
  width: 1250px;
  height: 92vh;
  max-height: 95vh;
}
.editor-top {
  height: 61px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 0 25px;
}
.editor-top #save-state {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 250px;
  height: calc(100% - 61px);
  overflow: hidden;
}
.editor-main {
  overflow: auto;
  padding: 32px 40px;
}
.editor-heading {
  margin-bottom: 24px;
}
.editor-heading h1 {
  font-size: 34px;
  margin-bottom: 15px;
}
.editor-heading .badge {
  margin-right: 7px;
}
.editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.editor-actions button {
  font-size: 10px;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 5px;
}
.editor-info {
  padding: 30px 22px;
  border-left: 1px solid var(--line);
  background: #f6f6ef;
  overflow: auto;
}
.editor-info h3 {
  font-size: 12px;
  margin: 0 0 12px;
}
.editor-info p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 15px;
}
.editor-info button,
.editor-info a {
  font-size: 10px;
  display: block;
  margin: 10px 0;
  line-height: 1.6;
}
.editor-info .primary {
  color: white;
  width: 100%;
}
.editor-info section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.ql-container {
  font-family: inherit !important;
  font-size: 14px !important;
  min-height: 350px;
}
.ql-editor {
  line-height: 1.85 !important;
  padding: 24px 20px !important;
}
.ql-editor p {
  margin-bottom: 8px;
}
.ql-editor.ql-blank:before {
  font-style: normal;
  color: #a0a996;
}
.ql-toolbar.ql-snow,
.ql-container.ql-snow {
  border-color: var(--line);
}
.ql-toolbar.ql-snow {
  border-radius: 6px 6px 0 0;
  position: sticky;
  top: -32px;
  background: var(--paper);
  z-index: 5;
}
.ql-editor img {
  max-height: 450px;
}
.ql-tooltip {
  z-index: 10;
}
.ql-cursor-flag {
  font-family: inherit;
}
.editor-presence {
  display: flex;
  gap: 5px;
  font-size: 10px;
}
.presence-pill {
  padding: 5px 8px;
  border-radius: 20px;
  background: #e5eddc;
}
.source-image {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
  background: white;
  border-radius: 5px;
  margin: 8px 0;
}
.asset-card .asset-art {
  height: 135px;
  background: #eaeede;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  overflow: hidden;
  color: #9eaf8c;
  font-size: 49px;
}
.asset-card .asset-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.asset-card {
  min-height: 290px;
}
.asset-card h3 {
  font-size: 19px;
}
.model-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.viewer-canvas,
.viewer-stage {
  width: 100%;
  min-height: 330px;
  background: #edf0e5;
  border-radius: 8px;
  position: relative;
}
.viewer-canvas canvas,
.viewer-stage canvas {
  max-width: 100%;
  display: block;
  border-radius: 8px;
}
.viewer-controls {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
  margin: 14px 0;
}
.viewer-controls button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.viewer-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.viewer-controls input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.viewer-controls input[type="range"] {
  width: 100%;
  padding: 0;
}
.viewer-info,
.viewer-warning {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0;
}
.viewer-warning {
  color: #a4793a;
}
.viewer-slot-label {
  font-size: 10px;
  padding: 3px 5px;
  background: #edf1ddec;
  border-radius: 3px;
  position: absolute;
}
.viewer-key {
  font-size: 10px;
  border: 1px solid var(--line);
  padding: 4px 7px;
  border-radius: 3px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #284c40;
  color: #fff;
  border-radius: 7px;
  padding: 14px 25px;
  font-size: 12px;
  z-index: 100;
  box-shadow: var(--shadow);
  max-width: 90vw;
}
.activity-item {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.activity-item p {
  font-size: 12px;
}
.activity-item small {
  font-size: 10px;
  color: var(--muted);
}
.provenance {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin: 15px 0;
}
.file-list {
  list-style: none;
  padding: 0;
}
.file-list li {
  font-size: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.table-scroll {
  overflow: auto;
}
.diff-text {
  white-space: pre-wrap;
  font-size: 11px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 15px;
}
.readonly-note {
  font-size: 10px;
  color: var(--muted);
  margin: 10px 0;
}
.chip-count {
  padding: 2px 4px;
  background: #ffffff70;
  border-radius: 3px;
  margin-left: 3px;
}
@media (min-width: 1550px) {
  .workspace {
    max-width: 1540px;
    width: 100%;
    margin: auto;
    padding: 50px;
  }
  .topbar {
    padding: 0 50px;
  }
  .document-board {
    grid-template-columns: repeat(
      auto-fill,
      minmax(calc(265px * var(--zoom, 1)), 1fr)
    );
  }
  .document-card {
    min-height: 260px;
  }
  .card-master {
    min-height: 280px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 205px;
    padding: 25px 15px;
  }
  .main-shell {
    margin-left: 205px;
  }
  .topbar {
    padding: 0 24px;
    gap: 14px;
  }
  .workspace {
    padding: 30px 24px;
  }
  .workspace-footer {
    margin: 0 24px;
  }
  .search-trigger kbd,
  .connection-state {
    display: none;
  }
  .page-heading h1 {
    font-size: 31px;
  }
  .summary-strip {
    gap: 16px;
  }
  .summary-note {
    display: none;
  }
  .chapter-grid {
    grid-template-columns: 190px 1fr;
  }
  .graph-layout {
    grid-template-columns: 1fr;
  }
  .graph-aside {
    display: none;
  }
  .editor-layout {
    grid-template-columns: 1fr 215px;
  }
  .editor-main {
    padding: 25px;
  }
  .sidebar-note {
    margin-top: 25px;
  }
  .view-switch button {
    padding: 9px 10px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 190px;
    padding: 25px 12px;
  }
  .main-shell {
    margin-left: 190px;
  }
  .sidebar .brand {
    font-size: 23px;
  }
  .project {
    gap: 7px;
  }
  .project-icon {
    display: none;
  }
  .search-trigger {
    font-size: 0;
    margin-left: auto;
  }
  .search-trigger > span {
    font-size: 23px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .page-heading > .primary {
    padding: 11px;
    font-size: 10px;
  }
  .document-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-master {
    grid-column: span 2;
  }
  .summary-strip {
    flex-wrap: wrap;
    gap: 14px;
    font-size: 9px;
  }
  .summary-strip strong {
    font-size: 14px;
  }
  .toolbar-end select {
    max-width: 110px;
  }
  .chapter-grid {
    grid-template-columns: 1fr;
  }
  .chapter-list {
    display: flex;
    overflow: auto;
    padding-bottom: 10px;
  }
  .chapter-list button {
    min-width: 140px;
    font-size: 10px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-info {
    border-left: 0;
    max-height: 180px;
    border-top: 1px solid var(--line);
    display: none;
  }
  .editor-main {
    padding: 25px;
  }
  .editor-dialog {
    max-width: 96vw;
    width: 96vw;
  }
  .ql-toolbar.ql-snow {
    top: -25px;
  }
  .list-layout .document-card {
    grid-template-columns: 35px 1fr;
  }
  .list-layout .card-footer {
    grid-column: 2;
    justify-content: flex-start;
  }
  .editor-presence {
    max-width: 140px;
    overflow: hidden;
  }
  .login-screen {
    grid-template-columns: 0.8fr 1fr;
  }
  .login-art {
    min-height: 550px;
  }
  .art-node {
    font-size: 18px;
    padding: 15px;
  }
  .n2 {
    right: 2%;
  }
  .n3 {
    left: 5%;
  }
}
@media (max-width: 650px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 220px;
    box-shadow: var(--shadow);
  }
  body.menu-open .sidebar {
    transform: translateX(0);
  }
  .main-shell {
    margin-left: 0;
  }
  #mobile-menu {
    display: block;
  }
  .topbar {
    padding: 0 13px;
    height: 65px;
    gap: 8px;
  }
  .top-actions {
    gap: 3px;
  }
  .view-switch button {
    padding: 8px;
    font-size: 10px;
  }
  .workspace {
    padding: 25px 16px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading > .primary {
    margin-top: 5px;
  }
  .content-toolbar {
    gap: 8px;
  }
  .toolbar-end {
    width: 100%;
    justify-content: flex-end;
  }
  .toolbar-end select {
    margin-right: auto;
    max-width: 145px;
  }
  .filter-chips button {
    padding: 7px 8px;
  }
  .document-board {
    gap: 10px;
  }
  .document-card {
    padding: 17px;
    min-height: 235px;
  }
  .document-card h3 {
    font-size: 20px;
  }
  .card-master {
    min-height: 245px;
  }
  .card-master h3 {
    font-size: 30px;
  }
  .card-master .card-description {
    max-width: 70%;
  }
  .card-footer {
    font-size: 8px;
    gap: 3px;
  }
  .card-footer > span:last-child {
    max-width: 70px;
    overflow: hidden;
  }
  .card-master .card-footer > span:last-child {
    max-width: none;
  }
  .workspace-footer {
    margin: 0 16px;
    gap: 8px;
  }
  .workspace-footer > span:nth-child(2) {
    display: none;
  }
  .workspace-footer button {
    margin-left: auto;
  }
  .summary-strip {
    margin: 23px 0 20px;
  }
  .badge {
    font-size: 8px;
    padding: 4px 5px;
  }
  .graph-stage,
  .graph-stage svg {
    min-height: 480px;
    height: 480px;
  }
  .panel-dialog {
    max-width: 96vw;
    width: 96vw;
    max-height: 94vh;
  }
  #panel-body {
    padding: 12px 22px 25px;
  }
  .chapter-page {
    padding: 25px;
  }
  .editor-main {
    padding: 20px 15px;
  }
  .editor-heading h1 {
    font-size: 29px;
  }
  .editor-top {
    gap: 8px;
    padding: 0 15px;
  }
  .editor-presence {
    max-width: 80px;
  }
  .editor-top #save-state {
    font-size: 9px;
  }
  .editor-actions {
    gap: 5px;
  }
  .editor-actions button {
    font-size: 9px;
  }
  .ql-toolbar.ql-snow {
    top: -20px;
  }
  .editor-dialog {
    height: 95vh;
  }
  .login-screen {
    display: block;
  }
  .login-art {
    display: none;
  }
  .login-card {
    margin: auto;
    padding: 45px 0;
  }
  .login-card .brand {
    margin-bottom: 65px;
  }
  .inline-fields,
  .model-compare {
    grid-template-columns: 1fr;
  }
  .small-dialog {
    padding: 25px;
  }
  .card-master:after {
    right: 20px;
    font-size: 115px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  .page-heading > .primary,
  .content-toolbar,
  .workspace-footer {
    display: none;
  }
  .main-shell {
    margin: 0;
  }
  .chapter-grid {
    display: block;
  }
  .chapter-list {
    display: none;
  }
  .chapter-page {
    border: 0;
  }
  .workspace {
    padding: 0;
  }
  body {
    background: white;
  }
}
.viewer-stage {
  height: 360px;
  min-height: 280px;
}
.viewer-canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}
.viewer-toolbar {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
}
.viewer-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.viewer-control input {
  width: auto;
  margin: 0;
}
.viewer-select {
  max-width: 190px;
}
.viewer-button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
}
.viewer-timeline {
  width: 100%;
  padding: 0;
  margin: 10px 0;
}
.viewer-time,
.viewer-hint,
.viewer-notes {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.viewer-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.viewer-key-marker {
  font-size: 10px;
  padding: 6px 9px;
  background: var(--amber-bg);
  border-radius: 4px;
}
.viewer-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-height: 150px;
  overflow: auto;
  margin: 15px 0;
}
.viewer-groups {
  font-size: 11px;
  margin-top: 18px;
}
.viewer-slot-label {
  pointer-events: none;
  z-index: 2;
}
.viewer-notes {
  margin: 12px 0;
}
.viewer-root {
  min-width: 0;
}

@media (max-width: 1180px) {
  .graph-aside {
    display: block;
  }
  .graph-list {
    max-height: 170px;
  }
}
@media (max-width: 900px) {
  .editor-layout {
    display: block;
    overflow: auto;
  }
  .editor-main {
    overflow: visible;
  }
  .editor-info {
    display: block;
    max-height: none;
    overflow: visible;
  }
  .editor-info section {
    padding: 15px 0;
  }
  .editor-info .source-image {
    max-width: 220px;
  }
  .editor-actions button,
  .icon-button {
    min-height: 40px;
  }
}

/* Spatial document studio: colored topic islands linked by provenance vines. */
.document-space {
  position: relative;
  isolation: isolate;
  color: #ecf4e9;
  border: 1px solid #34574c;
  border-radius: 20px;
  overflow: hidden;
  background: #142e29;
  box-shadow: 0 22px 70px #17362924;
}
.space-top, .space-bottom {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  background: #18352fed;
  border-bottom: 1px solid #bad1b823;
  font-size: 11px;
}
.space-top > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.space-top b { letter-spacing: 1.6px; font-size: 10px; }
.space-top span:not(.space-live-dot), .space-bottom { color: #afc6b7; }
.space-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #cde590; box-shadow: 0 0 14px #bce58d77; }
.space-fullscreen { border: 1px solid #829e8959; border-radius: 7px; padding: 7px 12px; white-space: nowrap; }
.space-viewport {
  height: max(620px, calc(100dvh - 345px));
  min-height: 520px;
  overflow: hidden;
  position: relative;
  touch-action: none;
  cursor: grab;
  background-image: radial-gradient(ellipse at 15% 20%, #86ab5933, transparent 50%), radial-gradient(ellipse at 85% 65%, #7897c01f, transparent 45%), radial-gradient(#c4d7b429 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
}
.space-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.space-vines { position: absolute; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.space-vine { fill: none; stroke: #90b498; stroke-width: 2; opacity: .56; }
.space-vine.is-connected { filter: drop-shadow(0 0 4px #a7c79a30); }
.space-vine.is-muted { opacity: .09; }
.space-edge-label {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--label-scale, 1));
  z-index: 2;
  background: #24463b;
  color: #e8efd6;
  border: 1px solid #8aa87b99;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  white-space: normal;
  width: 300px;
  line-height: 1.4;
  box-shadow: 0 2px 10px #0f251b44;
}
.chapter-page img { max-width:100%; height:auto; }
.space-edge-label:hover, .space-edge-label:focus-visible { background: #dce8b8; color: #173b2e; z-index: 7; }
.space-edge-label.is-muted { opacity: .12; pointer-events: none; }
.space-card {
  position: absolute;
  width: 340px;
  height: 272px;
  padding: 15px;
  border-radius: 18px;
  background: var(--topic);
  color: #24392e;
  box-shadow: 0 14px 28px #0004, inset 0 0 0 1px #fff4;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow .18s, opacity .18s;
  z-index: 3;
}
.space-card.is-selected { box-shadow: 0 0 0 3px #e7f6d1, 0 0 0 9px #c2e79435, 0 20px 50px #0007; z-index: 4; }
.space-card.is-muted { opacity: .28; }
.space-card:hover, .space-card:focus-visible { box-shadow: 0 0 0 3px #e7f6d1, 0 20px 45px #0006; z-index: 4; }
.space-card-top { height: 31px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .2px; }
.space-grip { font-size: 23px; margin-top: -8px; opacity: .65; }
.space-paper { background: #fffdf4ee; border-radius: 10px; padding: 14px 16px; height: 171px; overflow: hidden; }
.space-card-kind { display: flex; justify-content: space-between; align-items: center; gap: 5px; font-size: 8px; letter-spacing: 1.3px; color: #667365; }
.space-card-kind .badge { font-size: 8px; letter-spacing: 0; padding: 4px 7px; }
.space-paper h3 { font: 500 23px/1.18 Georgia, serif; color: #24392e; margin: 10px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.space-paper p { color: #5a655a; font-size: 11px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.space-card-bottom { display: flex; justify-content: space-between; align-items: center; height: 40px; font-size: 11px; font-weight: 600; }
.space-card-bottom button { background: #fffdf3; padding: 7px 14px; border-radius: 6px; font-size: 11px; }
.space-overview .space-paper p { visibility: hidden; }
.space-overview .space-edge-label { font-size: 16px; }
.space-bottom { border-top: 1px solid #bad1b823; border-bottom: 0; padding-right: 22px; }
.space-position-state { white-space: nowrap; color: #d2e6b9; }
.space-inspector {
  position: absolute;
  right: 18px;
  top: 75px;
  width: 310px;
  max-height: calc(100% - 155px);
  overflow-y: auto;
  z-index: 8;
  padding: 24px;
  background: #fffcf1;
  color: #293f33;
  border-radius: 14px;
  box-shadow: 0 15px 60px #07191088;
  border: 1px solid #d5ddc9;
}
.space-inspector-close { position: absolute; top: 8px; right: 10px; font-size: 24px; }
.space-eyebrow { color: #6b795b; font-size: 9px; letter-spacing: 1.5px; margin: 0 0 14px; }
.space-inspector h3 { font: 25px/1.25 Georgia,serif; margin-bottom: 12px; }
.space-inspector h4 { font-size: 12px; margin: 20px 0 10px; }
.space-inspector p { font-size: 12px; line-height: 1.65; }
.space-open { background: #2c5745; color: #fff; border-radius: 8px; padding: 12px 15px; width: 100%; margin-top: 15px; }
.space-relationship { display: block; width: 100%; text-align: left; border-top: 1px solid #dbe0d0; padding: 12px 0; }
.space-relationship span, .space-relationship small { display: block; }
.space-relationship span { font-size: 13px; }
.space-relationship small { color: #667654; font-size: 10px; margin-top: 5px; }
.space-direction { display: block; color: #8aa174; margin: 5px 0; }
.space-detail { border-top: 1px solid #dbe0d0; padding-bottom: 12px; }
.space-endpoints { display: flex; gap: 10px; }
.space-endpoints button, .space-detail button { text-decoration: underline; font-size: 11px; padding: 8px 0; color: #345a41; }
.space-legend { padding: 14px 22px; font-size: 11px; border-top: 1px solid #bad1b823; background: #18352f; padding-right: 210px; }
.space-legend summary { cursor: pointer; color: #d5dfc7; }
.space-legend > div { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 16px; }
.space-legend span { display: flex; align-items: center; gap: 7px; }
.space-legend i { width: 12px; height: 12px; border-radius: 3px; }
.space-legend p { width: 100%; color: #abc2b0; font-size: 11px; line-height: 1.7; }
.space-master { position: absolute; right: 16px; bottom: 8px; z-index: 6; border: 1px solid #a7be8559; border-radius: 8px; color: #deebbf; padding: 8px 12px; font-size: 11px; }
.space-empty { padding: 60px; text-align: center; }
.is-dragging .space-viewport, .is-dragging .space-card { cursor: grabbing; }
.document-space:fullscreen { width:100vw; height:100dvh; margin:0; border-radius:0; display:flex; flex-direction:column; }
.document-space:fullscreen .space-viewport { flex:1; height:auto; min-height:0; }
@media (max-width: 700px) {
  .document-space { border-radius: 12px; }
  .space-top { padding: 12px; }
  .space-top > div { gap: 6px; }
  .space-top span:not(.space-live-dot) { width: 100%; padding-left: 13px; }
  .space-viewport { height: 65dvh; min-height: 470px; }
  .space-inspector { width: min(300px, calc(100% - 24px)); right: 12px; top: 85px; }
  .space-bottom { flex-direction: column; align-items: flex-start; padding: 12px; font-size: 10px; }
  .space-legend { padding-left: 12px; padding-right: 170px; }
  .space-master { font-size: 10px; right: 8px; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .space-card { transition: none; } }
.space-minimap { position: absolute; width: 180px; height: 126px; left: 18px; bottom: 100px; z-index: 6; background: #102b26dd; border: 1px solid #adc89944; border-radius: 12px; cursor: crosshair; box-shadow: 0 5px 25px #061d2244; }
.space-minimap-window { fill: #d5e2bb14; stroke: #e3efd2; stroke-width: 1.2; pointer-events: none; }
@media (max-width: 700px) { .space-minimap { width: 100px; height: 70px; left: 12px; bottom: 145px; } }
/* Readable library and complete master share the live workspace content. */
.library-search { display:flex; flex-direction:column; gap:5px; font-size:12px; min-width:230px; }
.library-search input { padding:9px 12px; border:1px solid #d7dfd8; border-radius:8px; background:#fff; }
.library-search[hidden], #connection-modes[hidden] { display:none; }
.full-master { max-width:1100px; margin:auto; }
.full-master section { padding:30px 0; border-top:1px solid #e0e5df; }
.full-master article { margin:26px 0; }
.master-document-text, .full-master pre { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.75; }
.space-card[hidden] { display:none !important; }
.space-actions { display:flex; gap:8px; flex-wrap:wrap; }
.space-actions button { border:1px solid #829e8959; border-radius:7px; padding:7px 12px; }
.space-focus[aria-pressed="true"] { background:#e4efcb; color:#193b30; }
.review-controls { display:flex; gap:12px; align-items:end; flex-wrap:wrap; margin:20px 0; }
.review-controls label { min-width:130px; flex:1; }
.review-controls input,.review-controls select { width:100%; }
.review-bulk { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:16px; background:#edf1e7; border:1px solid #d6dfcd; border-radius:10px; position:sticky; top:0; z-index:5; }
.review-bulk button { padding:10px; border:1px solid #b9c6ae; border-radius:7px; background:#fffdf7; }
.review-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:15px; align-items:start; }
.review-grid.is-dense { grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:10px; }
.review-item { min-width:0; background:#fffdf7; border:1px solid #d9dfd0; border-radius:12px; padding:14px; }
.review-item.is-excluded { border-color:#cfb4a6; }
.review-item h3 { margin:10px 0; overflow-wrap:anywhere; font-size:17px; }
.review-select { display:flex; align-items:center; gap:8px; font-size:12px; }
.review-select input { width:18px; height:18px; }
.review-visual { width:100%; height:170px; margin:10px 0; display:flex; flex-direction:column; justify-content:center; align-items:center; background:#edf0e8; border-radius:8px; overflow:hidden; }
.review-visual>span { font-size:48px; color:#7d9270; }
.review-visual img { width:100%; height:100%; object-fit:contain; }
.is-dense .review-visual { height:120px; }
.review-detail { font-size:12px; line-height:1.5; max-height:6em; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; }
.review-choice { font-size:12px; color:#745246; }
.review-item-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.review-item-actions button,.review-item [data-save] { padding:8px; border:1px solid #cbd6bf; border-radius:6px; font-size:12px; }
.review-delete { color:#8c3828; }
.review-item textarea { width:100%; min-height:100px; margin:8px 0; }
.review-item details summary { cursor:pointer; padding:8px 0; font-size:12px; }
.review-pagination { display:flex; justify-content:center; align-items:center; gap:24px; margin:30px 0; }
.review-pagination button { padding:12px; border:1px solid #cbd6bf; border-radius:8px; }
.review-thumbnail-stage { position:fixed; left:-1000px; top:0; width:240px; height:180px; pointer-events:none; }
.review-thumbnail-stage .viewer-stage { width:240px; height:180px; min-height:180px; }
.relationships-layout { display:grid; grid-template-columns:270px minmax(0,1fr); gap:20px; }
.relationships-list { max-height:80vh; overflow:auto; }
.relationships-list button { display:flex; flex-direction:column; text-align:left; gap:6px; width:100%; padding:12px; border-bottom:1px solid #d9dfd0; }
.relationships-list button.active { background:#e1ebd6; }
.relationships-list input { width:100%; }
.relationship-row { padding:12px 0; border-bottom:1px solid #d9dfd0; }
.relationship-row button { text-decoration:underline; }
.relationships-layout pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.access-key { display:flex; gap:12px; flex-wrap:wrap; align-items:center; padding:12px 0; border-bottom:1px solid #ddd; }
.master-comments { margin-top:32px; padding-top:24px; border-top:2px solid #d7dfcd; }
.master-comments textarea { width:100%; min-height:80px; margin:10px 0; }
.comment-thread { margin-top:18px; padding:18px; background:#f4f5ee; border:1px solid #d7dfcd; border-radius:10px; }
.comment-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.comment-thread blockquote { margin:14px 0; padding-left:14px; border-left:3px solid #90a97c; white-space:pre-wrap; }
.comment-reply { margin:16px 0 16px 20px; border-left:1px solid #c9d6bd; padding-left:14px; }
@media(max-width:800px) { .relationships-layout{grid-template-columns:1fr;} .relationships-list{max-height:280px;} .review-grid.is-dense{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));} .space-top{align-items:start;flex-wrap:wrap;} .space-actions{font-size:11px;} }
.full-master pre { font-size:13px; background:#f3f5f0; padding:16px; }
.full-master figure { margin:20px 0; }
.full-master img { max-width:100%; max-height:650px; object-fit:contain; }
.master-toc a { display:block; padding:5px 0; }
.master-status { color:#637469; font-size:13px; }
.claude-dialog { width:min(850px,94vw); max-height:92vh; overflow:auto; border:1px solid #c6d2bf; border-radius:16px; padding:24px; color:#173e3c; background:#fafbf5; }
.claude-dialog::backdrop { background:#102d2b88; }
.claude-dialog header { display:flex; justify-content:space-between; align-items:start; }
.claude-dialog header h2 { margin:0 0 7px; }
.claude-status { padding:12px 0; font-size:13px; }
.claude-conversation p,.decision-option p { white-space:pre-wrap; overflow-wrap:anywhere; }
.claude-prompt,.claude-answer { padding:16px; border-radius:10px; background:#edf1e6; margin-bottom:12px; }
.claude-answer { background:white; border:1px solid #dae1d2; }
.claude-dialog textarea { min-height:95px; }
.claude-history { display:grid; gap:6px; padding-top:10px; }
.claude-history button { text-align:left; padding:10px; }
.decision-options { margin:24px 0; }
.decision-option { border:1px solid #d6dfcd; background:#f8faf4; border-radius:10px; padding:16px; margin:10px 0; }
.decision-option h4 { margin:8px 0; }
.decision-option.ai-pick { border:2px solid #437961; background:#edf4e5; }
.pick-rationale { border-top:1px solid #bfd0b9; padding-top:12px; }
.entity-toolbar { display:flex; gap:12px; flex-wrap:wrap; align-items:end; margin:20px 0; }
.entity-toolbar label { min-width:130px; flex:1; font-size:12px; display:grid; gap:7px; }
.entity-toolbar .entity-search { flex:3; min-width:240px; }
.entity-toolbar input,.entity-toolbar select { width:100%; padding:11px; border:1px solid #c9d5c1; border-radius:8px; background:white; }
.entity-count { font-size:13px; color:#667865; }
.entity-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:18px; align-items:start; }
.entity-card { text-align:left; border:1px solid #cbd9c4; border-radius:13px; padding:20px; background:#fcfdf8; color:#214943; cursor:pointer; }
.entity-card:hover { border-color:#4c816b; box-shadow:0 5px 20px #264f3a12; }
.entity-card h3 { margin:13px 0 8px; font-size:24px; }
.entity-tags,.entity-card-foot { font-size:12px; color:#667865; }
.entity-card-foot { display:block; margin-top:15px; }
.entity-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:20px 0; }
.entity-stats dt { font-size:11px; text-transform:uppercase; color:#6b7e67; letter-spacing:.06em; }
.entity-stats dd { margin:5px 0 0; font-weight:600; overflow-wrap:anywhere; font-size:14px; }
.entity-definition { border-top:1px solid #d5dfcd; padding:12px 0; }
.entity-definition h4 { margin:4px 0; }
.entity-definition p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
@media(max-width:1000px){.view-switch button { padding:10px; }.view-switch button span { font-size:12px; }.search-trigger { max-width:180px; }}
.full-master table { border-collapse:collapse; width:100%; margin:18px 0; }
.full-master td { border:1px solid #d7dfd8; padding:10px; vertical-align:top; }
@media(max-width:900px) { .content-toolbar { flex-wrap:wrap; } .library-search { width:100%; } }
