:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #151515;
  --muted: #6e6a64;
  --muted-strong: #5f5548;
  --line: #ddd9d1;
  --line-strong: #bdb7ad;
  --accent: #1c1c1c;
  --accent-strong: #000000;
  --amber: #5f5548;
  --success-ink: #343a33;
  --missing-reference-color: #d45b53;
  --shadow: 0 14px 30px rgba(25, 23, 20, 0.08);
  --toolbar-control-skew: -11deg;
  --toolbar-control-height: 26px;
  --toolbar-control-font-size: 12px;
  --toolbar-search-max-width: 220px;
  --toolbar-icon-button-width: 28px;
  --toolbar-hover-surface: #e8e1d6;
  --toolbar-hover-border: #b9afa1;
  --toolbar-hover-dark: #3a3a3a;
  --toolbar-control-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 0 rgba(131, 119, 101, 0.36),
    0 2px 4px rgba(25, 23, 20, 0.07);
  --qh-cursor-default: url("/ui/assets/cursors/cursor-default.svg") 4 3, auto;
  --qh-cursor-active: url("/ui/assets/cursors/cursor-active.svg") 4 3, auto;
  --qh-cursor-drag: url("/ui/assets/cursors/cursor-drag.svg") 4 3, auto;
  --qh-cursor-disabled: url("/ui/assets/cursors/cursor-disabled.svg") 4 3, not-allowed;
  --canvas-cursor: var(--qh-cursor-default);
  --canvas-cursor-active: var(--qh-cursor-active);
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  display: block;
  background: var(--bg);
  color: var(--ink);
  cursor: var(--qh-cursor-default);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
[aria-disabled="true"] {
  cursor: var(--qh-cursor-disabled);
}

body:not(.no-custom-cursor) :is(button, select, a, [role="button"], [tabindex], [data-doc-link], [data-open-doc-review], [data-attachment-doc]):active {
  cursor: var(--qh-cursor-active) !important;
}

body:not(.no-custom-cursor) :is(button:disabled, input:disabled, select:disabled, [disabled], [aria-disabled="true"], .is-disabled) {
  cursor: var(--qh-cursor-disabled) !important;
}

body.qh-cursor-drag,
body.qh-cursor-drag * {
  cursor: var(--qh-cursor-drag) !important;
}

body.no-custom-cursor,
body.no-custom-cursor * {
  cursor: auto !important;
}

.shell {
  min-width: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px 16px 16px;
}

.topbar {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  align-items: stretch;
  min-height: 52px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.brandbar {
  display: flex;
  align-items: center;
  min-width: 226px;
  padding: 7px 32px 7px 12px;
  background: #141414;
  color: #fffdf8;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 100%, 0 100%);
  box-shadow: 0 10px 24px rgba(25, 23, 20, 0.16);
}

.brand-logo {
  display: block;
  width: 172px;
  height: auto;
  max-height: 38px;
  object-fit: contain;
}

.app-tabs {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 0;
  margin-left: -11px;
  padding: 0 0 0 14px;
}

.app-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-left: 0;
  padding: 0 24px;
  background: #fffdf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  transform: skewX(-28deg);
  transform-origin: left bottom;
}

.app-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: skewX(28deg);
}

.app-tab.active {
  border-color: #141414;
  background: #141414;
  color: #fffdf8;
}

.app-tab[aria-disabled="true"] {
  cursor: default;
}

