:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #d7dee9;
  --line-soft: #e9eef5;
  --surface: #f8fafc;
  --teal: #0f766e;
  --blue: #2563eb;
  --amber: #b45309;
  --red: #b91c1c;
  --green: #15803d;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.38 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button,
.filePick {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: linear-gradient(#ffffff, #f8fafc);
  color: var(--ink);
  min-height: 30px;
  padding: 5px 8px;
  cursor: pointer;
  font-weight: 600;
}

button:hover,
.filePick:hover {
  border-color: #9aa7bd;
}

button.active {
  border-color: var(--blue);
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 650;
}

button.primaryAction {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.topbar {
  min-height: 48px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
}

.brandLogo {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.brand strong {
  color: #0f172a;
  font-size: 14px;
  white-space: nowrap;
}

.brand span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f8fafc;
  padding: 1px 7px;
  font-size: 11px;
}

.brand span,
.meta,
.inputMeta {
  color: var(--muted);
}

.actions,
.viewTabs,
.filters,
.modeSwitch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.actions {
  justify-content: flex-end;
}

.modeSwitch,
.viewTabs,
.workspaceNav {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eef2f7;
  padding: 2px;
}

.modeSwitch button,
.viewTabs button,
.workspaceNav button {
  min-height: 26px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #526070;
  padding: 4px 8px;
}

.modeSwitch button.active,
.viewTabs button.active,
.workspaceNav button.active {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.10);
}

.githubAuth {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.actions input {
  width: 178px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  padding: 7px 9px;
}

.githubAuth input {
  width: 126px;
}

.tokenState {
  min-width: 96px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.actions input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 38vw) 1fr;
  min-height: calc(100vh - 46px);
}

.inputPane,
.workPane {
  min-width: 0;
  padding: 8px;
}

.inputPane {
  border-right: 1px solid var(--line);
  background: #fbfcfe;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
}

.shell.statefulMode {
  grid-template-columns: minmax(240px, 22vw) 1fr;
}

.shell.statefulMode .inputPane {
  display: grid;
  background: #f8fafc;
}

.shell.sourceDirty .inputPane {
  background: #fffaf0;
}

.shell.sourceDirty .editorWrap {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.shell.statefulMode .workPane {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "header header"
    "workspace canvas";
  align-items: start;
  align-content: start;
  gap: 8px;
  padding: 8px;
}

.shell.statefulMode .boardHeader {
  grid-area: header;
}

.shell.statefulMode .userPanel {
  display: none;
}

.canvasStack {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.shell.statefulMode .canvasStack {
  grid-area: canvas;
}

.shell.emptyBoard .canvasStack {
  gap: 10px;
}

.userPanel {
  margin-top: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.userPanel span {
  color: var(--muted);
  font-size: 12px;
}

.workspacePanel {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.shell.statefulMode .workspacePanel {
  grid-area: workspace;
  position: sticky;
  top: 52px;
  max-height: calc(100vh - 60px);
  overflow: auto;
}

.workspaceTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
}

.workspaceTop h3 {
  margin: 0;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.workspaceTop p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.quickAddForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel);
}

.quickAddForm input,
.quickAddForm select,
.quickAddForm textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--ink);
  padding: 6px 7px;
}

.formGroupTitle,
.quickAddForm input:nth-of-type(1),
.quickAddForm input:nth-of-type(2),
.quickAddForm textarea,
.quickAddForm button {
  grid-column: 1 / -1;
}

.formGroupTitle {
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.quickLinkForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px minmax(0, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel);
}

.quickLinkForm input,
.quickLinkForm select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--ink);
  padding: 6px 7px;
}

.quickLinkForm input:first-child {
  grid-column: auto;
}

.quickLinkForm .formGroupTitle,
.quickLinkForm input:last-of-type,
.quickLinkForm button {
  grid-column: 1 / -1;
}

.workspaceNav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
}

.workspaceNav button {
  text-align: center;
  padding: 4px;
  font-size: 11px;
}

.workspaceBody,
.workspaceTab {
  min-width: 0;
}

.workspaceHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.workspaceHeader h3 {
  margin: 0;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.workspaceHeader p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.boardList,
.presetList,
.workspaceList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.presetList {
  max-height: 420px;
  overflow: auto;
}

.boardList button {
  position: relative;
  display: grid;
  gap: 4px;
  text-align: left;
  min-height: 74px;
  border-radius: 7px;
  background: #ffffff;
  padding: 8px 9px 8px 11px;
}

.boardList button::before {
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  content: "";
}

.boardList button.active {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08), 0 8px 20px rgba(37, 99, 235, 0.08);
}

