/* Private workbench layout. Graph overrides belong to the consumer integration. */
:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #213442;
  background: #f3f5f6;
  --accent: #284e66;
  --line: #d9e1e5;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  padding: 11px 15px;
  cursor: pointer;
  min-height: 44px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.quiet {
  background: #fff;
  border-color: var(--line);
  color: var(--accent);
}
.icon {
  min-width: 44px;
  padding: 8px;
  background: white;
  color: var(--accent);
  border-color: var(--line);
}
button:hover:not(:disabled) {
  filter: brightness(0.95);
}
:focus-visible {
  outline: 3px solid #d3a747;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
p {
  line-height: 1.6;
  color: #596b76;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 650;
  margin-bottom: 10px;
}
header {
  display: flex;
  align-items: center;
  padding: 15px 28px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
  background: #fff;
}
.brand {
  font-size: 23px;
  font-weight: 700;
  color: #213442;
  text-decoration: none;
  letter-spacing: -0.04em;
}
.brand span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  background: #e9eef2;
  padding: 5px 8px;
  border-radius: 5px;
  margin-left: 8px;
}
.private {
  font-size: 12px;
  color: #697a83;
  margin-left: auto;
}
main {
  max-width: 1560px;
  margin: auto;
  padding: 27px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.toolbar {
  display: flex;
  gap: 14px;
  margin: 16px 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #546874;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd7de;
  border-radius: 9px;
  background: #fff;
  min-height: 44px;
  padding: 10px;
  color: #203747;
  max-width: 100%;
}
.search-label {
  flex: 1;
}
.reference-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.reference-bar label {
  min-width: 210px;
}
.reference-bar p {
  margin: 0;
  font-size: 12px;
  flex: 1;
  min-width: 180px;
}
textarea {
  min-height: 110px;
  resize: vertical;
  font-weight: 400;
}
#proposal {
  max-width: 270px;
}
.viewbar,
.map-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.segmented {
  display: flex;
  padding: 3px;
  background: #e4eaf0;
  border-radius: 11px;
  margin-right: auto;
}
.segmented button {
  background: transparent;
  color: #546874;
  border-radius: 8px;
  padding: 8px 13px;
  min-height: 40px;
}
.segmented button[aria-pressed='true'] {
  background: #fff;
  color: #203747;
  box-shadow: 0 1px 5px #22334412;
}
#change-count {
  font-size: 11px;
  display: inline-block;
  padding: 2px 5px;
  background: #eee4c9;
  border-radius: 5px;
}
#status {
  min-height: 24px;
  margin: 10px 0;
  font-size: 13px;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 365px;
  gap: 16px;
  align-items: start;
}
.map-panel,
#inspector {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
}
.map-tools {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.map-tools select {
  width: auto;
  min-height: 40px;
  font-size: 12px;
}
.map-tools button {
  font-size: 12px;
}
.map-tools #fit {
  margin-left: auto;
}
.constellation-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.constellation-bar label {
  flex: 0 1 320px;
  min-width: 0;
}
.constellation-bar p {
  flex: 1;
  font-size: 12px;
  margin: 0;
}
.constellation-bar a {
  display: block;
  font-size: 11px;
  margin-top: 6px;
}
.shape-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 15px;
  padding: 8px 15px 13px;
  font-size: 11px;
}
.shape-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.shape-legend svg {
  width: 18px;
  height: 18px;
}
.design-context {
  margin: 20px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.decision {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 8px 0;
  overflow: hidden;
}
.decision summary {
  font-weight: 600;
  font-size: 13px;
  padding: 12px;
}
.decision-body {
  padding: 12px;
}
.decision-body p,
.context-reference {
  font-size: 13px;
}
.decision-body li {
  margin: 0 0 12px 18px;
  line-height: 1.6;
  font-size: 13px;
  color: #596b76;
}
.design-context > a {
  display: inline-block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--accent);
}
.decision-status {
  display: inline-block;
  font-size: 10px;
  background: #eaf0f6;
  color: #38566c;
  border-radius: 4px;
  padding: 4px 6px;
  margin-bottom: 10px;
}
.decision-sources {
  display: grid;
  gap: 8px;
  font-size: 11px;
}
.decision-sources a {
  color: var(--accent);
  line-height: 1.5;
}
.map-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 15px;
  font-size: 11px;
  color: #6c7b84;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
#legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 7px;
}
i.added {
  background: #2a8059;
}
i.changed {
  background: #ab781f;
}
i.removed {
  background: #b84a4c;
}
details summary {
  cursor: pointer;
  padding: 14px;
  font-size: 13px;
  color: #354e5e;
  min-height: 44px;
}
details[open] summary {
  border-bottom: 1px solid var(--line);
}
.entity-list {
  max-height: 280px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 5px;
  padding: 10px;
}
.entity-list button {
  display: flex;
  align-items: start;
  flex-direction: column;
  text-align: left;
  background: #f5f7f9;
  color: #28475b;
  padding: 9px 12px;
  overflow-wrap: anywhere;
}
.entity-list small {
  font-size: 10px;
  font-weight: 400;
  color: #74828c;
}
.empty,
#inspector > section {
  padding: 21px;
}
#inspector {
  max-height: calc(100vh - 160px);
  overflow: auto;
  scrollbar-gutter: stable;
}
#inspector h2 {
  overflow-wrap: anywhere;
}
.entity-name {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
  color: #647987;
}
.section-head {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}
.section-head h3 {
  margin: 0;
}
.section-head button {
  font-size: 11px;
  padding: 6px 9px;
  min-height: 36px;
}
.field-row,
.relation-row,
.note {
  padding: 12px 0;
  border-bottom: 1px solid #e5ebee;
  font-size: 13px;
}
.field-row strong {
  display: block;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}
.field-row span {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #637581;
}
.field-row button {
  float: right;
  min-height: 32px;
  font-size: 11px;
  padding: 5px 8px;
}
.relation-row button {
  background: transparent;
  color: var(--accent);
  padding: 0;
  min-height: 35px;
  text-align: left;
  justify-content: start;
  overflow-wrap: anywhere;
}
.note p {
  white-space: pre-wrap;
  color: #304b5a;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.note time {
  font-size: 10px;
  color: #788690;
}
.note button {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 11px;
}
.status-pill {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 5px;
  background: #e5edf1;
  font-size: 11px;
  margin: 5px 0;
}
.status-pill.added {
  background: #ddf0e5;
  color: #246346;
}
.status-pill.removed {
  background: #f7e3e4;
  color: #a0363e;
}
.status-pill.changed {
  background: #f3ebd9;
  color: #8b6322;
}
.danger {
  color: #a73946 !important;
}
.history {
  background: #fff;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.history > div {
  padding: 12px 16px;
}
.revision {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 12px;
}
.revision button {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 11px;
}
.warning {
  color: #8b6322;
  font-size: 12px;
  margin: 8px 0;
}
.diff-row {
  font-size: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.diff-row del {
  color: #a73946;
}
.diff-row ins {
  color: #246346;
  text-decoration: none;
}
.signin {
  max-width: 540px;
  padding: 55px 30px;
  margin: 8vh auto;
}
.signin h1 {
  font-size: 43px;
  line-height: 1.1;
}
.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 33px;
  display: grid;
  place-items: center;
  margin-bottom: 35px;
}
.error {
  color: #a73946;
}
dialog {
  width: min(580px, calc(100vw - 24px));
  max-height: 90svh;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 70px #142d4233;
}
dialog::backdrop {
  background: #172a4055;
}
dialog form {
  margin: 0;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.dialog-heading h2 {
  margin: 0;
}
#editor-fields {
  display: grid;
  gap: 15px;
  padding: 22px 0;
}
.checkbox {
  flex-direction: row;
  align-items: center;
}
.checkbox input {
  width: 20px;
  height: 20px;
  min-height: 20px;
}
.dialog-actions {
  display: flex;
  justify-content: end;
}
.comparison-section {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  header {
    padding: 12px 17px;
    gap: 10px;
  }
  .private {
    display: none;
  }
  header #logout {
    margin-left: auto;
    font-size: 12px;
  }
  main {
    padding: 20px 12px;
  }
  .heading {
    align-items: start;
  }
  .heading h1 {
    font-size: 27px;
  }
  .heading .actions {
    justify-content: end;
  }
  .heading .actions button,
  .heading .actions a {
    font-size: 12px;
    padding: 9px;
  }
  .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .search-label {
    grid-row: 2;
    grid-column: 1/-1;
  }
  #proposal {
    max-width: none;
  }
  .workbench {
    grid-template-columns: 1fr;
  }
  .constellation-bar {
    display: block;
    padding: 14px;
  }
  .constellation-bar p {
    margin-top: 10px;
  }
  .map-tools {
    gap: 5px;
    padding: 8px;
  }
  .map-tools button {
    padding: 8px;
    min-height: 40px;
  }
  .map-tools .icon {
    min-width: 36px;
  }
  .map-tools select {
    width: 73px;
    padding: 6px;
  }
  #inspector {
    max-height: none;
  }
  .viewbar {
    gap: 6px;
  }
  .viewbar > button {
    font-size: 12px;
    padding: 8px;
  }
  .segmented {
    width: 100%;
    margin-bottom: 3px;
  }
  .segmented button {
    flex: 1;
  }
  .empty,
  #inspector > section {
    padding: 19px;
  }
  .entity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .signin {
    margin-top: 4vh;
  }
  .signin h1 {
    font-size: 37px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.12s ease,
      filter 0.12s ease;
  }
}