.app-tab:not(.active):hover {
  background: #f5f1e8;
  color: var(--ink);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.topbar p,
.panel-header p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.toolbar,
.canvas-header-actions {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.canvas-header-actions {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-self: center;
  gap: 5px;
}

.graph-search {
  position: relative;
  width: clamp(160px, 16vw, var(--toolbar-search-max-width));
  min-height: var(--toolbar-control-height);
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8d2c8;
  border-radius: 5px;
  background: #fffdf8;
  box-shadow: var(--toolbar-control-shadow);
  transform: skewX(var(--toolbar-control-skew));
}

.search-icon {
  width: 13px;
  height: 13px;
  margin-left: 10px;
  flex: 0 0 13px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='9.5' cy='9.5' r='6' fill='none' stroke='%235f5f5f' stroke-width='2.5'/%3E%3Cpath d='m14.5 14.5 5 5' fill='none' stroke='%235f5f5f' stroke-width='2.6' stroke-linecap='square'/%3E%3C/svg%3E");
  opacity: 0.9;
  transform: skewX(calc(var(--toolbar-control-skew) * -1));
}

.graph-search input {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  min-height: calc(var(--toolbar-control-height) - 2px);
  border: 0;
  border-radius: 0;
  padding: 0 10px 0 7px;
  background: transparent;
  color: #5f5f5f;
  font-size: var(--toolbar-control-font-size);
  font-weight: 500;
  outline: 0;
  transform: skewX(calc(var(--toolbar-control-skew) * -1));
}

.graph-search input::placeholder {
  color: #6f6f6f;
  opacity: 1;
}

.graph-search:focus-within {
  outline: 2px solid rgba(15, 118, 110, 0.36);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.baseline-switch {
  display: inline-flex;
  min-height: var(--toolbar-control-height);
  align-items: center;
  gap: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.baseline-option {
  min-width: 34px;
  min-height: var(--toolbar-control-height);
  border: 1px solid #d8d2c8;
  border-radius: 5px;
  padding: 0 7px;
  background: #fffdf8;
  color: #5f5f5f;
  font-size: var(--toolbar-control-font-size);
  font-weight: 800;
  box-shadow: var(--toolbar-control-shadow);
  transform: skewX(var(--toolbar-control-skew));
}

.baseline-option + .baseline-option {
  margin-left: -2px;
}

.baseline-option:first-child {
  border-radius: 5px 2px 2px 5px;
}

.baseline-option:last-child {
  border-radius: 2px 5px 5px 2px;
}

.baseline-option[aria-pressed="true"] {
  border-color: #222;
  background: linear-gradient(180deg, #2a2a2a 0%, #171717 100%);
  color: #fff;
}

.baseline-option > span {
  display: inline-block;
  transform: skewX(calc(var(--toolbar-control-skew) * -1));
}

.relationship-filterbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
}

.relationship-toggle {
  position: relative;
  min-width: 36px;
  min-height: var(--toolbar-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8d2c8;
  border-radius: 5px;
  padding: 0 7px;
  background: #fffdf8;
  color: #5f5f5f;
  font-size: var(--toolbar-control-font-size);
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: var(--toolbar-control-shadow);
  transform: skewX(var(--toolbar-control-skew));
}

.relationship-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.relationship-toggle span {
  pointer-events: none;
  transform: skewX(calc(var(--toolbar-control-skew) * -1));
}

.relationship-toggle:has(input:checked) {
  border-color: #222;
  background: linear-gradient(180deg, #2a2a2a 0%, #171717 100%);
  color: #fff;
}

.version-focus-toggle {
  font-size: var(--toolbar-control-font-size);
  font-weight: 800;
}

.canvas-header-actions .version-focus-toggle[aria-pressed="true"] {
  border-color: #222;
  background: linear-gradient(180deg, #2a2a2a 0%, #171717 100%);
  color: #fff;
}

.compact-slanted-button {
  height: var(--toolbar-control-height);
  min-height: var(--toolbar-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8d2c8;
  border-radius: 5px;
  padding: 0 8px;
  background: #fffdf8;
  color: #5f5f5f;
  box-shadow: var(--toolbar-control-shadow);
  font-size: var(--toolbar-control-font-size);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  transform: skewX(var(--toolbar-control-skew));
}

.compact-slanted-button > .button-label,
.compact-slanted-button > svg {
  transform: skewX(calc(var(--toolbar-control-skew) * -1));
}

.compact-slanted-button:hover:not(:disabled) {
  border-color: var(--toolbar-hover-border);
  background: var(--toolbar-hover-surface);
}

.compact-slanted-button:disabled {
  border-color: #e2ddd4;
  background: #efede7;
  color: #b4ada3;
  box-shadow: none;
  cursor: not-allowed;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

input,
select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  font-size: 13px;
}

input:focus,
select:focus,
button:focus-visible,
.canvas-viewport:focus {
  outline: 2px solid rgba(15, 118, 110, 0.36);
  outline-offset: 2px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  height: 100%;
  min-height: 0;
}

.view.active:not(#graphView) {
  min-width: 0;
  overflow: visible;
  scrollbar-width: thin;
}

#graphView.view.active {
  height: 100%;
  overflow: hidden;
}

.edit-workspace,
.release-workspace {
  min-height: calc(100vh - 110px);
}

.release-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(430px, 1.25fr) minmax(320px, 0.95fr);
  gap: 12px;
  padding: 14px;
  align-items: stretch;
}

.release-column {
  min-height: 620px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  overflow: auto;
}

.release-column-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.release-column-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.release-queue,
.release-preview,
.release-artifacts,
.release-print-table {
  display: grid;
  gap: 10px;
}

.release-actions,
.release-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.release-upload-row input {
  min-width: 0;
  max-width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
}

.release-card,
.release-print-row,
.release-artifact,
.release-package-status {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #cfc8bc;
  border-left: 4px solid #8bbbd0;
  border-radius: 8px;
  background: #fff;
}

.release-card-did {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #141414;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.release-card dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 4px 0 0;
}

.release-card dt {
  color: var(--muted);
  font-weight: 800;
}

.release-card dd {
  margin: 0;
}

.release-package-status.ready {
  border-left-color: #9b948a;
}

.release-package-status.blocked,
.release-artifact.required {
  border-left-color: var(--missing-reference-color);
}

.release-artifact.uploaded {
  border-left-color: #9b948a;
}

.release-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--missing-reference-color);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}

.release-status.confirmed {
  border-left-color: #9b948a;
}

.release-pdf-viewer {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.release-pdf-viewer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.release-pdf-viewer-header h3,
.release-pdf-viewer-header p {
  margin: 0;
}

.release-pdf-viewer-header p {
  color: var(--muted);
}

#releasePdfFrame {
  display: block;
  width: 100%;
  height: min(68vh, 760px);
  border: 0;
  background: #fff;
}

.release-artifact-kind {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.edit-workspace {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  height: calc(100vh - 86px);
  border: 0;
  background: #f8f8f5;
  box-shadow: none;
}

.edit-header {
  display: none;
}

.edit-title-block h2 {
  margin-bottom: 4px;
}

.edit-title-block p {
  max-width: 780px;
}

.edit-shell {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) minmax(320px, 390px);
  gap: 12px;
  min-height: 0;
  padding: 10px 14px 14px;
}

.codex-edit-shell {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #f8f8f5;
}

.cerber-transcript {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 16px max(24px, calc((100vw - 1180px) / 2)) 180px;
  scroll-padding-bottom: 180px;
}

.cerber-stream-item,
.cerber-change-stack {
  display: grid;
  gap: 12px;
  width: min(100%, 1120px);
  margin: 0 auto;
}

.cerber-stream-item.document {
  padding-bottom: 8px;
  border-bottom: 0;
}

.cerber-stream-item.source {
  display: none;
}

.cerber-stream-item.source details {
  display: grid;
  gap: 10px;
}

.cerber-stream-item.source summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cerber-stream-meta {
  display: none;
}

.codex-document-reader {
  max-height: none;
  padding: 0 0 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.62;
}

.codex-document-reader h1 {
  margin: 14px 0 12px;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.24;
}

.codex-document-reader h2 {
  margin: 18px 0 9px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.28;
}

.codex-document-reader h3 {
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
}

.codex-document-reader p,
.codex-document-reader li {
  font-weight: 400;
}

.codex-document-reader table {
  font-size: 12px;
}

.codex-document-reader th,
.codex-document-reader td {
  padding: 6px 8px;
}

.codex-document-reader ::selection,
.codex-document-reader::selection {
  background: rgba(139, 187, 208, 0.22);
  color: #141414;
}

::highlight(cerber-preview-selection) {
  background: rgba(139, 187, 208, 0.18);
  color: #141414;
}

.cerber-change-stack {
  display: none;
}

.cerber-composer-dock {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 90;
  display: grid;
  gap: 0;
  width: min(calc(100vw - 128px), 900px);
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 8px 0 0;
  background: transparent;
  transform: translateX(-50%);
  pointer-events: auto;
}

.cerber-composer-dock.is-collapsed {
  width: min(calc(100vw - 128px), 520px);
}

.cerber-dock-summary {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: calc(100% - 24px);
  min-height: 34px;
  margin: 0 auto -1px;
  padding: 4px 8px 4px 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #f2f0ea 0%, #ebe8df 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 8px 18px rgba(25, 23, 20, 0.08);
  pointer-events: auto;
}

.cerber-composer-dock.is-collapsed .cerber-dock-summary {
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
}

.cerber-summary-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
}

.cerber-dock-toggle {
  min-width: 56px;
}

.cerber-dock-summary .delta-add {
  color: #16a365;
}

.cerber-dock-summary .delta-remove {
  color: #d84f5f;
}

.cerber-dock-task {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 6px;
  align-items: center;
  width: calc(100% - 24px);
  min-height: 34px;
  margin: 0 auto -1px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fffdf8;
  pointer-events: auto;
}

.cerber-dock-task[hidden] {
  display: none;
}

.cerber-dock-task-icon {
  color: var(--muted);
  font-size: 18px;
  font-weight: 650;
}

.cerber-dock-task-text {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cerber-dock-task-action {
  min-width: 28px;
  padding: 0 7px;
  color: var(--muted);
  font-size: var(--toolbar-control-font-size);
  font-weight: 800;
}

.cerber-dock-task-action:hover {
  color: var(--ink);
}

.cerber-dock-task-action.icon {
  min-width: 28px;
  padding: 0;
  font-size: var(--toolbar-control-font-size);
}

.cerber-dock-dialogue {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 0;
  width: calc(100% - 24px);
  min-height: 42px;
  max-height: 108px;
  margin: 0 auto -1px;
  padding: 5px 8px 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fffdf8;
  box-shadow: 0 8px 18px rgba(25, 23, 20, 0.06);
  pointer-events: auto;
}

.cerber-dock-dialogue.empty {
  min-height: 0;
  max-height: 0;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  border-top: 0;
  border-bottom: 0;
  box-shadow: none;
}

.cerber-dock-status {
  position: absolute;
  left: -78px;
  bottom: -8px;
  z-index: 16;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0;
  align-self: auto;
  color: #0f0f0f;
  pointer-events: none;
}

.cerber-mascot-figure {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
}

.cerber-mascot-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(25, 23, 20, 0.12));
}

.cerber-dock-status.ready .cerber-mascot-ready {
  display: grid;
  animation: cerberMascotBreathe 2400ms ease-in-out infinite;
}

.cerber-dock-status.running .cerber-mascot-chase {
  display: grid;
  animation: cerberMascotChase 960ms steps(8) infinite;
  transform-origin: 50% 50%;
}

.cerber-dock-status.running .cerber-chase-body {
  animation: cerberMascotPounce 480ms ease-in-out infinite alternate;
  transform-origin: 50% 55%;
}

.cerber-dock-status.error .cerber-mascot-back {
  display: grid;
  opacity: 0.86;
}

@keyframes cerberMascotBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-1px) scale(1.025);
  }
}

@keyframes cerberMascotChase {
  0% {
    transform: rotate(0deg) scale(0.99);
  }
  100% {
    transform: rotate(360deg) scale(0.99);
  }
}