.boardList button.active::before {
  background: var(--blue);
}

.boardList button.draftBoard {
  min-height: 48px;
  border-style: dashed;
  background: #f7f9fc;
  opacity: 0.78;
}

.boardList button.draftBoard:not(.active) .boardMetrics,
.boardList button.draftBoard:not(.active) > span:not(.boardListTitle) {
  display: none;
}

.boardListTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.boardListTitle strong {
  min-width: 0;
  color: #111827;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boardScope {
  overflow: hidden;
  color: var(--blue);
  font: 11px/1.25 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boardDescription {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boardList button.draftBoard:not(.active) .boardDescription {
  display: none;
}

.draftGroup {
  display: grid;
  gap: 6px;
}

.draftGroup summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  padding: 5px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.draftGroup summary strong {
  border-radius: 999px;
  background: #e5eaf2;
  color: #344054;
  padding: 1px 7px;
  font-size: 10px;
}

.boardMetrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.boardMetrics span,
.freshnessBadge {
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  padding: 2px 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.boardMetrics strong {
  color: #111827;
}

.freshnessBadge {
  flex: 0 0 auto;
  font-weight: 800;
  text-transform: uppercase;
}

.freshnessFresh {
  border-color: rgba(21, 128, 61, 0.28);
  background: rgba(21, 128, 61, 0.08);
  color: var(--green);
}

.freshnessRecent {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(180, 83, 9, 0.08);
  color: var(--amber);
}

.freshnessStale {
  border-color: rgba(185, 28, 28, 0.24);
  background: rgba(185, 28, 28, 0.07);
  color: var(--red);
}

.freshnessDraft,
.freshnessUnknown {
  border-color: var(--line-soft);
  background: #f8fafc;
  color: var(--muted);
}

.presetList button,
.workspaceList div {
  display: grid;
  gap: 2px;
  text-align: left;
}

.presetList button span,
.workspaceList span,
.emptyState {
  color: var(--muted);
  font-size: 12px;
}

.workspaceList div {
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--panel);
}

.inlineForm {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 7px;
}

.addItemForm {
  grid-template-columns: 1fr;
}

.inlineForm input,
.inlineForm select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  padding: 6px 7px;
}

.debugPanel dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 0;
}

.debugPanel div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.debugPanel dt {
  color: var(--muted);
  font-size: 12px;
}

.debugPanel dd {
  margin: 2px 0 0;
}

.paneHeader,
.boardHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.paneSubtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.sourceActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.boardHeader {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  padding: 8px 10px;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03);
}

h1,
h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.filePick input {
  display: none;
}

.editorWrap {
  position: relative;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101828;
}

.editorWrap:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

textarea,
.syntaxLayer {
  margin: 0;
  padding: 12px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

textarea {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 420px;
  resize: none;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: #f9fafb;
  outline: none;
}

textarea::selection {
  background: rgba(45, 212, 191, 0.28);
  color: transparent;
}

.syntaxLayer {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: #d0d5dd;
  pointer-events: none;
  overflow: hidden;
}

.tok-key {
  color: #7dd3fc;
}

.tok-string {
  color: #86efac;
}

.tok-number {
  color: #fcd34d;
}

.tok-literal {
  color: #c4b5fd;
}

.tok-punct {
  color: #94a3b8;
}

.tok-comment {
  color: #64748b;
}

.tok-ref {
  color: #f9a8d4;
}

.tok-arrow {
  color: #f59e0b;
  font-weight: 700;
}

.tok-keyword {
  color: #67e8f9;
  font-weight: 700;
}

.tok-tag {
  color: #fde68a;
}

.filters input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.filterChips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 0;
  max-height: 70px;
  overflow: auto;
  align-content: flex-start;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(248, 250, 252, 0.72);
  padding: 5px;
}

.filterChip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  min-height: 21px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.keyHints {
  align-self: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filterChip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.filterChip.active {
  border-color: var(--blue);
  background: #eff6ff;
  color: var(--blue);
  font-weight: 650;
}

.filterChip span {
  opacity: 0.7;
  font-size: 10px;
}

.inputMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
}

#errorText {
  color: var(--red);
  text-align: right;
}

.workPane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contentGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 8px;
  align-items: start;
}

.shell.emptyBoard .contentGrid {
  grid-template-columns: minmax(0, 720px);
}

.shell.emptyBoard .canvasTools {
  display: none;
}

.viewStack {
  min-width: 0;
}

.canvasTools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03);
}