@keyframes cerberMascotPounce {
  0% {
    transform: translate(-1px, 1px) rotate(-3deg) scale(0.98);
  }
  100% {
    transform: translate(1px, -1px) rotate(3deg) scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cerber-dock-status.ready .cerber-mascot-ready,
  .cerber-dock-status.running .cerber-mascot-chase,
  .cerber-dock-status.running .cerber-chase-body {
    animation: none;
  }
}

.cerber-dock-chat {
  display: grid;
  gap: 5px;
  min-height: 32px;
  max-height: 62px;
  overflow: auto;
  padding-right: 4px;
}

.cerber-dock-chat .cerber-message {
  max-width: 88%;
  padding: 5px 7px;
  border-radius: 5px;
  box-shadow: none;
}

.cerber-dock-chat .cerber-message.compact strong {
  font-size: 11px;
}

.cerber-dock-chat .cerber-message.compact p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.cerber-suggestion-queue {
  display: grid;
  gap: 7px;
  min-height: 0;
  max-height: 96px;
  overflow: auto;
  padding: 8px 0 0;
  border-top: 1px solid #e3ddd2;
}

.cerber-suggestion-queue[hidden] {
  display: none;
}

.cerber-suggestion-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6d675e;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-transform: uppercase;
}

.cerber-suggestion-heading strong {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  border: 1px solid #d7d0c2;
  border-radius: 4px;
  background: #f2f0ea;
  color: #4f4940;
}

.cerber-suggestion-list {
  display: grid;
  gap: 6px;
}

.cerber-suggestion-card {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid #ddd6c9;
  border-left: 4px solid #8bbbd0;
  border-radius: 6px;
  background: #fffefb;
  color: #4f4940;
}

.cerber-suggestion-card.warning {
  border-left-color: #c2410c;
  background: #fff8f0;
}

.cerber-suggestion-card.attention {
  border-left-color: #d8c17a;
  background: #fffbea;
}

.cerber-suggestion-card.suggestion,
.cerber-suggestion-card.proposed {
  border-left-color: #7da36f;
  background: #f7fbf3;
}

.cerber-suggestion-card.accepted,
.cerber-suggestion-card.confirmed {
  opacity: 0.74;
}

.cerber-suggestion-card.rejected,
.cerber-suggestion-card.dismissed {
  opacity: 0.58;
}

.cerber-suggestion-card > div:first-child {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.cerber-suggestion-card span,
.cerber-suggestion-card em {
  color: #6d675e;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.cerber-suggestion-card strong {
  min-width: 0;
  overflow: hidden;
  color: #1f1d1a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cerber-suggestion-card p,
.cerber-suggestion-card small {
  margin: 0;
  color: #5f594f;
  font-size: 12px;
  line-height: 1.35;
}

.cerber-suggestion-card small {
  color: #746d63;
}

.cerber-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cerber-suggestion-actions button {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #d2cbc0;
  border-radius: 4px;
  background: #fffefb;
  color: #3a352d;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}

.cerber-suggestion-actions button:hover:not(:disabled) {
  border-color: #8bbbd0;
  color: #1f1d1a;
}

.cerber-suggestion-actions button:disabled {
  cursor: default;
  opacity: 0.48;
}

.cerber-composer {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  min-height: 72px;
  padding: 8px 10px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fffefb;
  box-shadow: 0 14px 34px rgba(25, 23, 20, 0.14), 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  pointer-events: auto;
}

.cerber-composer h3 {
  display: none;
}

.cerber-composer label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0;
  font-weight: 800;
  text-transform: uppercase;
}

.cerber-composer textarea {
  width: 100%;
  min-height: 38px;
  max-height: 72px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.42;
}

.cerber-composer textarea::placeholder {
  color: #8d8a84;
}

.cerber-composer-dock.is-drag-over .cerber-composer {
  border-color: var(--toolbar-hover-border);
  background: #fbf8ef;
  box-shadow: 0 0 0 2px rgba(185, 175, 161, 0.22), 0 14px 34px rgba(25, 23, 20, 0.14);
}

.cerber-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 3.25rem;
  margin-top: -2px;
  overflow: auto;
  pointer-events: auto;
}

.cerber-attachment-list[hidden] {
  display: none;
}

.cerber-attachment-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  max-width: min(100%, 260px);
  min-height: 26px;
  padding: 3px 6px 3px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 2px 5px rgba(25, 23, 20, 0.06);
}

.cerber-attachment-name {
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cerber-attachment-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cerber-attachment-chip button {
  grid-row: 1 / span 2;
  grid-column: 2;
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: #4f4940;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
}

.cerber-attachment-chip button:hover {
  color: #141414;
}

.cerber-selection-popover {
  position: fixed;
  z-index: 120;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  pointer-events: auto;
}

.cerber-selection-popover[hidden] {
  display: none;
}

.cerber-selection-popover::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 1px solid #c9c2b7;
  border-bottom: 1px solid #c9c2b7;
  background: #fffefb;
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg);
}

.cerber-selection-popover[data-placement="top"]::before {
  bottom: -3px;
}

.cerber-selection-popover[data-placement="bottom"]::before {
  top: -3px;
  transform: translateX(-50%) rotate(225deg);
}

.cerber-selection-add,
.cerber-selection-close {
  border: 1px solid var(--line-strong);
  background: #fffdf8;
  color: #141414;
  cursor: pointer;
  font: inherit;
}

.cerber-selection-add {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-color: #c9c2b7;
  border-radius: 50%;
  background: #fffefb;
  color: #1d1b18;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(25, 23, 20, 0.12);
}

.selection-floating-plus:hover {
  border-color: #8bbbd0;
  background: #fbfdff;
  box-shadow: 0 0 0 2px rgba(139, 187, 208, 0.16), 0 5px 13px rgba(25, 23, 20, 0.13);
}

.selection-floating-plus:hover::after {
  content: attr(title);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  width: max-content;
  max-width: 180px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffefb;
  color: #4f4940;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(25, 23, 20, 0.12);
  pointer-events: none;
}

.cerber-fragment-context {
  position: absolute;
  left: 22px;
  right: 22px;
  top: -38px;
  z-index: 4;
  display: flex;
  gap: 6px;
  max-height: 34px;
  overflow: auto;
  pointer-events: auto;
}

.cerber-composer-dock.is-collapsed .cerber-dock-task,
.cerber-composer-dock.is-collapsed .cerber-dock-dialogue,
.cerber-composer-dock.is-collapsed .cerber-composer,
.cerber-composer-dock.is-collapsed .cerber-document-context {
  display: none;
}

.cerber-dock-dialogue:not(.empty) + .cerber-composer .cerber-fragment-context {
  position: static;
}

.cerber-fragment-context[hidden] {
  display: none;
}

.cerber-fragment-chip {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) 18px;
  flex: 0 1 320px;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 4px 6px;
  border: 1px solid #d7d0c2;
  border-left: 2px solid #8bbbd0;
  border-radius: 5px;
  background: #f1eee7;
  color: #4f4940;
  font-size: 11px;
  line-height: 1.2;
  pointer-events: auto;
}

.cerber-fragment-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 18px;
  color: #5f5548;
}

.cerber-fragment-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cerber-fragment-chip strong,
.cerber-fragment-chip p {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cerber-fragment-chip strong {
  color: #141414;
  font-weight: 750;
}

.cerber-fragment-chip p {
  margin: 2px 0 0;
  color: #6d675e;
}

.cerber-fragment-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  pointer-events: auto;
}

.cerber-composer-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
}

.cerber-nav-right-wrap {
  display: inline-flex;
  min-width: 0;
  align-items: center;
}

.cerber-check-trigger,
.cerber-check-trigger[hidden] {
  display: none;
}

.cerber-nav-left,
.cerber-nav-right,
.cerber-control-cluster {
  display: inline-flex;
  min-width: 0;
  height: var(--toolbar-control-height);
  gap: 5px;
  align-items: stretch;
  overflow: visible;
  border: 0;
  border-radius: 0;
  clip-path: none;
  background: transparent;
  box-shadow: none;
}

.cerber-nav-left {
  position: relative;
}