.filters input[type="search"] {
  flex: 1 1 180px;
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 30px;
  padding: 5px 7px;
}

.filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 12px;
  white-space: nowrap;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.stat {
  display: grid;
  flex: 1 1 60px;
  min-width: 60px;
  max-width: 90px;
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--panel);
  padding: 5px 7px;
}

.stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
}

.stat strong {
  margin: 1px 0 0;
  color: #111827;
  font-size: 17px;
  line-height: 1.1;
}

.view {
  min-height: 0;
}

.hidden {
  display: none;
}

.briefGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 8px;
}

.emptyBoardPanel {
	display: grid;
	gap: 16px;
	border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
	box-shadow: var(--shadow);
}

.authGate {
	display: grid;
	gap: 16px;
	border: 1px solid #bfdbfe;
	border-radius: 8px;
	padding: 18px;
	box-shadow: var(--shadow);
	max-width: 720px;
	margin: 8vh auto 0;
	background: linear-gradient(180deg, #ffffff, #f8fbff);
	text-align: center;
}

.emptyBoardKicker {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 2px 8px;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emptyBoardPanel h3,
.authGate h3 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.15;
}

.emptyBoardPanel p,
.authGate p {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.emptyBoardActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.starterActions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.starterActions h4 {
  grid-column: 1 / -1;
  margin: 0;
  color: #0f172a;
  font-size: 12px;
  text-transform: uppercase;
}

.starterActions button {
  display: grid;
  gap: 3px;
  text-align: left;
  border-radius: 7px;
  padding: 9px 10px;
}

.starterActions button strong {
  color: #111827;
  font-size: 12px;
}

.starterActions button span {
  color: var(--muted);
  font-size: 11px;
}

.starterCompact {
  width: 100%;
  grid-template-columns: 1fr;
}

.briefSection {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--panel);
  padding: 0;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03);
}

.briefSection.wide {
  grid-column: 1 / -1;
}

.briefSection h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
  background: #f8fafc;
  padding: 7px 9px;
}

.briefSection h3 span {
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.briefSection h3 strong {
  min-width: 22px;
  border-radius: 999px;
  background: #e5eaf2;
  color: #344054;
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.item {
  padding: 8px 9px;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
}

.item:hover {
  background: #f8fbff;
}

.item:first-of-type {
  border-top: 0;
}

.item.closedItem {
  margin-top: 5px;
  padding: 4px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f5f6f8;
  color: #667085;
  font-size: 12px;
}

.item.closedItem .itemHead {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.item.closedItem strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item.closedItem .badges {
  flex: 0 0 auto;
  margin-top: 0;
}

.item.closedItem .badge {
  min-height: 17px;
  padding: 1px 5px;
  font-size: 10px;
}

.item.closedItem .badge.review-none {
  display: none;
}

.item.closedItem .reason {
  display: none;
}

.item strong {
  display: block;
  color: #111827;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.itemHead {
  display: block;
}

.itemHead .badges {
  margin-top: 3px;
}

.item a {
  color: var(--blue);
  text-decoration: none;
}

.reason {
  color: var(--muted);
}

.badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #f8fafc;
  color: #344054;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.emojiShortcode {
  display: inline-block;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", emoji;
  line-height: 1;
  vertical-align: -0.08em;
}

.badge.type-pr {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #5b21b6;
}

.badge.type-issue {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.badge.type-local,
.badge.life-local {
  border-color: #99f6e4;
  background: #ecfeff;
  color: #0f766e;
}

.badge.life-open,
.badge.review-approved,
.badge.ci-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.badge.life-merged {
  border-color: #ddd6fe;
  background: #faf5ff;
  color: #6d28d9;
}

.badge.life-closed,
.badge.ci-none,
.badge.review-none {
  border-color: #e5e7eb;
  background: #f9fafb;
  color: #667085;
}

.badge.life-draft,
.badge.review-requested,
.badge.review-commented,
.badge.ci-pending {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.badge.review-changes,
.badge.ci-failure {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.badge.auth-public {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.suggestionPanel {
  min-width: 0;
}

.suggestionBox {
  max-height: 128px;
  overflow: auto;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff7ed;
  padding: 6px 7px;
}

.suggestionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.suggestionHead strong {
  display: block;
  font-size: 13px;
}

.suggestionHead span,
.suggestionEvidence,
.suggestionMore {
  color: var(--muted);
  font-size: 11px;
}

.suggestionList {
  display: grid;
  gap: 5px;
}

.suggestionRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  border: 1px solid #fed7aa;
  border-radius: 5px;
  background: #ffffff;
  min-height: 34px;
  padding: 4px 5px;
}

.suggestionRow.selectedSuggestion {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.suggestionMain {
  min-width: 0;
}

.suggestionRelation {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.suggestionRelation strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestionRelation span {
  flex: 0 0 auto;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.suggestionEvidence {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestionMeta,
.suggestionActions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.suggestionActions button {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 11px;
}

.suggestionBadge {
  border-color: #fed7aa;
  background: #fffbeb;
  color: #9a3412;
}

.suggestionMore {
  margin-top: 7px;
}

.edgeInspector {
  min-width: 0;
}

.edgeBox {
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.edgeHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.edgeHead strong {
  display: block;
}

.edgeActions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.edgeHead span,
.edgeEndpoint span,
.edgeEvidence span {
  color: var(--muted);
  font-size: 12px;
}

.edgeRoute {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.edgeEndpoint {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  padding: 8px;
}

.edgeEndpoint strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edgeArrow {
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.edgeSignals {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.edgeBadge {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.edgeEvidence {
  display: grid;
  gap: 3px;
  margin-top: 8px;
}

.edgeEvidence code {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #344054;
  padding: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edgeJSON {
  margin-top: 7px;
}

.edgeJSON summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.edgeJSON pre {
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 8px;
}

.graphCanvas {
  position: relative;
  min-width: 0;
  min-height: calc(100vh - 210px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.graphToolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 6px;
}

.graphToolbar select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  padding: 4px 8px;
  font-weight: 700;
}

.graphToolbar #graphDriverSelect {
  margin-right: auto;
}

.graphToolbar span {
  min-width: 44px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.graphFocusPanel {
  margin-bottom: 7px;
}

.graphFocusBox {
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #f8fbff;
  padding: 8px;
}

.graphFocusHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.graphFocusHead span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.graphFocusHead strong {
  display: block;
  margin-top: 2px;
  color: #111827;
  line-height: 1.25;
}

.graphFocusColumns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.graphFocusColumns h3 {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.graphFocusNode {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 38px;
  margin-top: 4px;
  text-align: left;
}

.graphFocusNode span {
  color: var(--blue);
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.graphFocusNode strong {
  overflow: hidden;
  color: #111827;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graphFocusEmpty {
  min-height: 38px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  padding: 9px 8px;
  font-size: 11px;
}

.graphScale {
  position: relative;
}

.graphHiddenSummary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 18px);
  margin: 8px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  padding: 6px 8px;
  font-size: 12px;
}

.graphHiddenSummary strong {
  color: #111827;
}

.graphHiddenSummary button {
  min-height: 24px;
  padding: 2px 7px;
}

.graphEmpty {
  margin: 8px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  padding: 14px;
}

.graphPairs {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.pairTierLabel {
  margin: 10px 0 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
}

.pairTargetActions {
  display: flex;
  gap: 4px;
  padding: 4px 0 0;
}

.pairTargetActions button {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

.syncPanel {
  font-size: 12px;
}

.syncList {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.syncList > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line-soft);
}

.syncList dt {
  color: var(--muted);
  font-weight: 600;
}

.syncList dd {
  margin: 0;
  word-break: break-word;
}

.syncStatus {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.syncOk { background: #dcfce7; color: #15803d; }
.syncFailed { background: #fee2e2; color: #b91c1c; }
.syncRunning { background: #fef9c3; color: #92400e; }
.syncUnknown { background: #f3f4f6; color: #6b7280; }

.syncActions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.graphPairGroup {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.6fr);
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.05);
}

.graphPairGroup.selectedPair {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), 0 8px 22px rgba(16, 24, 40, 0.10);
}

.graphPairTargets {
  display: grid;
  gap: 6px;
}

.graphPairTarget {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
}

.graphPairNode {
  display: grid;
  align-content: start;
  gap: 4px;
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
  padding: 7px 8px;
  text-align: left;
}

.graphPairNode span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.graphPairNode strong {
  color: #111827;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.graphPairRelation {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #fff7ed;
  color: #9a3412;
  padding: 8px;
  text-align: center;
}

.graphPairRelation strong {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.graphPairRelation span {
  margin-top: 3px;
  color: #b45309;
  font-size: 10px;
  font-weight: 700;
}

.graphPairRelation em {
  margin-top: 3px;
  color: #b45309;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.graphFocusDriver {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) repeat(3, minmax(220px, 1fr));
  gap: 10px;
  padding: 8px;
}

.graphFocusHero,
.graphFocusLane {
  display: grid;
  align-content: start;
  gap: 7px;
}

.graphFocusLane h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #f8fafc;
  color: #111827;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.graphFocusLane h3 strong {
  border-radius: 999px;
  background: #e5eaf2;
  color: #344054;
  padding: 1px 6px;
  font-size: 10px;
}

.graphFocusLane > div {
  display: grid;
  gap: 6px;
}

.graphBacklog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  padding: 8px;
}

.nodeSignals {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.nodePeople {
  display: flex;
  align-items: center;
  min-height: 20px;
}

.nodePeople img {
  width: 20px;
  height: 20px;
  margin-right: -5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #eef2f7;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
}

.nodeLabels {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.nodeLabels span,
.nodeMilestone {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nodeMilestone {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.avatarChips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.avatarChip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f0f4ff;
  border: 1px solid #c7d7fd;
  border-radius: 999px;
  padding: 1px 6px 1px 2px;
  font-size: 10px;
  color: #3b4fc8;
  max-width: 120px;
  overflow: hidden;
}

.avatarChip img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avatarFallback {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graphInner {
  position: relative;
  min-width: 900px;
  min-height: 620px;
  transform-origin: 0 0;
}

.graphColumnHeader {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 204px;
  min-height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #f8fafc;
  padding: 6px 8px;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.04);
  pointer-events: none;
}

.graphColumnHeader strong {
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.graphColumnHeader span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.edgeLayer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: auto;
}

.graphEdge {
  cursor: pointer;
  pointer-events: stroke;
  stroke: #667085;
  stroke-width: 1.7;
}

.graphEdge.softEdge {
  stroke: #b8c0cc;
  stroke-dasharray: 5 5;
  stroke-width: 1.35;
}

.graphEdge.selectedEdge {
  stroke: #dc2626;
  stroke-width: 3;
  stroke-dasharray: none;
}

.graphEdge.focusEdge {
  stroke: #2563eb;
  stroke-width: 2.6;
  stroke-dasharray: none;
}

.graphEdgeHit {
  cursor: pointer;
  pointer-events: stroke;
  stroke: rgba(15, 118, 110, 0.01);
  stroke-width: 16;
}

.graphEdge.edge-addresses,
.graphEdge.edge-mentions,
.graphEdge.edge-relates_to,
.graphEdge.edge-closes {
  stroke-dasharray: 2 5;
}

.nodeCard {
  position: absolute;
  z-index: 2;
  width: 204px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  padding: 7px 8px;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.10);
  cursor: pointer;
}

.nodeCard:hover,
.nodeCard.selectedNode,
.nodeCard.selectedEndpoint {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15), 0 8px 22px rgba(16, 24, 40, 0.14);
}

.nodeCard.focusNode {
  border-color: #93c5fd;
  background: #f8fbff;
}

.nodeCard.dimNode {
  opacity: 0.42;
}

.nodeCard.note {
  border-color: var(--teal);
  background: #edfdfa;
}

.nodeCard.blocked {
  border-left: 4px solid var(--amber);
}

.nodeCard.ready {
  border-left: 4px solid var(--green);
}

.nodeCard.closed {
  color: #6b7280;
  background: #f3f4f6;
  width: 190px;
  min-height: 0;
  max-height: 64px;
  overflow: hidden;
  padding: 7px 8px;
  opacity: 0.82;
}

.nodeCard.kind-pr {
  border-top: 3px solid #8b5cf6;
}

.nodeCard.kind-issue {
  border-top: 3px solid #3b82f6;
}

.nodeCard.life-merged {
  background: #faf5ff;
  border-color: #c4b5fd;
}

.nodeCard.life-draft {
  background: #fffbeb;
  border-color: #fde68a;
}

.nodeCard.closed.life-closed,
.nodeCard.closed.life-merged {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.nodeCard.ci-failure {
  box-shadow: inset 3px 0 0 #dc2626, 0 2px 12px rgba(16, 24, 40, 0.07);
}

.nodeCard.ci-success {
  box-shadow: inset 3px 0 0 #16a34a, 0 2px 12px rgba(16, 24, 40, 0.07);
}

tr.ci-failure td:first-child {
  box-shadow: inset 3px 0 0 #dc2626;
}

tr.ci-success td:first-child {
  box-shadow: inset 3px 0 0 #16a34a;
}

.nodeId {
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nodeTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.nodeKind,
.nodeRef {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.nodeKind {
  background: #eff6ff;
  color: #1d4ed8;
}

.nodeRef {
  background: #f3f4f6;
  color: #475467;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.nodeTitle {
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
  margin-bottom: 6px;
}

.nodeCard.closed .nodeId,
.nodeCard.closed .nodeTitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nodeCard.closed .nodeTop,
.nodeCard.closed .nodeId {
  display: none;
}

.nodeCard.closed .nodeTitle {
  margin-bottom: 5px;
  font-size: 12px;
}

.nodeCard.closed .badge {
  flex: 0 0 auto;
  min-height: 17px;
  padding: 1px 5px;
  font-size: 10px;
}

.nodeCard.closed .badges {
  flex-wrap: nowrap;
  gap: 3px;
  overflow: hidden;
}

.nodeCard.closed .badge.review-none {
  display: none;
}

.nodeCard.selectedEndpoint {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16), 0 2px 12px rgba(16, 24, 40, 0.07);
}

.nodeCard.selectedNode {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14), 0 1px 5px rgba(16, 24, 40, 0.08);
}

.nodeState {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

th,
td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: #f9fafb;
}

td {
  overflow-wrap: anywhere;
}

tr:last-child td {
  border-bottom: 0;
}

.workTable tr.closed td {
  padding-top: 5px;
  padding-bottom: 5px;
  background: #f5f6f8;
  color: #667085;
  font-size: 12px;
}

.workTable tr.closed .tableItem {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.workTable tr.closed .tableItemID,
.workTable tr.closed .tableItemTitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workTable tr.closed .tableItemID {
  flex: 0 1 46%;
  margin-bottom: 0;
}

.workTable tr.closed .tableItemTitle {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.workTable tr.closed .badges {
  flex-wrap: nowrap;
  overflow: hidden;
}

.workTable tr.closed .badge {
  min-height: 17px;
  padding: 1px 5px;
  font-size: 10px;
}

.workTable tr.closed .badge.review-none {
  display: none;
}

.itemCol {
  width: 42%;
}

.signalCol {
  width: 42%;
}

.labelCol {
  width: 16%;
}

.tableItem {
  min-width: 0;
}

.tableItemID {
  font-size: 12px;
  margin-bottom: 3px;
}

.tableItemID a {
  color: var(--blue);
  text-decoration: none;
}

.tableItemTitle {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.workTable .badges {
  max-width: 100%;
}

.itemInspector {
  position: sticky;
  top: 54px;
  max-height: calc(100vh - 62px);
  overflow: auto;
}

.inspectorBox {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 9px;
}

.inspectorHead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.inspectorHead span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.inspectorHead strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.inspectorHead button {
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.inspectorMeta,
.inspectorLabels,
.inspectorActions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.inspectorMeta span,
.inspectorLabels span {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  padding: 2px 5px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspectorActions a,
.inspectorActions button {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  padding: 5px 7px;
  text-decoration: none;
}

.inspectorSection {
  display: grid;
  gap: 5px;
}

.inspectorSection h3 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.inspectorLink {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
}

.inspectorLink span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.inspectorLink strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspectorLink.empty {
  border: 1px dashed var(--line);
  border-radius: 5px;
  color: var(--muted);
  padding: 6px;
  font-size: 11px;
}

.inspectorRaw summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.inspectorRaw pre {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: #0f172a;
  color: #dbeafe;
  padding: 8px;
  font-size: 11px;
}

.inspectorBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 3px;
}

.inspectorDescription {
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.inspectorEditForm {
  display: grid;
  gap: 7px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}

.inspectorEditForm label {
  display: grid;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.inspectorEditForm input,
.inspectorEditForm select,
.inspectorEditForm textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--ink);
  padding: 5px 7px;
  font: inherit;
}

.inspectorEditForm textarea {
  resize: vertical;
  min-height: 52px;
}

.inspectorFormActions {
  display: flex;
  gap: 6px;
}

button.dangerAction {
  border-color: #fca5a5;
  color: var(--red, #dc2626);
  background: #fff5f5;
}

button.dangerAction:hover {
  border-color: var(--red, #dc2626);
  background: #fee2e2;
}

@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .inputPane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  textarea {
    min-height: 280px;
  }

  .editorWrap {
    min-height: 280px;
  }

  .briefGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .suggestionRow {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .suggestionMeta,
  .suggestionActions {
    justify-content: flex-start;
  }

  .edgeRoute {
    grid-template-columns: 1fr;
  }

  .graphPairGroup,
  .graphPairTarget,
  .graphFocusDriver {
    grid-template-columns: 1fr;
  }

  .shell.statefulMode .workPane {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "user"
      "workspace"
      "canvas";
  }

  .shell.statefulMode .workspacePanel {
    position: static;
    max-height: none;
  }

  .workspacePanel,
  .inlineForm,
  .addItemForm {
    grid-template-columns: 1fr;
  }

  .contentGrid {
    grid-template-columns: 1fr;
  }

  .itemInspector {
    position: static;
    max-height: none;
  }

}

@media (max-width: 560px) {
  .topbar,
  .paneHeader,
  .boardHeader {
    align-items: stretch;
    flex-direction: column;
  }

  .actions,
  .viewTabs {
    width: 100%;
  }

  .actions button,
  .actions input,
  .viewTabs button {
    flex: 1 1 auto;
  }

  .stats,
  .briefGrid {
    grid-template-columns: 1fr;
  }
}

/* --- Badge styles (commits A) --- */
.badge.horizon-now { background: #d1fae5; color: #065f46; }
.badge.horizon-next { background: #dbeafe; color: #1e40af; }
.badge.horizon-later { background: #f3f4f6; color: #374151; }
.badge.horizon-quarter { background: #fef3c7; color: #92400e; }
.badge.horizon-year { background: #ede9fe; color: #5b21b6; }
.badge.horizon-someday { background: #f3f4f6; color: #6b7280; }
.badge.priority-critical { background: #fee2e2; color: #991b1b; }
.badge.priority-high { background: #fef3c7; color: #92400e; }
.badge.priority-medium { background: #ede9fe; color: #5b21b6; }
.badge.priority-low { background: #f3f4f6; color: #374151; }

/* --- Commit C: key hints --- */
.keyHints { font-size: 10px; color: var(--muted); padding: 2px 8px; }

/* --- Commit E: bulk import --- */
.bulkImport { margin-top: 8px; }
.bulkImport summary { cursor: pointer; font-size: 12px; color: var(--muted); padding: 4px 0; }
.bulkImport .quickAddForm { margin-top: 6px; }
.bulkImport label { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }

/* --- Commit F: kanban view --- */
.kanbanBoard { display: flex; gap: 12px; padding: 12px; overflow-x: auto; min-height: 200px; }
.kanbanLane { min-width: 200px; max-width: 260px; flex: 0 0 220px; background: var(--surface-alt, #f9f9f9); border-radius: 6px; padding: 8px; }
.kanbanLaneHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.kanbanCount { background: var(--line-soft); border-radius: 10px; padding: 1px 6px; font-size: 10px; }
.kanbanCards { display: flex; flex-direction: column; gap: 6px; }
.kanbanCard { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 4px; padding: 8px; cursor: pointer; }
.kanbanCard:hover { border-color: var(--accent); }
.kanbanCard.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-faint, rgba(0,0,0,.08)); }
.kanbanCardKind { font-size: 9px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.kanbanCardTitle { font-size: 12px; line-height: 1.4; }
.kanbanCardOwner { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* --- Commit H: empty state --- */
.emptyState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}
.emptyState p { font-size: 13px; margin: 0; }

/* --- Commit I: inspector dates --- */
.inspectorDates { font-size: 10px; color: var(--muted); }

/* --- Commit J: archived nodes --- */
.archivedNode { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; font-size: 12px; border-bottom: 1px solid var(--line-soft); }
.archivedNode span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- UX backlog 709: auth gate and onboarding --- */
.authGate h2 { font-size: 18px; margin: 0; }
.authGate .envVars { font-family: monospace; font-size: 12px; background: #f3f4f6; padding: 8px 12px; border-radius: 6px; text-align: left; }
.onboardingChecklist { padding: 12px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }
.onboardingChecklist h3 { margin: 0 0 8px; font-size: 13px; }
.onboardingChecklist ol { margin: 0; padding-left: 18px; }
.checkItem { font-size: 12px; padding: 3px 0; color: var(--muted); }
.checkItem.done { color: var(--green, #16a34a); text-decoration: line-through; }

/* --- UX backlog 709: board filter --- */
#boardFilterInput { width: 100%; box-sizing: border-box; margin-bottom: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 12px; }

/* --- UX backlog 709: source dirty indicator --- */
.sourcePreviewMeta { display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: 12px; }
.sourceDirtyPill { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 600; }

/* --- UX backlog 709: command palette --- */
.commandPalette { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding-top: 80px; }
.commandPalette.hidden { display: none; }
.paletteBackdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); }
.paletteBox { position: relative; z-index: 1; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); width: 480px; max-width: 95vw; overflow: hidden; }
#paletteInput { width: 100%; box-sizing: border-box; border: none; border-bottom: 1px solid var(--line); padding: 14px 16px; font-size: 15px; outline: none; }
.paletteResults { max-height: 320px; overflow-y: auto; }
.paletteItem { padding: 10px 16px; cursor: pointer; display: flex; align-items: baseline; gap: 10px; }
.paletteItem:hover, .paletteItem.selected { background: var(--accent-faint, #e0e7ff); }
.paletteLabel { font-size: 13px; font-weight: 500; }
.paletteHint { font-size: 11px; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- UX backlog 709: graph driver hint --- */
.graphDriverHint { font-size: 11px; color: var(--muted); padding: 2px 6px 4px; }

/* --- UX backlog 709: inspector layout --- */
.inspectorTitle { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.inspectorRef { font-size: 11px; color: var(--muted); font-family: monospace; }
.inspectorMeta2 { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; align-items: center; }
.inspectorRepo { font-size: 11px; color: var(--muted); background: #f3f4f6; padding: 1px 5px; border-radius: 4px; }
.inspectorOwner { font-size: 11px; color: var(--muted); }
.inspectorLinks { display: flex; flex-direction: column; gap: 8px; }
.inspectorLinkGroup { display: flex; flex-direction: column; gap: 3px; }
.linkGroupLabel { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.inspectorPrimaryActions { display: flex; gap: 6px; }
.inspectorDangerActions { display: flex; gap: 6px; margin-top: 4px; }

/* --- UX backlog 709: sync indicator --- */
.syncIndicator { font-size: 11px; padding: 0 4px; }
.syncIdle { color: var(--muted); }
.syncSyncing { color: #f59e0b; animation: blink 0.8s infinite; }
.syncDone { color: var(--green, #16a34a); }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.boardSyncError { display: block; font-size: 11px; color: var(--red); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- UX backlog 709: visual link creation --- */
.linkTarget { outline: 2px dashed var(--accent, #6366f1); cursor: crosshair; }
.linkModeIndicator { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--accent, #6366f1); color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 13px; z-index: 100; display: none; }
.linkModeActive .linkModeIndicator { display: block; }

/* --- cockpit-next-711: patch modal --- */
.patchModal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; }
.patchModal.hidden { display: none; }
.patchBackdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.4); }
.patchBox { position: relative; z-index: 1; background: #fff; border-radius: 12px; padding: 24px; max-width: 480px; width: 95vw; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.patchBox h3 { margin: 0 0 16px; font-size: 16px; }
.patchSummary { display: grid; gap: 8px; margin-bottom: 16px; }
.patchSection { padding: 8px 12px; border-radius: 6px; background: #f3f4f6; font-size: 13px; }
.patchSection.danger { background: #fee2e2; color: #991b1b; }
.patchDetails { font-size: 12px; max-height: 200px; overflow-y: auto; margin-bottom: 16px; }
.patchActions { display: flex; gap: 8px; }

/* --- cockpit-next-711: cluster driver --- */
.graphClusters { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.clusterGroup { border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.clusterGroupLabel { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.clusterGroupCards { display: flex; flex-wrap: wrap; gap: 4px; }
.graphCanvas.compact .nodeCard { padding: 4px 8px; }
.graphCanvas.compact .nodeSignals { display: none; }
.graphCanvas.compact .nodeTitle { font-size: 11px; }

/* --- cockpit-next-711: saved views --- */
.savedViews { margin-top: 16px; }
.savedViewItem { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line-soft, var(--line)); }
.savedViewDesc { display: block; font-size: 11px; color: var(--muted); }
.savedViewActions { display: flex; gap: 4px; }

/* --- activity progress footer --- */
.activityFooter {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: #1e293b;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 34px;
  font-size: 12px;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.activityFooter.hidden {
  display: none;
}

.activityProgress {
  width: 100px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.activityBar {
  height: 100%;
  background: #6366f1;
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.activityBar:not(.done):not(.failed) {
  animation: activityIndeterminate 1.6s ease-in-out infinite;
  animation-play-state: paused;
}

@keyframes activityIndeterminate {
  0%   { transform: translateX(-100%); width: 60%; }
  50%  { transform: translateX(80%); width: 60%; }
  100% { transform: translateX(-100%); width: 60%; }
}

.activityBar.done { background: #22c55e; }
.activityBar.failed { background: #ef4444; }

.activityText {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.activityLabel { font-weight: 600; color: #f1f5f9; flex-shrink: 0; }
.activityDetail { color: #94a3b8; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.activityCounts { color: #6366f1; font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.activityExtra { color: #64748b; flex-shrink: 0; }

.activityDismiss {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  flex-shrink: 0;
}
.activityDismiss:hover { color: #e2e8f0; }