.cerber-icon-button,
.cerber-pill-button,
.cerber-send-button {
  position: relative;
  height: var(--toolbar-control-height);
  min-height: var(--toolbar-control-height);
  cursor: pointer;
  font: inherit;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.cerber-control-cluster > button + button::before {
  display: none;
}

.cerber-icon-button {
  display: grid;
  place-items: center;
  width: var(--toolbar-icon-button-width);
  padding: 0;
  background: #fffdf8;
  color: #141414;
  font-size: var(--toolbar-control-font-size);
  font-weight: 850;
  line-height: 1;
}

.cerber-icon-button:hover:not(:disabled),
.cerber-pill-button:hover,
.cerber-send-button:hover:not(:disabled) {
  border-color: var(--toolbar-hover-border);
  background: var(--toolbar-hover-surface);
  color: var(--ink);
}

.cerber-icon-button:disabled {
  cursor: default;
  border-color: #e2ddd4;
  background: #efede7;
  color: #b4ada3;
  box-shadow: none;
  opacity: 1;
}

.cerber-pill-button {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  justify-content: center;
  min-width: 206px;
  max-width: 100%;
  padding: 0 28px;
  background: rgba(255, 253, 248, 0.42);
  color: #141414;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

.cerber-pill-button.access {
  min-width: 244px;
  padding-left: 22px;
  padding-right: 30px;
}

.cerber-pill-button.model {
  min-width: 214px;
}

.cerber-shield-glyph,
.cerber-model-glyph {
  display: none;
}

.cerber-spinner-glyph {
  width: 14px;
  height: 14px;
  border: 2px dotted #8d887f;
  border-top-color: #141414;
  border-radius: 50%;
}

.cerber-pill-button.model span:nth-child(3),
.cerber-pill-button.access span:nth-child(3) {
  color: #4f4940;
  font-size: 13px;
  font-weight: 850;
}

.cerber-mic-glyph {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.9;
}

.cerber-send-button {
  display: grid;
  place-items: center;
  width: 30px;
  padding: 0;
  border-color: #222;
  background: #141414;
  color: #fffdf8;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.cerber-send-button:hover:not(:disabled) {
  border-color: #222;
  background: var(--toolbar-hover-dark);
  color: #fffdf8;
}

.cerber-document-context {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr) minmax(180px, 0.95fr);
  gap: 10px;
  align-items: center;
  width: calc(100% - 24px);
  min-height: 30px;
  max-height: 34px;
  margin: -1px auto 0;
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background-color: #e8e4dc;
  background-image: linear-gradient(180deg, #eeece5 0%, #e5e1d8 100%);
  color: #6d675e;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: 0 8px 18px rgba(25, 23, 20, 0.08);
  pointer-events: auto;
}

.cerber-context-chip {
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr);
  min-width: 0;
  gap: 6px;
  align-items: center;
  overflow: hidden;
  max-width: 100%;
  white-space: nowrap;
}

.cerber-context-label {
  color: #7b756c;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cerber-context-chip strong {
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cerber-context-chip > span:not(.cerber-context-label):not(.cerber-context-title):not(.cerber-context-version) {
  min-width: 0;
  overflow: hidden;
  color: #6d675e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cerber-context-title,
.cerber-context-version,
.cerber-context-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cerber-context-title {
  max-width: none;
  color: #5f594f;
}

.cerber-context-version {
  max-width: none;
}

.cerber-context-path {
  justify-self: end;
  max-width: 100%;
  color: #7b756c;
  font-size: 10px;
  font-weight: 650;
  text-align: right;
}

.cerber-document-context.empty {
  grid-template-columns: minmax(0, 1fr) auto;
}

.cerber-document-context.empty .cerber-context-chip {
  color: #6d675e;
}

.edit-side {
  display: grid;
  gap: 9px;
  align-content: start;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.edit-side {
  overflow: auto;
}

.edit-column {
  min-width: 0;
  min-height: 0;
}

.edit-side h3,
.edit-column h3 {
  margin: 0;
  font-size: 15px;
}

.edit-side label {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.edit-side select,
.edit-side input,
.edit-side textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.edit-editor-column {
  display: grid;
  min-height: 0;
}

.edit-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.compact-action {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.markdown-editor-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 620px;
  height: calc(100vh - 222px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 10px 22px rgba(25, 23, 20, 0.05);
}

.cerber-transcript .markdown-editor-shell {
  min-height: 360px;
  height: 360px;
}

.editor-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 36px;
  padding: 8px 18px 8px 52px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.editor-meta-line span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.markdown-editor {
  width: 100%;
  min-height: 0;
  height: 100%;
  resize: none;
  border: 0;
  border-radius: 0;
  outline: none;
  padding: 28px 34px 36px 64px;
  color: var(--ink);
  background:
    linear-gradient(90deg, #f5f2eb 0 38px, transparent 38px),
    #fffdf8;
  font-family: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 15px;
  line-height: 1.72;
}

.markdown-editor:focus {
  box-shadow: inset 3px 0 0 #141414;
}

.selection-popover {
  position: absolute;
  z-index: 12;
  top: 48px;
  right: 16px;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100% - 32px));
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 16px 34px rgba(25, 23, 20, 0.16);
}

.selection-popover[hidden] {
  display: none;
}

.selection-popover strong {
  display: block;
  font-size: 13px;
}

.selection-popover span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.selection-popover textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.selection-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
}

.edit-preview {
  position: relative;
  max-height: 260px;
  overflow: auto;
  padding: 10px 2px 4px;
  border: 0;
  background: transparent;
}

#editView .edit-preview .empty-state.inline {
  min-height: 92px;
  padding: 12px 16px;
}

.selection-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.selection-line-box {
  position: absolute;
  border: 1px solid rgba(139, 187, 208, 0.58);
  border-radius: 5px;
  background: rgba(139, 187, 208, 0.075);
  box-shadow: 0 0 0 1px rgba(139, 187, 208, 0.10), 0 0 12px rgba(139, 187, 208, 0.26);
}

.selection-line-box.user-selection-active {
  border-color: rgba(139, 187, 208, 0.72);
  background: rgba(139, 187, 208, 0.065);
  box-shadow: 0 0 0 1px rgba(139, 187, 208, 0.12), 0 0 13px rgba(139, 187, 208, 0.30);
}

.selection-line-box.user-note-highlight {
  border-color: rgba(117, 166, 190, 0.60);
  background: rgba(139, 187, 208, 0.045);
  box-shadow: 0 0 0 1px rgba(139, 187, 208, 0.09), 0 0 10px rgba(139, 187, 208, 0.20);
}

.change-token {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.change-token-block {
  display: block;
  margin: 6px 0 8px;
  padding: 6px 8px;
  border-radius: 6px;
}

.change-token-delete {
  border-color: rgba(194, 65, 70, 0.50);
  background: rgba(194, 65, 70, 0.055);
  box-shadow: 0 0 0 1px rgba(194, 65, 70, 0.08), 0 0 10px rgba(194, 65, 70, 0.20);
}

.change-token-insert {
  border-color: rgba(199, 157, 42, 0.56);
  background: rgba(216, 193, 122, 0.12);
  box-shadow: 0 0 0 1px rgba(216, 193, 122, 0.10), 0 0 10px rgba(216, 193, 122, 0.22);
}

.change-token-accepted {
  border-color: rgba(96, 143, 85, 0.58);
  background: rgba(125, 163, 111, 0.095);
  box-shadow: 0 0 0 1px rgba(125, 163, 111, 0.10), 0 0 10px rgba(125, 163, 111, 0.22);
}

.change-actions,
.change-detail-actions {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  margin-left: 5px;
  vertical-align: middle;
}

.change-actions button,
.change-detail-actions button {
  min-width: 22px;
  height: 22px;
  border: 1px solid #d2cbc0;
  border-radius: 4px;
  background: #fffefb;
  color: #3a352d;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 0 6px;
}

.change-action-accept:hover {
  border-color: rgba(96, 143, 85, 0.70);
  color: #2f5f2e;
}

.change-action-reject:hover {
  border-color: rgba(194, 65, 70, 0.66);
  color: #8a2e30;
}

.change-action-diff {
  min-width: 34px;
  color: var(--muted);
  text-transform: uppercase;
}

.change-diff-detail {
  display: grid;
  gap: 7px;
  max-width: 520px;
  margin: 6px 0 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefb;
  color: #4f4940;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 20px rgba(25, 23, 20, 0.08);
}

.change-diff-detail dl {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
}

.change-diff-detail dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.change-diff-detail dd {
  margin: 0;
  min-width: 0;
}

.codex-document-reader.edit-preview {
  max-height: none;
  overflow: visible;
}

.edit-preview-panel {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.edit-preview-panel summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.edit-selected {
  display: grid;
  gap: 6px;
  color: var(--ink);
}

.edit-selected-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.edit-selected strong {
  font-size: 18px;
}

.edit-selected-compact strong {
  font-size: 13px;
}

.edit-selected span,
.edit-selected small {
  color: var(--muted);
  line-height: 1.45;
}

.edit-comments-panel {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.edit-comment-list {
  display: grid;
  gap: 8px;
}

.edit-comment-item {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid #8bbbd0;
  border-radius: 8px;
  background: #fff;
}

.edit-comment-item.stale {
  border-left-color: #d8c17a;
  opacity: 0.78;
}

.edit-comment-item button {
  justify-self: start;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
}

.edit-comment-quote {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.edit-comment-body {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.agent-output {
  min-height: 84px;
  max-height: 170px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.agent-output h4,
.agent-output p {
  margin: 0 0 8px;
}

.cerber-chat {
  display: grid;
  gap: 8px;
  min-height: 138px;
  max-height: 210px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f6;
}

.cerber-message {
  display: grid;
  gap: 4px;
  max-width: 92%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cerber-message.user {
  justify-self: end;
  border-color: #9fb8c8;
  background: #f4f9fc;
}

.cerber-message.system {
  max-width: 100%;
  border-color: #d8c17a;
  background: #fff9df;
}

.cerber-message strong {
  font-size: 12px;
  line-height: 1.2;
}

.cerber-message p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.cerber-checks {
  display: grid;
  gap: 8px;
  max-height: 310px;
}

.cerber-check-list {
  display: grid;
  gap: 7px;
}

.cerber-check {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-left: 4px solid #8bbbd0;
  border-radius: 8px;
  background: #fff;
}

.cerber-check.warning {
  border-left-color: #c2410c;
  background: #fff7ed;
}

.cerber-check.attention {
  border-left-color: #d8c17a;
  background: #fffbea;
}

.cerber-check.suggestion {
  border-left-color: #7da36f;
  background: #f5fbf2;
}

.cerber-check strong,
.cerber-check span,
.cerber-check p,
.cerber-check small {
  margin: 0;
}

.cerber-check strong {
  font-size: 12px;
}

.cerber-check span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.cerber-check small {
  color: var(--muted);
  font-size: 11px;
}

.cerber-check-items {
  display: grid;
  gap: 3px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.cerber-check-items li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 3px 0;
  border-top: 1px solid var(--line);
}

.cerber-check-items strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cerber-check p {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.edit-audit {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
}

.edit-audit h3,
.edit-audit h4 {
  margin: 0;
}

.edit-audit ul {
  margin: 0;
  padding-left: 18px;
}

.property-grid.compact {
  grid-template-columns: minmax(90px, 0.7fr) minmax(140px, 1fr);
  gap: 6px 10px;
  padding-bottom: 8px;
}

.process-dashboard,
.readiness-dashboard {
  min-height: calc(100vh - 110px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  padding: 16px;
}

.dashboard-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.metric-card,
.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.metric-card {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 12px;
}

.metric-card span,
.compact-row span {
  color: var(--muted);
}

.metric-card strong {
  font-size: 28px;
  line-height: 1;
}

.dashboard-panel {
  min-width: 0;
  padding: 14px;
}

.dashboard-panel-wide {
  grid-column: 1 / -1;
}

.process-board-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: visible;
}

.process-board-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.process-board-header h3,
.process-board-header p {
  margin: 0;
}

.process-board-header p,
.process-board-status {
  color: var(--muted);
}

.process-board-status {
  max-width: 360px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.process-kanban {
  display: grid;
  grid-auto-columns: minmax(286px, 318px);
  grid-auto-flow: column;
  gap: 12px;
  min-height: 430px;
  overflow-x: auto;
  padding: 0 clamp(8px, 2vw, 26px) 12px;
  scroll-padding-inline: clamp(8px, 2vw, 26px);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.process-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  max-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  scroll-snap-align: start;
}

.process-column[data-process-stage="blocked"] {
  border-color: rgba(212, 91, 83, 0.58);
}

.process-column header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
}

.process-column h4,
.process-column p {
  margin: 0;
}

.process-column h4 {
  font-size: 14px;
  line-height: 1.15;
}

.process-column p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.process-column header > span {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.process-card-list {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 10px 8px;
  scrollbar-gutter: stable both-edges;
}

.process-card {
  display: grid;
  width: min(100%, 278px);
  min-width: 0;
  gap: 7px;
  padding: 9px;
  border: 1px solid #c8c1b6;
  border-left: 4px solid #8bbbd0;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 8px 16px rgba(25, 23, 20, 0.05);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

.process-card.blocked {
  border-left-color: var(--missing-reference-color);
}

.process-card.expanded {
  border-color: #9b948a;
  background: #fffefb;
}

.process-card-head,
.process-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.process-card-head {
  align-items: flex-start;
}

.process-card-did {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.process-card-title {
  display: inline;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.process-card-did:hover,
.process-card-title:hover {
  color: var(--muted-strong);
}

.process-card-summary {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.process-card-meta,
.process-card-tags {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.process-card-chip {
  max-width: 100%;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  background: #f6f2ea;
  color: #4e4a44;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.process-card-chip.owner {
  border-color: #b9d4df;
  background: #eef7f9;
}

.process-card-chip.priority-critical,
.process-card-chip.urgency-urgent {
  border-color: rgba(212, 91, 83, 0.44);
  background: #fff0ee;
  color: #a23c36;
}

.process-card-chip.priority-high {
  border-color: #d7c3a3;
  background: #fbf1df;
}

.process-card-chip.tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.process-card-details[hidden] {
  display: none;
}

.process-card-thread {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.process-card-thread > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: var(--ink);
}

.process-card-thread > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.process-chat-message {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fff;
}

.process-chat-author {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 11px;
}

.process-chat-author strong {
  color: var(--ink);
  font-size: 12px;
}

.process-chat-message p {
  margin: 0;
  color: #35312b;
  font-size: 12px;
  line-height: 1.4;
}

.process-comment-composer {
  display: grid;
  gap: 7px;
}

.process-comment-composer textarea {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.process-comment-add {
  justify-self: end;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.process-card dl {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.process-card dt {
  font-weight: 800;
}

.process-card dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.process-card-blockers {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--missing-reference-color);
  font-size: 12px;
  font-weight: 800;
}

.process-card-ready,
.process-card-footer small,
.process-card-simulated,
.process-card-done {
  color: var(--muted);
  font-size: 12px;
}

.process-card-ready {
  margin: 0;
}

.process-card-simulated {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f2eb;
  font-weight: 800;
}

.process-card-next {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.server-update-feed {
  display: grid;
  gap: 12px;
}

.server-update-feed header,
.server-update-event-head,
.server-update-summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.server-update-feed h3,
.server-update-feed p,
.server-update-list {
  margin: 0;
}

.server-update-feed p,
.server-update-cursor,
.server-update-event time,
.server-update-event small {
  color: var(--muted);
}

.server-update-cursor,
.server-update-summary span,
.server-update-kind {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f6f2ea;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.server-update-summary {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.server-update-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}

.server-update-event {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid #8bbbd0;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.server-update-event.severity-blocked {
  border-left-color: var(--missing-reference-color);
}

.server-update-event.severity-proposal {
  border-left-color: #d8c17a;
}

.server-update-event.severity-ready {
  border-left-color: #91c8bd;
}

.server-update-event.empty {
  border-left-color: var(--line-strong);
}

.server-update-event strong,
.server-update-event p,
.server-update-event small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.server-update-event p {
  color: #35312b;
  font-size: 12px;
  line-height: 1.4;
}

.compact-table {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.compact-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) repeat(3, minmax(80px, auto));
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-align: left;
}

.compact-row-button:hover {
  border-color: #141414;
}

.readiness-state {
  display: grid;
  gap: 8px;
}

.readiness-state.blocked {
  border-color: var(--missing-reference-color);
}

.readiness-state.ready {
  border-color: #9b948a;
}

.readiness-check.fail {
  border-color: var(--missing-reference-color);
}

.readiness-check.warn {
  border-color: #c6aa8d;
}

.readiness-check.pass {
  border-color: #9b948a;
}

.primary-button {
  min-height: 44px;
  border: 1px solid #141414;
  border-radius: 8px;
  background: #141414;
  color: #fffdf8;
  font-weight: 900;
}

.primary-button:disabled {
  opacity: 0.35;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.canvas-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(720px, 1fr) clamp(320px, 24vw, 410px);
  gap: 10px;
  align-items: stretch;
}

.panel {
  overflow: hidden;
}

.panel-header {
  min-height: 52px;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.canvas-panel > .panel-header {
  align-items: center;
  min-height: 40px;
  padding: 7px 15px;
}

.canvas-heading {
  flex: 0 1 auto;
  min-width: 0;
}

.canvas-stats,
.canvas-stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.canvas-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.canvas-stats b,
.canvas-stat b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.panel-header h2 {
  font-size: 16px;
  line-height: 1.2;
}

.panel-header.compact {
  min-height: 46px;
  padding: 12px 0 10px;
}

.icon-button,
.secondary-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
}

.icon-button {
  width: 36px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
}

.canvas-header-actions .icon-button {
  width: var(--toolbar-icon-button-width);
  height: var(--toolbar-control-height);
  min-height: var(--toolbar-control-height);
  border-color: #d8d2c8;
  border-radius: 5px;
  background: #fffdf8;
  box-shadow: var(--toolbar-control-shadow);
  padding: 0;
  transform: skewX(var(--toolbar-control-skew));
}

.canvas-header-actions .icon-button > span,
.canvas-header-actions .icon-button > svg {
  transform: skewX(calc(var(--toolbar-control-skew) * -1));
}

.canvas-header-actions .reset-view-icon {
  width: 13px;
  height: 13px;
}

.reset-view-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 2.8;
}

.secondary-button {
  padding: 0 14px;
  font-weight: 700;
}

.icon-button:hover,
.secondary-button:hover:not(:disabled),
.baseline-option:hover,
.relationship-toggle:hover {
  border-color: var(--toolbar-hover-border);
  background: var(--toolbar-hover-surface);
}

.baseline-option[aria-pressed="true"]:hover,
.relationship-toggle:has(input:checked):hover,
.version-focus-toggle[aria-pressed="true"]:hover {
  border-color: #222;
  background: var(--toolbar-hover-dark);
  color: #fff;
}

.icon-button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.secondary-button:disabled {
  color: #9aa7a3;
  cursor: not-allowed;
}

.canvas-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.canvas-viewport {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
  cursor: var(--canvas-cursor);
  background:
    linear-gradient(#ebe6db 1px, transparent 1px),
    linear-gradient(90deg, #ebe6db 1px, transparent 1px),
    #fffdf8;
  background-size: 40px 40px;
}

.canvas-viewport.panning {
  cursor: var(--canvas-cursor-active);
  user-select: none;
}

.canvas-layer {
  position: relative;
  min-width: 100%;
  min-height: 100%;
}

.canvas-edges,
.canvas-nodes {
  position: absolute;
  inset: 0;
}

.canvas-edge {
  fill: none;
  stroke: var(--edge-color, #7b878b);
  color: var(--edge-color, #7b878b);
  stroke-width: 1.35;
  stroke-opacity: 0.54;
  transition: stroke-opacity 140ms ease, stroke-width 140ms ease;
}

.canvas-edge.related {
  stroke-width: 1.75;
  stroke-opacity: 0.78;
}

.canvas-edge.dimmed {
  stroke-opacity: 0;
  pointer-events: none;
}

.canvas-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.canvas-edge.reference {
  stroke-dasharray: 2 5;
  stroke-opacity: 0.72;
}

.canvas-edge.reference.incoming {
  stroke-dasharray: 7 7;
}

.canvas-edge.reference.outgoing {
  stroke-dasharray: 1 7;
  stroke-linecap: round;
}

.canvas-edge.reference.quality-record {
  stroke-dasharray: 6 5;
  stroke-opacity: 0.84;
}

.canvas-edge.reference.qrec-add-link {
  stroke-dasharray: 1 9;
  stroke-opacity: 0.62;
}

.version-focus-active .canvas-node:not(.dimmed) {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--card-color) 16%, transparent),
    0 14px 28px rgba(25, 23, 20, 0.12);
}

.canvas-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border: 1.25px solid color-mix(in srgb, var(--card-color) 74%, #fffdf8 26%);
  border-radius: 7px;
  padding: 8px 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card-color) 5%, #fffdf8 95%), #fffdf8 72%);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(25, 23, 20, 0.06);
  text-align: left;
  overflow: hidden;
  cursor: var(--canvas-cursor);
  will-change: transform;
  transition: opacity 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.canvas-node.dimmed {
  opacity: 0.12;
}

.canvas-viewport.panning .canvas-node {
  cursor: var(--canvas-cursor-active);
}

.document-shell {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card-color) 4%, #ffffff 96%), #ffffff 74%);
}

.version-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card-color) 6%, #ffffff 94%), #ffffff 76%);
}

.child-card {
  border-style: dashed;
}

.qrec-evidence-card {
  border-style: solid;
}

.qrec-add-card {
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card-color) 8%, #fffdf8 92%), #fffdf8 76%);
  text-align: center;
}

.document-table-card {
  padding: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card-color) 4%, #fffdf8 96%), #fffdf8 78%);
}

.document-table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--card-color) 24%, #d8d2c8 76%);
}

.document-table-title strong {
  font-size: 13px;
  line-height: 1.15;
}

.document-table-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.document-table-filters {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) minmax(116px, 0.82fr) minmax(116px, 0.82fr);
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--card-color) 16%, #e2ddd2 84%);
}

.document-table-filter {
  min-width: 0;
  height: 26px;
  border: 1px solid color-mix(in srgb, var(--card-color) 28%, #cfc8bc 72%);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 0 8px;
}

.document-table-filter::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.document-table-filter:focus {
  outline: 2px solid color-mix(in srgb, var(--card-color) 40%, transparent);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--card-color) 70%, #8b8579 30%);
}

.document-table-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.document-table-row {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 128px minmax(190px, 1fr) 124px;
  gap: 8px;
  align-items: start;
  padding: 6px 10px;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--card-color) 12%, #e2ddd2 88%);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
}

.qrec-document-table .document-table-row {
  grid-template-columns: 154px minmax(170px, 1fr) 190px;
}

button.document-table-row {
  cursor: var(--canvas-cursor);
}

button.document-table-row:hover {
  background: color-mix(in srgb, var(--card-color) 9%, #fffdf8 91%);
}

.document-table-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 26px;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  border-top: 0;
  background: color-mix(in srgb, var(--card-color) 8%, #fffdf8 92%);
  color: #405157;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.document-table-row > span {
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  font-size: 11px;
  line-height: 1.25;
}

.document-table-heading > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-table-did {
  color: #5d6b70;
  font-family: "Consolas", "JetBrains Mono", monospace;
}

.document-table-name {
  font-weight: 650;
}

.document-table-versions {
  color: #4f5e63;
  font-weight: 650;
}

.document-table-parent-version {
  color: #4f5e63;
  font-family: "Consolas", "JetBrains Mono", monospace;
  font-weight: 650;
}

.document-table-parent-version .document-review-link {
  color: inherit;
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
}

.qrec-add-symbol {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 auto 5px;
  border: 1.25px solid color-mix(in srgb, var(--card-color) 78%, #141414 22%);
  border-radius: 50%;
  background: #fffdf8;
  color: var(--ink);
  font-size: 22px;
  font-weight: 650;
  line-height: 1;
}

.canvas-node:hover {
  border-color: color-mix(in srgb, var(--card-color) 86%, #141414 14%);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--card-color) 12%, transparent),
    0 12px 24px rgba(25, 23, 20, 0.1);
}

.canvas-node.selected {
  z-index: 8;
  border-color: color-mix(in srgb, var(--card-color) 82%, #141414 18%);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card-color) 10%, #fffdf8 90%), #fffdf8 74%);
  color: var(--ink);
  box-shadow:
    0 0 0 2px #fffdf8,
    0 0 0 4px color-mix(in srgb, var(--card-color) 48%, transparent),
    0 18px 34px rgba(25, 23, 20, 0.16);
}

.canvas-node.reference-focus-selected {
  z-index: 9;
}

.canvas-node.reference-focus-incoming,
.canvas-node.reference-focus-outgoing {
  z-index: 6;
}

.canvas-node a {
  display: block;
  margin-bottom: 4px;
  color: #5d6b70;
  font-family: "Consolas", "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.2;
  text-decoration: none;
  pointer-events: none;
}

.canvas-node.selected a,
.canvas-node.selected strong {
  color: var(--ink);
}

.canvas-version-review-link {
  display: inline-block;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.canvas-version-review-link:hover {
  color: color-mix(in srgb, var(--card-color) 64%, #141414 36%);
}

.canvas-node strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.22;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.canvas-node > span,
.canvas-node small {
  display: block;
  margin-top: 4px;
  color: #405157;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.canvas-node small,
.card-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.canvas-node.selected > span,
.canvas-node.selected small,
.canvas-node.selected .card-kicker {
  color: #405157;
}

.canvas-node.missing-reference {
  --card-color: var(--missing-reference-color) !important;
  border-color: var(--missing-reference-color);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--missing-reference-color) 7%, #fffdf8 93%), #fffdf8 72%);
}

.card-kicker {
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.group-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.group-heading.owner-heading {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.group-heading .group-code {
  flex: 0 0 auto;
  font-size: 14px;
}

.group-heading .group-name {
  min-width: 0;
  color: #405157;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-heading .owner-department-name {
  color: #405157;
  font-size: 10px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.group-document-count {
  margin-top: 8px;
}

.version-attachment-list {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.version-attachment-item {
  display: grid;
  gap: 2px;
  border: 1px dashed color-mix(in srgb, var(--card-color) 38%, #d8dfdc 62%);
  border-left: 3px solid var(--card-color);
  border-radius: 6px;
  padding: 6px 7px;
  background: #ffffff;
  cursor: pointer;
}

.version-attachment-item:hover {
  background: color-mix(in srgb, var(--card-color) 8%, #fffdf8 92%);
  border-style: solid;
}

.canvas-node.selected .version-attachment-item {
  border-color: color-mix(in srgb, var(--card-color) 42%, #d8dfdc 58%);
  border-left-color: var(--card-color);
  background: #fffdf8;
  color: var(--ink);
}

.canvas-node.selected .version-attachment-item > span {
  color: var(--ink);
}

.canvas-node.selected .version-attachment-review-link {
  color: var(--ink);
}

.canvas-node.selected .version-attachment-item small {
  color: #405157;
}

.version-attachment-review-link {
  display: grid;
  gap: 2px;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.version-attachment-review-link:hover {
  color: color-mix(in srgb, var(--card-color) 64%, #141414 36%);
}

.version-attachment-review-link > span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.version-attachment-item small {
  margin: 0;
  color: #405157;
  font-size: 11px;
  font-weight: 600;
}

.summary-card {
  padding: 12px;
  background: #f8fbfa;
}

.root-card {
  background: #ffffff;
  border-width: 2px;
}

.summary-text {
  display: grid;
  gap: 6px;
  color: #405157;
  font-size: 12px;
  line-height: 1.25;
}

.summary-text span:first-child {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.inspector {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  scrollbar-width: thin;
}

.inspector-content {
  padding: 14px 16px;
}

.inspector-title {
  display: grid;
  gap: 9px;
}

.inspector-title h3 {
  font-size: 20px;
  line-height: 1.25;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  background: #f0ece4;
  color: #383633;
  white-space: nowrap;
}

.badge.draft {
  background: #f7efd9;
  color: var(--amber);
}

.badge.approved,
.badge.published,
.badge.released {
  background: #efede7;
  color: #343230;
}

.detail-grid {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 18px 0;
  font-size: 14px;
}

.inspector-section-title {
  margin: 16px 0 10px;
  font-size: 14px;
  line-height: 1.25;
}

.property-grid {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0 0 12px;
  font-size: 12px;
}

.property-grid dt {
  color: var(--muted);
  font-weight: 700;
}

.property-grid dd {
  min-width: 0;
  margin: 0;
  color: #24363b;
  overflow-wrap: anywhere;
}

.property-grid.full-property-card {
  grid-template-columns: minmax(154px, 38%) minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
  padding-top: 2px;
  font-size: 13px;
  line-height: 1.38;
}

.property-grid.full-property-card dt {
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.property-grid.full-property-card dd {
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.property-value-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  line-height: 1.38;
}

.property-value-list li {
  padding-left: 2px;
}

.property-value-object {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
}

.property-value-object dt {
  color: var(--muted);
  font-weight: 700;
}

.property-value-object dd {
  margin: 0;
}

.property-reference-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: inline;
  font: inherit;
  line-height: 1.35;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.property-reference-link:hover,
.property-reference-link:focus-visible {
  color: #8a5b18;
}

.property-reference-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.path-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #3c3933;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-grid dt {
  color: var(--muted);
}

.detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.reference-inline-block {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.reference-inline-list {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.reference-inline-list strong {
  margin-right: 8px;
  color: var(--ink);
}

.reference-chip {
  display: inline-flex;
  min-height: 28px;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  vertical-align: middle;
}

.reference-chip:hover {
  border-color: var(--line-strong);
  background: #f5f1e8;
}

.reference-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.timeline {
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}

.timeline h3 {
  margin-bottom: 12px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.timeline-item {
  position: relative;
  width: 100%;
  padding: 0 0 15px 18px;
  border: 0;
  border-left: 2px solid var(--line);
  background: transparent;
  text-align: left;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.timeline-item.selected strong {
  color: var(--accent);
}

.timeline-version-link {
  display: inline-block;
  width: fit-content;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.timeline-item .timeline-version-change {
  max-width: 100%;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.timeline-item strong,
.timeline-item span {
  display: block;
  overflow-wrap: anywhere;
}

.timeline-item strong {
  font-size: 13px;
  line-height: 1.35;
}

.timeline-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.timeline-item .badge {
  display: inline-flex;
  margin-top: 6px;
}

.markdown-review-panel.hidden-reader {
  display: none;
}

.canvas-layout.markdown-review-open .canvas-panel {
  display: none;
}

.markdown-review-panel {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.markdown-review-header {
  align-items: center;
  min-height: 42px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.markdown-review-titleline {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.markdown-review-titleline h2 {
  flex: 0 0 auto;
}

.markdown-review-titleline p {
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.markdown-review-actions {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.markdown-review-actions .markdown-review-button {
  width: var(--toolbar-icon-button-width);
  height: var(--toolbar-control-height);
  min-height: var(--toolbar-control-height);
  padding: 0;
  font-size: 0;
  line-height: 1;
}

.markdown-review-actions .icon-button:not(:disabled):hover {
  border-color: var(--toolbar-hover-border);
}

.markdown-review-actions .icon-button:disabled {
  opacity: 1;
  border-color: #e2ddd4;
  background: #efede7;
  color: #b4ada3;
  box-shadow: none;
}

.markdown-review-actions .icon-button[hidden] {
  display: none;
}

.markdown-review-icon {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.markdown-review-button.close .markdown-review-icon {
  stroke-width: 2.8;
}

.review-edit-button {
  min-width: 48px;
  height: var(--toolbar-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #141414;
  color: #fffdf8;
  font-size: var(--toolbar-control-font-size);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: var(--toolbar-control-shadow);
}

.markdown-review-actions .review-edit-button {
  border-color: #222;
  background: linear-gradient(180deg, #2a2a2a 0%, #171717 100%);
  color: #fffdf8;
}

.markdown-review-actions .review-export-button {
  min-width: 96px;
  padding: 0 12px;
}

.review-edit-button:hover {
  border-color: #141414;
  background: var(--toolbar-hover-dark);
}

.markdown-review-actions .review-edit-button:hover:not(:disabled) {
  border-color: #141414;
  background: var(--toolbar-hover-dark);
  color: #fffdf8;
}

.markdown-review-actions .review-edit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.markdown-review-export-status {
  max-width: 220px;
  overflow: hidden;
  color: #5f5a52;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.markdown-review-export-status.error {
  color: #a33b2f;
}

.inspector-back-button {
  height: var(--toolbar-control-height);
  min-height: var(--toolbar-control-height);
  min-width: 58px;
  padding: 0 11px;
  font-size: var(--toolbar-control-font-size);
  font-weight: 800;
}

#editSaveProposal.review-edit-button {
  min-width: 112px;
  height: var(--toolbar-control-height);
  min-height: var(--toolbar-control-height);
  padding: 0 12px;
  border-color: #141414;
  border-radius: 5px;
  background: #141414;
  color: #fffdf8;
  font-size: var(--toolbar-control-font-size);
  font-weight: 850;
  box-shadow: var(--toolbar-control-shadow);
  transform: skewX(var(--toolbar-control-skew));
}

#editSaveProposal.review-edit-button:hover {
  background: var(--toolbar-hover-dark);
}

.markdown-review-scroll {
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 28px;
}

.markdown-review-scroll > h3 {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.2;
}

.markdown-content {
  padding: 8px 0 2px;
  font-size: 13px;
  line-height: 1.55;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  margin: 18px 0 10px;
  line-height: 1.25;
}

.markdown-content p,
.markdown-content ul,
.markdown-content ol,
.markdown-content table,
.markdown-content pre,
.markdown-content figure {
  margin: 0 0 14px;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 24px;
}

.markdown-content li {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  margin: 0 0 6px;
}

.markdown-content li:last-child {
  margin-bottom: 0;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.markdown-content th,
.markdown-content td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.markdown-content th {
  background: #f5f7f6;
  text-align: left;
}

.markdown-content pre {
  overflow: auto;
  padding: 14px;
  border-radius: 6px;
  background: #191817;
  color: #fffdf8;
}

.markdown-content code {
  font-family: "Consolas", "JetBrains Mono", monospace;
}

.markdown-mermaid-embed {
  overflow-x: hidden;
  overflow-y: visible;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    #fffdf8;
  background-size: 24px 24px;
}

.markdown-mermaid-preview {
  width: 100%;
  min-width: 0;
}

.markdown-mermaid-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.markdown-mermaid-edge {
  fill: none;
  stroke: #778078;
  stroke-width: 1.4;
}

.markdown-mermaid-arrow {
  fill: #778078;
}

.markdown-mermaid-edge-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #fffdf8;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.markdown-mermaid-node-box {
  fill: #fffdf8;
  stroke: #141414;
  stroke-width: 1.4;
  filter: drop-shadow(0 6px 10px rgba(20, 20, 20, 0.08));
}

.markdown-mermaid-node-text {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.markdown-mermaid-node.rank-0 .markdown-mermaid-node-box {
  fill: #141414;
  stroke: #141414;
}

.markdown-mermaid-node.rank-0 .markdown-mermaid-node-text {
  fill: #fffdf8;
}

.markdown-mermaid-node.rank-1 .markdown-mermaid-node-box {
  fill: #eef4ef;
  stroke: #6b8f7b;
}

.markdown-mermaid-node.rank-2 .markdown-mermaid-node-box {
  fill: #f5f1e9;
  stroke: #95866b;
}

.markdown-mermaid-node.rank-3 .markdown-mermaid-node-box {
  fill: #eef3f6;
  stroke: #78909d;
}

.markdown-mermaid-node.has-gap .markdown-mermaid-node-box {
  fill: #fff2df;
  stroke: #b56d2b;
  stroke-width: 1.8;
}

.markdown-mermaid-node.has-gap .markdown-mermaid-node-text {
  fill: #141414;
}

.markdown-mermaid-embed.failed {
  background: #fffdf8;
}

.markdown-mermaid-source {
  margin: 0;
  background: #f5f1e9;
  color: var(--ink);
}

.markdown-content del {
  color: #5f5548;
  text-decoration-color: #141414;
  text-decoration-thickness: 2px;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.markdown-content figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.markdown-canvas-embed {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 10px;
}

.markdown-canvas-preview {
  display: grid;
  min-height: 140px;
  height: clamp(420px, 58vh, 720px);
  place-items: center;
  overflow: hidden;
  padding: 16px;
  box-sizing: border-box;
  border: 1px solid var(--grid-line);
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    #fffaf0;
  background-size: 24px 24px;
}

.markdown-canvas-preview svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.markdown-canvas-preview rect {
  fill: color-mix(in srgb, var(--canvas-node-color, #f8fbfa) 18%, #fffdf8);
  stroke: var(--canvas-node-color, #141414);
  stroke-width: 1.5;
}

.markdown-canvas-preview path {
  fill: none;
  stroke-width: 1.4;
}

.markdown-canvas-preview text {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #fffdf8;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.markdown-canvas-node-body {
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.markdown-canvas-node-body strong,
.markdown-canvas-node-body span {
  display: block;
}

.markdown-canvas-node-body strong {
  margin-bottom: 7px;
  font-size: 18px;
  line-height: 1.18;
}

.markdown-canvas-node-body code {
  display: inline-block;
  margin: 0 0 7px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f0ece4;
  font-size: 13px;
}

.markdown-canvas-node-body.group {
  color: #5f6867;
  font-size: 17px;
  font-weight: 800;
}

.markdown-canvas-node.group rect {
  fill: color-mix(in srgb, var(--canvas-node-color, #f8fbfa) 8%, #fffdf8);
  stroke-dasharray: 8 6;
}

.doc-link {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  user-select: text;
}

.document-review-link {
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.document-review-link:hover {
  color: #376b75;
}

.doc-link.markdown-review-target {
  border-radius: 4px;
  background: #f7efd9;
  box-shadow: 0 0 0 4px #f7efd9;
}

.muted,
.loading {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #bdc8cc;
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

.empty-state.inline {
  position: static;
  min-height: 150px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
}

#editView .edit-header,
#editView .cerber-stream-item.source,
#editView .cerber-change-stack {
  display: none !important;
}

@media (max-width: 1180px) {
  .topbar {
    align-items: stretch;
    display: grid;
  }

  .canvas-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .canvas-header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .graph-search {
    width: min(100%, var(--toolbar-search-max-width));
  }

  .relationship-filterbar {
    justify-content: flex-start;
  }

  .canvas-viewport {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 10px;
  }

  .panel-header {
    align-items: flex-start;
    display: grid;
  }

  .canvas-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .baseline-switch {
    grid-column: 1 / span 2;
    width: 100%;
  }

  .baseline-option {
    min-width: 0;
    flex: 1 1 0;
    padding: 0 5px;
  }

  .graph-search {
    grid-column: 1 / -1;
    width: 100%;
  }

  .search-icon {
    margin-left: 9px;
  }

  .canvas-header-actions .graph-search input {
    padding: 0 8px 0 6px;
    font-size: var(--toolbar-control-font-size);
  }

  .relationship-filterbar {
    grid-column: 1 / span 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .relationship-toggle {
    min-width: 0;
    padding: 0 4px;
  }

  .canvas-header-actions .icon-button {
    width: 100%;
  }

  .version-focus-toggle {
    grid-column: 4;
  }

  .canvas-header-actions #resetView {
    grid-column: 5;
  }

  #graphView.view.active {
    height: auto;
    overflow: visible;
  }

  .canvas-layout {
    height: auto;
  }

  .canvas-panel {
    grid-template-rows: max-content minmax(240px, auto);
  }

  .canvas-viewport {
    min-height: 240px;
  }

  .canvas-panel,
  .inspector {
    min-height: 0;
  }
}
