/* BW-27 semantic theme contract. */
:root, html[data-theme="light"] {
  --fk-color-app-bg:#f4f5fb;--fk-color-canvas-bg:#f8f9fd;--fk-color-surface-elevated:#fff;--fk-color-surface-secondary:#f5f6fb;--fk-color-surface-panel:#fff;--fk-color-surface-card:#fff;--fk-color-surface-input:#fff;--fk-color-surface-hover:#f0efff;--fk-color-surface-selected:#ebe8ff;--fk-color-overlay-backdrop:rgba(24,27,48,.56);
  --fk-color-primary-action:#6847f5;--fk-color-primary-hover:#5735df;--fk-color-primary-active:#4527bd;--fk-color-primary-subtle:#eeeaff;--fk-color-focus-ring:#765cff;--fk-color-selection:rgba(104,71,245,.24);
  --fk-color-text-primary:#20243d;--fk-color-text-secondary:#4e5675;--fk-color-text-muted:#717895;--fk-color-text-inverse:#fff;--fk-color-text-link:#5735df;--fk-color-text-disabled:#9ca2b7;
  --fk-color-border-default:#dfe2ee;--fk-color-border-strong:#c5cada;--fk-color-divider:#e7e9f2;--fk-color-border-control:#cbd0df;--fk-shadow-card:0 2px 8px rgba(29,33,61,.07);--fk-shadow-panel:0 10px 30px rgba(29,33,61,.11);--fk-shadow-modal:0 24px 64px rgba(20,23,44,.22);
  --fk-color-success:#157a55;--fk-color-success-subtle:#e5f7ef;--fk-color-warning:#8a5b00;--fk-color-warning-subtle:#fff4d6;--fk-color-danger:#b4233a;--fk-color-danger-subtle:#ffeaed;--fk-color-information:#245cc7;--fk-color-information-subtle:#e8f0ff;
  --fk-color-canvas-grid:rgba(80,88,130,.09);--fk-color-canvas-edge:#a6acc1;--fk-color-canvas-edge-hover:#6847f5;--fk-color-node-surface:#fff;--fk-color-node-border:#d7dbea;--fk-color-node-selection:#6847f5;
  --fk-color-role-idea-surface:#eeeaff;--fk-color-role-idea-accent:#6847f5;--fk-color-role-variation-surface:#e8f1ff;--fk-color-role-variation-accent:#2f70d9;--fk-color-role-content-surface:#e4f6ef;--fk-color-role-content-accent:#168263;--fk-color-role-social-surface:#fff0e9;--fk-color-role-social-accent:#d95b34;--fk-color-role-landing-surface:#f6eafd;--fk-color-role-landing-accent:#9142c3;--fk-color-role-email-surface:#fff4d9;--fk-color-role-email-accent:#aa710d;
  --fk-color-comment-surface:#fff5ba;--fk-color-ai-review-surface:#f3f0ff;--fk-color-scrollbar-track:transparent;--fk-color-scrollbar-thumb:#c5cada;--fk-color-scrollbar-hover:#a8aec2;--fk-color-skeleton:#e7e9f2;--fk-color-surface-disabled:#eceef4;
  --fk-border-width-thin:1px;--fk-border-width-strong:2px;--fk-control-height-sm:32px;--fk-control-height-md:40px;--fk-control-height-lg:44px;--fk-z-menu:999;--fk-z-modal:12000;--fk-z-overlay:20000;--fk-duration-fast:120ms;--fk-duration-normal:180ms;--fk-duration-slow:280ms;--fk-line-height-tight:1.2;--fk-line-height-body:1.5;
}
html[data-theme="dark"] {
  color-scheme:dark;--fk-color-app-bg:#0b1020;--fk-color-page-bg:#0d1324;--fk-color-nav-bg:#0f1528;--fk-color-canvas-bg:#0c1222;--fk-color-surface-panel:#121a2e;--fk-color-surface-card:#161f35;--fk-color-surface-elevated:#1b2540;--fk-color-surface-secondary:#141d32;--fk-color-surface-input:#11192d;--fk-color-surface-hover:#202b48;--fk-color-surface-selected:rgba(124,92,255,.14);--fk-color-overlay-backdrop:rgba(4,7,16,.78);
  --fk-color-primary-action:#7c5cff;--fk-color-primary-hover:#8b72ff;--fk-color-primary-active:#6e4fea;--fk-color-primary-subtle:rgba(124,92,255,.14);--fk-color-primary-border:rgba(139,114,255,.42);--fk-color-primary-glow:rgba(124,92,255,.18);--fk-color-focus-ring:#9d88ff;--fk-focus-shadow:0 0 0 3px rgba(124,92,255,.28);--fk-color-selection:rgba(124,92,255,.14);
  --fk-color-text-primary:#f4f6fc;--fk-color-text-secondary:#bac3d8;--fk-color-text-muted:#8894ae;--fk-color-text-subtle:#69758e;--fk-color-text-inverse:#111528;--fk-color-button-primary-text:#070a12;--fk-color-text-link:#aa98ff;--fk-color-text-disabled:#69758e;
  --fk-color-border-default:rgba(148,163,184,.16);--fk-color-border-strong:rgba(148,163,184,.28);--fk-color-divider:rgba(148,163,184,.12);--fk-color-border-control:rgba(148,163,184,.28);--fk-shadow-card:0 10px 30px rgba(0,0,0,.18);--fk-shadow-panel:0 18px 50px rgba(0,0,0,.28);--fk-shadow-modal:0 24px 64px rgba(0,0,0,.38);
  --fk-color-success:#4fd1a1;--fk-color-success-subtle:rgba(79,209,161,.12);--fk-color-warning:#e8bd63;--fk-color-warning-subtle:rgba(232,189,99,.12);--fk-color-danger:#f27d8a;--fk-color-danger-subtle:#382129;--fk-color-information:#69a7ff;--fk-color-information-subtle:rgba(105,167,255,.12);
  --fk-color-canvas-grid:rgba(136,148,174,.055);--fk-color-canvas-edge:#46516a;--fk-color-canvas-edge-hover:#7c5cff;--fk-color-node-surface:#161f35;--fk-color-node-border:rgba(148,163,184,.16);--fk-color-node-selection:#8b72ff;--fk-color-role-idea-surface:rgba(124,92,255,.09);--fk-color-role-idea-accent:#9d88ff;--fk-color-role-variation-surface:rgba(105,167,255,.09);--fk-color-role-variation-accent:#78afff;--fk-color-role-content-surface:rgba(79,209,161,.08);--fk-color-role-content-accent:#62d7af;--fk-color-role-social-surface:rgba(242,125,138,.08);--fk-color-role-social-accent:#f3949f;--fk-color-role-landing-surface:rgba(183,119,255,.09);--fk-color-role-landing-accent:#c497ff;--fk-color-role-email-surface:rgba(232,189,99,.09);--fk-color-role-email-accent:#e8bd63;--fk-color-role-visual-surface:rgba(74,203,224,.09);--fk-color-role-visual-accent:#63cee0;
  --fk-color-comment-surface:#c7a955;--fk-color-ai-review-surface:#1b2540;--fk-color-scrollbar-track:#0f1528;--fk-color-scrollbar-thumb:#3a4662;--fk-color-scrollbar-hover:#52607d;--fk-color-skeleton:#202b48;--fk-color-surface-disabled:#171f33;
}
:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #22253a;
  --muted: #6f748f;
  --primary: #6950ef;
  --primary-soft: #ece8ff;
  --border: #dfe3f2;
  --danger: #d24a4a;
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 74px;

  /* Funklix Design Foundation Tokens */
  --fk-color-bg: #f6f7fb;
  --fk-color-surface: #ffffff;
  --fk-color-surface-muted: #fbfcff;
  --fk-color-text: #22253a;
  --fk-color-heading: #232b4d;
  --fk-color-muted: #697292;
  --fk-color-border: #dfe3f2;
  --fk-color-primary: #5368ff;
  --fk-color-primary-2: #7d5cff;
  --fk-color-primary-hover: #4258e8;
  --fk-color-primary-soft: #f0f3ff;
  --fk-color-success: #2bb979;
  --fk-color-success-soft: #f0fbf5;
  --fk-color-warning: #eab308;
  --fk-color-warning-soft: #fff8df;
  --fk-color-danger: #d24a4a;
  --fk-color-danger-soft: #fff2f2;

  --fk-radius-sm: 8px;
  --fk-radius-md: 10px;
  --fk-radius-lg: 16px;
  --fk-radius-xl: 22px;
  --fk-radius-pill: 999px;

  --fk-shadow-sm: 0 4px 10px rgba(46, 55, 93, 0.06);
  --fk-shadow-md: 0 8px 20px rgba(76, 90, 160, 0.06);
  --fk-shadow-lg: 0 24px 70px rgba(28, 37, 75, 0.28);

  --fk-space-1: 4px;
  --fk-space-2: 8px;
  --fk-space-3: 12px;
  --fk-space-4: 16px;
  --fk-space-5: 20px;
  --fk-space-6: 24px;
  --fk-space-8: 32px;

  --fk-font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --fk-font-size-xs: 0.72rem;
  --fk-font-size-sm: 0.82rem;
  --fk-font-size-md: 0.92rem;
  --fk-font-size-lg: 1.18rem;
  --fk-font-weight-medium: 700;
  --fk-font-weight-bold: 900;
}

/* Funklix Design Component Foundation */
.fk-btn,
.fk-input,
.fk-select,
.fk-textarea {
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-md);
  color: var(--fk-color-text);
  font: inherit;
}

.fk-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fk-space-2);
  min-height: calc(var(--fk-space-5) * 2);
  padding: var(--fk-space-2) var(--fk-space-4);
  background: var(--fk-color-surface);
  box-shadow: var(--fk-shadow-sm);
  cursor: pointer;
  font-size: var(--fk-font-size-sm);
  font-weight: var(--fk-font-weight-bold);
  line-height: 1.2;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

/* Social Connections owns visibility through the HTML hidden contract.  This
   author rule must outrank component display rules such as .fk-btn. */
#social-connections-settings [hidden] {
  display: none !important;
}

.fk-btn:hover {
  background: var(--fk-color-surface-muted);
  box-shadow: var(--fk-shadow-md);
  transform: translateY(-1px);
}

.fk-btn:active {
  box-shadow: var(--fk-shadow-sm);
  transform: translateY(0);
}

.fk-btn:focus-visible,
.fk-input:focus-visible,
.fk-select:focus-visible,
.fk-textarea:focus-visible {
  outline: var(--fk-space-1) solid var(--fk-color-primary-soft);
  outline-offset: var(--fk-space-1);
  border-color: var(--fk-color-primary);
}

.fk-btn:disabled,
.fk-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.fk-btn-primary {
  border-color: var(--fk-color-primary);
  background: var(--fk-color-primary);
  color: var(--fk-color-surface);
}

.fk-btn-primary:hover {
  border-color: var(--fk-color-primary-hover);
  background: var(--fk-color-primary-hover);
  color: var(--fk-color-surface);
}

.fk-btn-secondary {
  border-color: var(--fk-color-border);
  background: var(--fk-color-surface);
  color: var(--fk-color-heading);
}

.fk-btn-secondary:hover {
  border-color: var(--fk-color-primary);
  background: var(--fk-color-primary-soft);
  color: var(--fk-color-primary);
}

.fk-btn-ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--fk-color-muted);
}

.fk-btn-ghost:hover {
  border-color: var(--fk-color-border);
  background: var(--fk-color-surface-muted);
  box-shadow: none;
  color: var(--fk-color-heading);
}

.fk-card,
.fk-section {
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  background: var(--fk-color-surface);
  box-shadow: var(--fk-shadow-sm);
}

.fk-card {
  display: grid;
  gap: var(--fk-space-3);
  padding: var(--fk-space-4);
}

.fk-card-header {
  display: grid;
  gap: var(--fk-space-1);
}

.fk-card-body {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-sm);
  line-height: 1.5;
}

.fk-input,
.fk-select,
.fk-textarea {
  width: 100%;
  background: var(--fk-color-surface);
  font-size: var(--fk-font-size-sm);
  line-height: 1.4;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.fk-input,
.fk-select {
  min-height: calc(var(--fk-space-5) * 2);
  padding: var(--fk-space-2) var(--fk-space-3);
}

.fk-textarea {
  min-height: calc(var(--fk-space-6) * 4);
  padding: var(--fk-space-3);
  resize: vertical;
}

.fk-input:disabled,
.fk-select:disabled,
.fk-textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.fk-badge,
.fk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fk-space-1);
  width: fit-content;
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-pill);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-bold);
  line-height: 1;
}

.fk-badge {
  padding: var(--fk-space-1) var(--fk-space-2);
}

.fk-badge-success {
  border-color: var(--fk-color-success);
  background: var(--fk-color-success-soft);
  color: var(--fk-color-success);
}

.fk-badge-warning {
  border-color: var(--fk-color-warning);
  background: var(--fk-color-warning-soft);
  color: var(--fk-color-warning);
}

.fk-badge-danger {
  border-color: var(--fk-color-danger);
  background: var(--fk-color-danger-soft);
  color: var(--fk-color-danger);
}

.fk-pill {
  padding: var(--fk-space-2) var(--fk-space-3);
}

.fk-section {
  display: grid;
  gap: var(--fk-space-4);
  padding: var(--fk-space-5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  height: 100vh;
  overflow: hidden;
  max-width: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

/* BW-30.1: this is the only state allowed to reserve Inspector width. */
@media (min-width: 1024px) {
  .app-shell[data-active-view="board"][data-inspector-supported="true"][data-inspector-open="true"][data-inspector-mode="column"] {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) clamp(320px, 24vw, 340px);
  }
  .app-shell.sidebar-collapsed[data-active-view="board"][data-inspector-supported="true"][data-inspector-open="true"][data-inspector-mode="column"] {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr) clamp(320px, 24vw, 340px);
  }
}

.sidebar,
.inspector {
  background: var(--panel);
  padding: 18px;
}


.sidebar {
  overflow-y: auto;
  overflow-x: hidden;
  justify-self: stretch;
  border-right: 1px solid var(--fk-color-border);
  background: linear-gradient(180deg, var(--fk-color-surface) 0%, var(--fk-color-surface-muted) 100%);
  transition: padding 180ms ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fk-space-3);
  margin-bottom: var(--fk-space-5);
}

.sidebar-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: var(--fk-radius-md);
  color: var(--fk-color-muted);
  box-shadow: none;
}

.inspector {
  border-left: 1px solid var(--border);
  width: 340px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.inspector-close { display: none; margin: 0 0 8px auto; min-width: 44px; min-height: 44px; font-size: 1.35rem; }

.app-shell:not([data-inspector-open="true"]) .inspector { display: none; border: 0; padding: 0; width: 0; }

.inspector-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  overscroll-behavior: contain;
}


.inspector-content::-webkit-scrollbar {
  width: 8px;
}

.inspector-content::-webkit-scrollbar-thumb {
  background: #c8cde0;
  border-radius: 999px;
}

.node-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  min-height: unset;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: var(--fk-radius-lg);
  display: grid;
  place-items: center;
  color: var(--fk-color-surface);
  background: linear-gradient(150deg, var(--fk-color-primary-2), var(--fk-color-primary));
  box-shadow: var(--fk-shadow-md);
  font-size: var(--fk-font-size-sm);
  font-weight: var(--fk-font-weight-bold);
  letter-spacing: 0.04em;
  margin-bottom: 0;
}

.brand-switcher-shell {
  margin-bottom: var(--fk-space-3);
  padding: 0;
  gap: 6px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.brand-switcher-eyebrow {
  color: var(--fk-color-muted);
  font-size: 0.62rem;
  font-weight: var(--fk-font-weight-bold);
  letter-spacing: 0.08em;
  padding: 0 var(--fk-space-2);
  text-transform: uppercase;
}

.brand-switcher-details {
  position: relative;
}

.brand-switcher-summary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--fk-space-2);
  min-height: 38px;
  padding: 5px var(--fk-space-2);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: var(--fk-color-heading);
  cursor: pointer;
  list-style: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.brand-switcher-summary::-webkit-details-marker {
  display: none;
}

.brand-switcher-summary:hover,
.brand-switcher-summary:focus-visible {
  border-color: var(--fk-color-primary);
  background: var(--fk-color-surface);
  box-shadow: var(--fk-shadow-sm);
  outline: none;
}

.brand-switcher-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--fk-radius-sm);
  background: var(--fk-color-primary-soft);
  color: var(--fk-color-primary);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-bold);
}

.brand-switcher-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-switcher-copy strong {
  overflow: hidden;
  color: var(--fk-color-heading);
  font-size: var(--fk-font-size-xs);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-switcher-copy small,
.brand-switcher-menu span {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  line-height: 1.3;
}

.brand-switcher-chevron {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  transition: transform 160ms ease;
}

.brand-switcher-details[open] .brand-switcher-chevron {
  transform: rotate(180deg);
}

.brand-switcher-menu {
  display: grid;
  gap: var(--fk-space-2);
  position: absolute;
  z-index: 30;
  top: calc(100% + var(--fk-space-2));
  left: 0;
  right: 0;
  padding: var(--fk-space-3);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-md);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--fk-shadow-md);
}

.brand-switcher-menu strong {
  color: var(--fk-color-heading);
  font-size: var(--fk-font-size-sm);
}

.brand-switcher-no-brand,
.brand-switcher-catalog {
  display: grid;
  gap: 3px;
}

.brand-switcher-no-brand {
  width: 100%;
  border: 0;
  padding-bottom: var(--fk-space-2);
  border-bottom: 1px solid var(--fk-color-border);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.brand-switcher-catalog {
  max-height: 220px;
  overflow-y: auto;
}

.brand-switcher-catalog-entry {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: var(--fk-space-2);
  width: 100%;
  padding: 6px;
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-sm);
  background: var(--fk-color-surface);
  color: var(--fk-color-heading);
  font: inherit;
  text-align: left;
  opacity: 1;
  cursor: pointer;
}

.brand-switcher-no-brand:hover,
.brand-switcher-no-brand:focus-visible,
.brand-switcher-catalog-entry:hover,
.brand-switcher-catalog-entry:focus-visible,
.brand-switcher-catalog-entry[aria-current="true"] {
  border-color: var(--fk-color-primary);
  background: var(--fk-color-primary-soft);
  outline: none;
}

.brand-switcher-catalog-entry strong,
.brand-switcher-catalog-entry small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-switcher-catalog-entry small {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
}

.brand-switcher-menu .fk-btn {
  width: 100%;
  min-height: 34px;
  box-shadow: none;
}

.brand-switcher-create-form {
  display: grid;
  gap: var(--fk-space-2);
  padding-top: var(--fk-space-2);
  border-top: 1px solid var(--fk-color-border);
}

.brand-switcher-create-form.hidden { display: none; }

.brand-switcher-create-form label {
  color: var(--fk-color-heading);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-bold);
}

.brand-switcher-create-form input {
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-sm);
  font: inherit;
}

.brand-switcher-create-form input:focus-visible {
  border-color: var(--fk-color-primary);
  outline: 2px solid var(--fk-color-primary-soft);
}

.brand-switcher-create-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--fk-space-2);
}

.brand-workspace-detail {
  width: min(520px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 32px));
  padding: var(--fk-space-5);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  background: var(--fk-color-surface);
  color: var(--fk-color-text);
  box-shadow: var(--fk-shadow-lg);
}

.brand-workspace-detail::backdrop { background: rgba(25, 31, 52, 0.44); }
.brand-workspace-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--fk-space-4); }
.brand-workspace-detail-header h2 { margin: 4px 0 0; color: var(--fk-color-heading); font-size: var(--fk-font-size-xl); }
.brand-workspace-detail > p { color: var(--fk-color-muted); font-size: var(--fk-font-size-sm); line-height: 1.5; }
.brand-workspace-detail-status { min-height: 24px; color: var(--fk-color-muted); font-size: var(--fk-font-size-sm); }
.brand-workspace-detail-content { display: grid; gap: var(--fk-space-4); overflow-y: auto; }
.brand-workspace-detail-content.hidden,
.brand-workspace-detail-retry.hidden { display: none; }
.brand-workspace-edit.hidden,
.brand-workspace-edit-open.hidden,
.brand-workspace-conflict-reload.hidden { display: none; }
.brand-workspace-edit { display: grid; gap: var(--fk-space-2); overflow-y: auto; }
.brand-workspace-edit label { color: var(--fk-color-heading); font-size: var(--fk-font-size-sm); font-weight: var(--fk-font-weight-bold); }
.brand-workspace-edit input,
.brand-workspace-edit textarea { width: 100%; box-sizing: border-box; padding: 9px; border: 1px solid var(--fk-color-border); border-radius: var(--fk-radius-sm); background: var(--fk-color-surface); color: var(--fk-color-text); }
.brand-workspace-edit textarea { resize: vertical; font-family: monospace; }
.brand-workspace-edit small { color: var(--fk-color-muted); line-height: 1.4; }
.brand-workspace-edit-actions,
.brand-workspace-detail-actions { display: flex; flex-wrap: wrap; gap: var(--fk-space-2); }
.brand-workspace-detail-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--fk-space-2) var(--fk-space-3); margin: 0; }
.brand-workspace-detail-meta dt { color: var(--fk-color-muted); font-size: var(--fk-font-size-xs); font-weight: var(--fk-font-weight-bold); }
.brand-workspace-detail-meta dd { margin: 0; color: var(--fk-color-heading); font-size: var(--fk-font-size-sm); overflow-wrap: anywhere; }
.brand-workspace-core { display: grid; gap: var(--fk-space-2); padding-top: var(--fk-space-3); border-top: 1px solid var(--fk-color-border); }
.brand-workspace-core h3 { margin: 0; color: var(--fk-color-heading); font-size: var(--fk-font-size-md); }
.brand-team-list { display: grid; gap: var(--fk-space-2); }
.brand-team-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fk-space-2); padding: var(--fk-space-2); border-radius: var(--fk-radius-sm); background: var(--fk-color-background); }
.brand-team-email { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; color: var(--fk-color-heading); font-size: var(--fk-font-size-sm); font-weight: var(--fk-font-weight-bold); }
.brand-team-row label { display: flex; align-items: center; gap: var(--fk-space-1); }
.brand-team-row-status { flex: 1 0 100%; min-height: 1.2em; color: var(--fk-color-muted); font-size: var(--fk-font-size-xs); }
.brand-team-add { display: flex; flex-wrap: wrap; align-items: end; gap: var(--fk-space-2); }
.brand-team-add label { display: grid; gap: var(--fk-space-1); min-width: min(100%, 180px); color: var(--fk-color-muted); font-size: var(--fk-font-size-xs); }
.brand-workspace-core-list { display: grid; gap: var(--fk-space-2); margin: 0; }
.brand-workspace-core-item { padding: var(--fk-space-2); border-radius: var(--fk-radius-sm); background: var(--fk-color-background); }
.brand-workspace-core-item dt { color: var(--fk-color-heading); font-size: var(--fk-font-size-xs); font-weight: var(--fk-font-weight-bold); }
.brand-workspace-core-item dd { margin: 3px 0 0; color: var(--fk-color-text); font-size: var(--fk-font-size-sm); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }

.board-brand-association {
  display: grid;
  gap: var(--fk-space-2);
  margin-bottom: var(--fk-space-3);
  padding: var(--fk-space-2);
}
.board-brand-association > strong { font-size: var(--fk-font-size-xs); color: var(--fk-color-heading); }
.board-brand-association > small,
.board-brand-association-form > span { font-size: var(--fk-font-size-xs); color: var(--fk-color-muted); }
.board-brand-association-form { display: grid; gap: var(--fk-space-2); border-top: 1px solid var(--fk-color-border); padding-top: var(--fk-space-2); }
.board-brand-association-form.hidden { display: none; }
.board-brand-association-form label { font-size: var(--fk-font-size-xs); font-weight: var(--fk-font-weight-bold); }
.board-brand-association-form select { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--fk-color-border); border-radius: var(--fk-radius-sm); background: var(--fk-color-surface); }
.brand-core-comparison-note { color: var(--fk-color-muted); font-size: var(--fk-font-size-sm); }
.brand-core-comparison-note.hidden { display: none; }
.brand-core-comparison-summary { margin: 0; color: var(--fk-color-heading); }
.brand-core-comparison-group { display: grid; gap: var(--fk-space-2); }
.brand-core-comparison-group h3 { margin: 0; font-size: var(--fk-font-size-md); }
.brand-core-comparison-list { display: grid; gap: var(--fk-space-2); margin: 0; padding: 0; list-style: none; }
.brand-core-comparison-item { padding: var(--fk-space-2); border-radius: var(--fk-radius-sm); background: var(--fk-color-background); overflow-wrap: anywhere; }
.brand-core-comparison-item code { font-weight: var(--fk-font-weight-bold); }
.brand-core-comparison-value { margin-top: 4px; white-space: pre-wrap; }
.brand-core-comparison-value details > pre { max-height: 18rem; overflow: auto; white-space: pre-wrap; }
.brand-core-initialization { display: grid; gap: var(--fk-space-3); padding-top: var(--fk-space-3); border-top: 1px solid var(--fk-color-border); }
.brand-core-initialization.hidden, .brand-core-initialization-confirm.hidden { display: none; }
.brand-core-initialization-confirm { display: grid; gap: var(--fk-space-2); padding: var(--fk-space-3); border-radius: var(--fk-radius-sm); background: var(--fk-color-background); }
.brand-core-initialization-confirm h3, .brand-core-initialization-confirm p { margin: 0; }

.sidebar nav {
  display: grid;
  gap: 4px;
}

.sidebar-nav-heading {
  color: var(--fk-color-muted);
  font-size: 0.62rem;
  font-weight: var(--fk-font-weight-bold);
  letter-spacing: 0.08em;
  margin-top: var(--fk-space-2);
  padding: 0 var(--fk-space-3);
  text-transform: uppercase;
}

.nav-item-child {
  padding-left: calc(var(--fk-space-3) + var(--fk-space-3));
}

.nav-item {
  width: 100%;
  justify-content: flex-start;
  min-height: 42px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  text-align: left;
  padding: var(--fk-space-2) var(--fk-space-3);
  border-radius: var(--fk-radius-lg);
  margin-bottom: 0;
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-sm);
  font-weight: var(--fk-font-weight-medium);
  letter-spacing: -0.01em;
}

.app-shell.sidebar-collapsed .sidebar {
  padding: 14px 10px;
}

.app-shell.sidebar-collapsed .sidebar-header {
  flex-direction: column;
  justify-content: center;
  gap: var(--fk-space-2);
  margin-bottom: var(--fk-space-4);
}

.app-shell.sidebar-collapsed .logo {
  width: 38px;
  height: 38px;
  border-radius: var(--fk-radius-md);
  font-size: var(--fk-font-size-xs);
}

.app-shell.sidebar-collapsed .brand-switcher-shell {
  margin-bottom: var(--fk-space-3);
  padding: 0;
}

.app-shell.sidebar-collapsed .board-brand-association { display: none; }

.app-shell.sidebar-collapsed .brand-switcher-eyebrow,
.app-shell.sidebar-collapsed .brand-switcher-copy,
.app-shell.sidebar-collapsed .brand-switcher-chevron,
.app-shell.sidebar-collapsed .brand-switcher-menu {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-nav-heading {
  display: none;
}

.app-shell.sidebar-collapsed .brand-switcher-summary {
  display: flex;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.app-shell.sidebar-collapsed .brand-switcher-avatar {
  width: 34px;
  height: 34px;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--fk-space-3);
}

.nav-item::before {
  content: attr(data-icon);
  display: inline-grid;
  place-items: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  border-radius: var(--fk-radius-sm);
  background: rgba(83, 104, 255, 0.08);
  font-size: 0.95rem;
  line-height: 1;
}

.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: var(--fk-space-2);
}

.app-shell.sidebar-collapsed .nav-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  max-width: none;
}
.activity-panel {
  margin-top: var(--fk-space-4);
  padding: var(--fk-space-3);
  border-color: var(--fk-color-border);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.sidebar-settings {
  margin-top: auto;
  padding-top: var(--fk-space-3);
}

.settings-nav-item { color: var(--fk-color-heading); }

.settings-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  overflow: auto;
  padding: var(--fk-space-5);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-xl);
  background: var(--fk-color-surface);
  box-shadow: var(--fk-shadow-lg);
  color: var(--fk-color-text);
}

.settings-dialog::backdrop { background: rgba(20, 26, 52, 0.48); }
.settings-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--fk-space-4); }
.settings-dialog-header h2, .settings-dialog-header p, .settings-category h3 { margin: 0; }
.settings-dialog-header p { margin-top: var(--fk-space-1); color: var(--fk-color-muted); }
.settings-category { display: grid; gap: var(--fk-space-4); margin-top: var(--fk-space-5); }
.settings-category h3 { padding-bottom: var(--fk-space-2); border-bottom: 1px solid var(--fk-color-border); }
.settings-field { display: grid; gap: var(--fk-space-2); padding: var(--fk-space-3); border: 1px solid var(--fk-color-border); border-radius: var(--fk-radius-lg); background: var(--fk-color-surface-muted); }
.settings-field label { color: var(--fk-color-heading); font-weight: var(--fk-font-weight-bold); }
.settings-field select { width: 100%; padding: 10px 12px; border: 1px solid var(--fk-color-border); border-radius: var(--fk-radius-md); background: var(--fk-color-surface); color: inherit; }
.settings-field small { color: var(--fk-color-muted); line-height: 1.45; }
.settings-status { min-height: 1.25em; margin: 0; color: var(--fk-color-primary); font-size: var(--fk-font-size-sm); }
.social-connections > p, .social-connections > small { margin: 0; color: var(--fk-color-muted); line-height: 1.45; }
.social-connection-list { display: grid; gap: var(--fk-space-2); }
.social-connection-row { display: grid; grid-template-columns: minmax(90px,1fr) minmax(100px,auto) minmax(120px,auto); align-items:center; gap:var(--fk-space-3); padding:var(--fk-space-3); border:1px solid var(--fk-color-border); border-radius:var(--fk-radius-lg); background:var(--fk-color-surface-muted); }
.social-connection-row > span { color:var(--fk-color-muted); font-size:var(--fk-font-size-sm); }
.social-connection-row button:disabled { cursor:not-allowed; opacity:.7; }
@media (max-width: 560px) { .social-connection-row { grid-template-columns:1fr auto; } .social-connection-row button { grid-column:1 / -1; width:100%; } }

.activity-toggle {
  width: 100%;
  min-height: 34px;
  justify-content: space-between;
  padding: var(--fk-space-2) var(--fk-space-3);
  border-color: transparent;
  border-radius: var(--fk-radius-md);
  background: transparent;
  box-shadow: none;
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-bold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.activity-toggle:hover,
.activity-toggle:focus-visible {
  border-color: rgba(83, 104, 255, 0.14);
  background: var(--fk-color-primary-soft);
  color: var(--fk-color-primary);
  box-shadow: none;
  transform: none;
}

.activity-count {
  min-width: 18px;
  min-height: 18px;
  padding: var(--fk-space-1) var(--fk-space-2);
  border-color: rgba(83, 104, 255, 0.18);
  background: var(--fk-color-primary-soft);
  color: var(--fk-color-primary);
  font-size: 0.64rem;
  white-space: nowrap;
}

.activity-count:empty {
  display: none;
}

.activity-panel.has-unread .activity-toggle,
.activity-toggle.has-unread {
  color: var(--fk-color-primary);
}

.activity-panel.has-unread .activity-toggle::before,
.activity-toggle.has-unread::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--fk-radius-pill);
  background: var(--fk-color-warning);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.16);
  margin-right: var(--fk-space-2);
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: var(--fk-space-2);
  margin-top: var(--fk-space-2);
}

.activity-panel.is-collapsed .activity-feed,
.app-shell.sidebar-collapsed .activity-panel {
  display: none;
}

.activity-empty {
  margin: var(--fk-space-1) 0 0;
  border: 1px dashed var(--fk-color-border);
  border-radius: var(--fk-radius-md);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  line-height: 1.4;
  padding: var(--fk-space-3);
}

.activity-entry {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: var(--fk-space-2);
  align-items: start;
  padding: var(--fk-space-2);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-md);
  background: var(--fk-color-surface);
  box-shadow: var(--fk-shadow-sm);
}

.activity-entry.is-clickable {
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.activity-entry.is-clickable:hover,
.activity-entry.is-clickable:focus-visible {
  border-color: rgba(83, 104, 255, 0.18);
  background: var(--fk-color-primary-soft);
  box-shadow: var(--fk-shadow-md);
  transform: translateY(-1px);
  outline: none;
}

.activity-entry.is-clickable:hover .activity-body p {
  color: var(--fk-color-primary);
}

.activity-entry.is-new {
  border-color: rgba(234, 179, 8, 0.28);
  background: var(--fk-color-warning-soft);
  box-shadow: inset 3px 0 0 var(--fk-color-warning), var(--fk-shadow-sm);
}

.activity-new-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: var(--fk-space-1);
  border: 1px solid rgba(234, 179, 8, 0.28);
  border-radius: var(--fk-radius-pill);
  background: var(--fk-color-warning-soft);
  color: #84620d;
  font-size: 0.58rem;
  font-weight: var(--fk-font-weight-bold);
  line-height: 1;
  padding: 3px 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.activity-avatar {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(83, 104, 255, 0.12);
  border-radius: var(--fk-radius-pill);
  background: var(--fk-color-primary-soft);
  color: var(--fk-color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.64rem;
  font-weight: var(--fk-font-weight-bold);
}

.activity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-body {
  min-width: 0;
}

.activity-body p {
  margin: 0;
  color: var(--fk-color-text);
  font-size: var(--fk-font-size-xs);
  line-height: 1.35;
}

.activity-body strong {
  color: var(--fk-color-heading);
  font-weight: var(--fk-font-weight-bold);
}

.activity-body time {
  display: block;
  margin-top: 2px;
  color: var(--fk-color-muted);
  font-size: 0.65rem;
}

.nav-item:hover:not(.active) {
  border-color: rgba(83, 104, 255, 0.12);
  background: var(--fk-color-primary-soft);
  color: var(--fk-color-heading);
  box-shadow: none;
  transform: none;
}

.nav-item.active {
  border-color: rgba(83, 104, 255, 0.22);
  background: linear-gradient(135deg, var(--fk-color-primary-soft) 0%, var(--fk-color-surface) 100%);
  box-shadow: inset 3px 0 0 var(--fk-color-primary), var(--fk-shadow-sm);
  color: var(--fk-color-primary);
  transform: none;
}

.nav-item.active::before {
  background: var(--fk-color-primary);
}

.nav-item.active:focus-visible,
.nav-item:focus-visible,
.sidebar-toggle:focus-visible {
  outline: var(--fk-space-1) solid rgba(83, 104, 255, 0.22);
  outline-offset: var(--fk-space-1);
  border-color: var(--fk-color-primary);
}

.nav-item.active::before {
  color: var(--fk-color-surface);
}

.sidebar .fk-btn:hover {
  transform: none;
}

.sidebar-toggle:hover {
  border-color: rgba(83, 104, 255, 0.18);
  background: var(--fk-color-primary-soft);
  color: var(--fk-color-primary);
  box-shadow: none;
}

.workspace-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  gap: 10px;
  flex: 0 0 auto;
}

.topbar h1 {
  margin: 0;
  font-size: 1.12rem;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.actions button:not(.fk-btn) {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 11px;
  margin-left: 8px;
  cursor: pointer;
}

button {
  transition: transform 140ms ease-out, box-shadow 160ms ease-out;
}

button:hover {
  transform: scale(1.03);
}

button:active {
  transform: scale(0.985);
}

.view-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#view-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: #fff;
  border: 1px solid #dfe3f2;
  border-radius: 10px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
  padding: 6px;
  z-index: 80;
  display: grid;
  gap: 4px;
}
#view-menu.hidden { display: none; }

#view-menu button {
  text-align: left;
}

#brand-core-overlay .picker-panel {
  width: min(720px, 92vw);
  display: grid;
  gap: 8px;
}

.brand-core-shell {
  width: min(1320px, 95vw) !important;
  grid-template-columns: 2.2fr 1fr;
  gap: 16px;
}

.brand-core-board {
  background: #f8f8fc;
  border: 1px solid #e3e6f2;
  border-radius: 14px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.brand-core-card {
  min-height: 90px;
  border: 1px solid #d9ddf0;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  color: #6554f1;
  font-weight: 700;
}

.brand-core-card.main {
  grid-column: 2 / span 2;
  min-height: 120px;
}

.brand-core-form {
  border: 1px solid #e3e6f2;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.brand-core-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  background: #f3f4f8;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  align-items: start;
  max-width: none;
  width: 100%;
  animation: fadeMode 0.2s ease;
}

.brand-mode-header {
  grid-column: 1 / -1;
  margin: 0 0 6px;
}

.brand-mode-header h1 {
  margin: 0;
  font-size: 1.35rem;
}
.brand-mode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-mode-header button {
  border: 1px solid #d5d9ea;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  color: #5c5f74;
}

@keyframes fadeMode {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand-core-canvas {
  border: 1px solid #e0e4f1;
  border-radius: 12px;
  background: #f8f9fd;
  padding: 16px;
  display: grid;
  gap: 12px;
  align-self: stretch;
  align-content: start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: none;
}

.bc-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.bc-node {
  min-height: 120px;
  max-height: 170px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe4f2;
  color: #4c54a2;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  background: #fff;
  z-index: 1;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(46, 55, 93, 0.06);
}
.bc-title { color: #5e4bf4; font-size: 0.83rem; letter-spacing: 0.03em; margin: 0; line-height: 1.2; display: flex; align-items: center; gap: 8px; }
.bc-preview { margin-top: 6px; color: #2f3552; font-weight: 500; font-size: 0.8rem; line-height: 1.34; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; max-height: 86px; overflow: hidden; }
.bc-preview ul { margin: 0; padding-left: 16px; }
.bc-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.bc-tags span { background: #f1f3fb; border-radius: 999px; padding: 3px 8px; font-size: 0.74rem; }
.bc-good { background: #eaf9ef; border-radius: 8px; padding: 6px; margin-bottom: 4px; }
.bc-bad { background: #fdecec; border-radius: 8px; padding: 6px; }
.bc-assets-preview { display: grid; gap: 6px; }
.bc-colors { display: flex; gap: 6px; }
.bc-colors i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid #ccd2e8; display: inline-block; }
.bc-count { position: absolute; right: 10px; bottom: 8px; font-size: 0.7rem; color: #8a90ab; background: #f1f3fb; border-radius: 999px; padding: 2px 7px; }

.bc-main {
  width: min(520px, 100%);
  justify-self: center;
  min-height: 130px;
  max-height: 160px;
}

.bc-node.selected {
  box-shadow: 0 0 0 2px #6f5bff55;
}

.bc-assets { min-height: 120px; }
.bc-add-custom { border-style: dashed; color: #6f5bff; }
.bc-custom-delete { margin-top: 10px; border: 1px solid #f2c9cd; color: #b24552; background: #fff7f8; border-radius: 8px; padding: 8px 10px; }

.brand-core-side {
  border: 1px solid #e0e4f1;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  box-shadow: 0 6px 14px rgba(40, 50, 90, 0.08);
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  align-self: stretch;
  justify-self: stretch;
}
.bc-edit-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; }
.bc-edit-list li { background: #f6f8ff; border: 1px solid #e1e6f6; border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.bc-edit-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bc-edit-list li .bc-editor-icon-action { flex: 0 0 auto; }
.bc-edit-list li small { color: #8f95af; font-size: 0.72rem; }
.brand-core-side label { font-size: 0.76rem; color: #707899; margin-top: 4px; }
.brand-core-side input,
.brand-core-side textarea { width: 100%; border: 1px solid #dfe4f2; border-radius: 10px; padding: 8px 10px; font-size: 0.84rem; }
.brand-core-side input:focus,
.brand-core-side textarea:focus { outline: none; border-color: #6f5bff; box-shadow: 0 0 0 2px #6f5bff2b; }
.brand-core-side .posting-actions input { flex: 1; }
.bc-add-row { gap: 8px; margin-top: 4px; }
.bc-add-row .bc-editor-icon-action,
.bc-edit-list .bc-editor-icon-action {
  min-height: calc(var(--fk-space-5) * 2);
  padding: 0;
  width: calc(var(--fk-space-5) * 2);
}

.bc-logo-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--fk-space-2);
  margin-top: var(--fk-space-1);
}

.brand-core-side .bc-logo-upload-input {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.bc-logo-upload-input:focus-visible + .bc-logo-upload-action {
  border-color: var(--fk-color-primary);
  outline: var(--fk-space-1) solid var(--fk-color-primary-soft);
  outline-offset: var(--fk-space-1);
}

.brand-core-side .bc-logo-upload-action {
  color: var(--fk-color-heading);
  font-size: var(--fk-font-size-sm);
  font-weight: var(--fk-font-weight-bold);
  margin-top: 0;
  width: auto;
}

.document-source-summary { margin: 12px 0; padding: 14px; }
.document-source-summary > strong { display: block; overflow-wrap: anywhere; }
.document-source-summary dl { display: grid; gap: 6px; margin: 12px 0; }
.document-source-summary dl div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.document-source-summary dt { color: var(--fk-text-muted, #667085); }
.document-source-summary dd { margin: 0; overflow-wrap: anywhere; }
.document-source-empty { padding: 14px; border: 1px dashed rgba(120,130,160,.35); border-radius: 10px; }
.document-source-error { color: #b42318; min-height: 1.25em; }
.document-source-legacy { margin: 14px 0; }
.document-source-legacy summary { cursor: pointer; font-weight: 600; }

.brand-core-side .bc-logo-remove {
  color: var(--fk-color-danger);
  width: auto;
}

.brand-core-side .bc-logo-remove:hover,
.brand-core-side .bc-logo-remove:focus-visible {
  background: var(--fk-color-danger-soft);
  border-color: var(--fk-color-danger);
  color: var(--fk-color-danger);
}
.brand-core-side .founder-story-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.brand-core-side .founder-story-actions button {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  height: auto;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.founder-story-actions + .bc-helper:empty { display: none; }
.founder-story-actions ~ h5 { margin-top: 12px; }
.bc-editor-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bc-helper { margin: 0; font-size: 0.76rem; color: #8b92ad; }
.bc-badge { background: #edeaff; color: #5e4bf4; border-radius: 999px; font-size: 0.73rem; padding: 3px 9px; }


.actions .primary-add:not(.fk-btn) {
  background: #23b26d;
  border-color: #23b26d;
  color: #fff;
  font-weight: 700;
}

.actions .create-campaign-btn:not(.fk-btn) {
  background: #2a6fff;
  border-color: #2a6fff;
  color: #fff;
  font-weight: 700;
}

.actions .create-campaign-btn:not(.fk-btn):hover {
  background: #215fe0;
}

.actions .primary-add:not(.fk-btn):hover {
  background: #1ca45f;
}

#zoom-label {
  margin-left: 10px;
  min-width: 46px;
  text-align: right;
  color: var(--muted);
}

#save-status {
  margin-left: 8px;
  font-size: 0.8rem;
  color: #5f6a82;
}

.canvas,
.board-list-view {
  position: relative;
  flex: 1;
  min-height: 0;
}

.app-shell:not([data-layout-mode="canvas"]) .workspace-wrap > :not(.topbar):not(.hidden) {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  overscroll-behavior-y: contain;
}

.app-shell[data-layout-mode="contained"] .workspace-wrap > :not(.topbar):not(.hidden),
.app-shell[data-layout-mode="reading"] .workspace-wrap > :not(.topbar):not(.hidden) {
  width: 100%;
  margin-inline: auto;
}

.canvas {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background-image: radial-gradient(#dcdff1 1px, transparent 1px);
  background-size: 18px 18px;
}

.canvas-scroll-surface {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 20000px;
  height: 30000px;
}

.zoom-layer {
  position: absolute;
  inset: 0;
  width: 20000px;
  height: 30000px;
}

.links {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.empty-state {
  position: absolute;
  left: 5000px;
  top: 5000px;
  transform: translate(-50%, -50%);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
}

.board-list-view {
  overflow: auto;
  padding: 20px;
  background: #fff;
}

.board-list-view h2 {
  margin-top: 0;
}

.list-group {
  border: 1px solid #eceffc;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}

.list-group h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.list-group ul {
  margin: 0;
  padding-left: 18px;
}

.list-group li {
  margin-bottom: 6px;
  cursor: pointer;
}

.node-list-group {
  background: rgba(255, 255, 255, 0.76);
}

.node-summary-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.node-summary-row {
  display: grid;
  gap: 6px;
  margin: 0;
  border: 1px solid #e4e8f7;
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.node-summary-row:hover,
.node-summary-row:focus-visible {
  border-color: rgba(107, 78, 255, 0.28);
  box-shadow: 0 8px 18px rgba(55, 64, 120, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.node-summary-topline,
.node-summary-titlewrap,
.node-summary-meta {
  display: flex;
  align-items: center;
  min-width: 0;
}

.node-summary-topline {
  justify-content: space-between;
  gap: 10px;
}

.node-summary-titlewrap {
  gap: 7px;
  flex: 1 1 auto;
}

.list-status-chip {
  flex: 0 0 auto;
  margin-left: 0;
  max-width: 110px;
  font-size: 0.6rem;
  padding: 3px 6px;
}

.node-summary-title {
  min-width: 0;
  color: #26315c;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-summary-preview {
  margin: 0;
  color: #5d6686;
  font-size: 0.74rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-summary-meta {
  flex-wrap: wrap;
  gap: 5px;
}

.node-summary-meta span {
  border: 1px solid #e0e5f7;
  border-radius: 999px;
  background: #f7f8ff;
  color: #59647e;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 7px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-summary-comments {
  flex: 0 0 auto;
  border: 1px solid rgba(107, 78, 255, 0.2);
  border-radius: 999px;
  background: #f4f1ff;
  color: #5640d4;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  padding: 5px 8px;
}

.node-summary-comments.has-unresolved {
  border-color: rgba(238, 135, 55, 0.32);
  background: #fff4e8;
  color: #a75112;
}

.node-summary-comments:hover,
.node-summary-comments:focus-visible {
  box-shadow: 0 0 0 3px rgba(107, 78, 255, 0.1);
  outline: none;
}

.node-summary-new-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 18px;
  flex: 0 0 auto;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff1e4;
  color: #9a4a0f;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.12);
}

.node-summary-row.has-recent-activity {
  border-left-color: rgba(255, 138, 61, 0.74);
  border-left-width: 3px;
}

.node-summary-row.has-unread-comments {
  background: linear-gradient(90deg, rgba(255, 248, 237, 0.92), #fff 22%);
}

.node-summary-row.has-recent-status .list-status-chip {
  box-shadow: 0 0 0 2px rgba(255, 138, 61, 0.12);
}

.node-summary-comments.has-unread {
  border-color: rgba(255, 138, 61, 0.42);
  background: #fff1df;
  color: #9a4a0f;
  box-shadow: 0 0 0 2px rgba(255, 138, 61, 0.1);
}

.list-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.node {
  position: absolute;
  z-index: 5;
  width: 285px;
  background: var(--panel);
  border: 1px solid #c8bfff;
  border-radius: 14px;
  padding: 10px 12px 12px;
  box-shadow: 0 8px 18px rgba(82, 67, 170, 0.08);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

.node-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin-bottom: 4px;
}

.node-header-meta {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px 5px;
  min-width: 0;
}

.node-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 22px;
}

.node-compact-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #d7dcf1;
  background: #fff;
  color: #4b5fd8;
  font-size: 0.8rem;
  cursor: pointer;
  z-index: 3;
}
.node-compact-summary { display: none; }
.node-compact-summary .compact-preview { margin: 4px 0 6px; font-size: 0.72rem; color: #4d597f; line-height: 1.35; }
.node-compact-summary .compact-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.node-compact-summary .compact-meta span { background: #f1f4ff; color: #4b5fd8; border: 1px solid #dde3fb; border-radius: 999px; font-size: 0.62rem; padding: 2px 6px; }
.node-compact-summary.has-thumb {
  min-height: 54px;
  padding-right: 60px;
  background-image: var(--compact-thumb);
  background-size: 50px 50px;
  background-repeat: no-repeat;
  background-position: right 2px top 2px;
}

.node:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(82, 67, 170, 0.16);
}

.node-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.control-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}


.connector-actions {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -13px;
  display: flex;
  gap: 8px;
}

.connector-handle,
.connector-link-handle {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #8f80ff;
  background: #fff;
  color: #6b4eff;
  font-weight: 700;
  cursor: crosshair;
}

.connector-link-handle {
  border-color: #6f84ff;
  color: #3f57cf;
}


.node-ghost {
  opacity: 0.82 !important;
  pointer-events: none;
  border-style: dashed;
}

.node.selected {
  outline: 2px solid var(--primary);
}

.node.remote-updated {
  animation: remote-node-update-pulse 1s ease-out;
}

.node.activity-focused {
  animation: activity-node-focus-pulse 1.4s ease-out;
}

@keyframes activity-node-focus-pulse {
  0% { box-shadow: 0 0 0 0 rgba(105, 80, 239, 0.32), 0 8px 18px rgba(82, 67, 170, 0.08); }
  45% { box-shadow: 0 0 0 9px rgba(105, 80, 239, 0.16), 0 12px 28px rgba(105, 80, 239, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(105, 80, 239, 0), 0 8px 18px rgba(82, 67, 170, 0.08); }
}

@keyframes remote-node-update-pulse {
  0% { box-shadow: 0 0 0 0 rgba(107, 78, 255, 0.28), 0 8px 18px rgba(82, 67, 170, 0.08); }
  45% { box-shadow: 0 0 0 7px rgba(107, 78, 255, 0.14), 0 10px 24px rgba(107, 78, 255, 0.18); }
  100% { box-shadow: 0 0 0 0 rgba(107, 78, 255, 0), 0 8px 18px rgba(82, 67, 170, 0.08); }
}



.node.remote-editing {
  box-shadow: 0 0 0 2px rgba(107, 78, 255, 0.22), 0 0 0 7px rgba(107, 78, 255, 0.08), 0 10px 24px rgba(107, 78, 255, 0.16) !important;
}

.node.remote-editing::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(107, 78, 255, 0.28);
  border-radius: 18px;
  pointer-events: none;
  animation: node-editing-ring-pulse 1.8s ease-in-out infinite;
}

.node-editing-indicator {
  position: absolute;
  top: -14px;
  left: 10px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 172px;
  padding: 3px 8px 3px 4px;
  border: 1px solid rgba(107, 78, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #5542c8;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(36, 42, 78, 0.13);
  pointer-events: auto;
  animation: node-editing-soft-pulse 1.4s ease-in-out infinite;
}

.node-editing-avatars {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
}

.node-editing-avatar {
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #efeaff 0%, #dfe6ff 100%);
  color: #4f39db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.56rem;
  font-weight: 900;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(80, 67, 170, 0.12);
}

.node-editing-avatar + .node-editing-avatar {
  margin-left: -7px;
}

.node-editing-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.node-editing-extra {
  background: #f7f8ff;
  color: #52608f;
}

.node-editing-pencil {
  font-size: 0.72rem;
}

.node-editing-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes node-editing-soft-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.88; }
  50% { transform: translateY(-1px); opacity: 1; }
}

@keyframes node-editing-ring-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.01); }
}


.node-presence-overlay {
  position: absolute;
  top: -12px;
  right: -10px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  pointer-events: none;
  z-index: 8;
  filter: drop-shadow(0 5px 10px rgba(24, 30, 58, 0.18));
  animation: node-presence-fade-in 160ms ease-out both;
}

.node-presence-avatar,
.node-presence-extra {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: linear-gradient(135deg, #f2f5ff 0%, #e8ecff 100%);
  color: #4655b9;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(28, 36, 78, 0.1), 0 3px 8px rgba(28, 36, 78, 0.2);
  overflow: hidden;
  pointer-events: auto;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.node-presence-avatar:hover,
.node-presence-extra:hover {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 0 0 1px rgba(28, 36, 78, 0.12), 0 5px 12px rgba(28, 36, 78, 0.24);
}

.node-presence-avatar + .node-presence-avatar,
.node-presence-avatar + .node-presence-extra {
  margin-left: -7px;
}

.node-editing-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.node-editing-extra {
  background: #f7f8ff;
  color: #52608f;
}

.node-editing-pencil {
  font-size: 0.72rem;
}

.node-editing-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes node-editing-soft-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.88; }
  50% { transform: translateY(-1px); opacity: 1; }
}

@keyframes node-editing-ring-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.01); }
}


.node-presence-overlay {
  position: absolute;
  top: -12px;
  right: -10px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  pointer-events: none;
  z-index: 8;
  filter: drop-shadow(0 5px 10px rgba(24, 30, 58, 0.18));
  animation: node-presence-fade-in 160ms ease-out both;
}

.node-presence-avatar,
.node-presence-extra {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: linear-gradient(135deg, #f2f5ff 0%, #e8ecff 100%);
  color: #4655b9;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(28, 36, 78, 0.1), 0 3px 8px rgba(28, 36, 78, 0.2);
  overflow: hidden;
  pointer-events: auto;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.node-presence-avatar:hover,
.node-presence-extra:hover {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 0 0 1px rgba(28, 36, 78, 0.12), 0 5px 12px rgba(28, 36, 78, 0.24);
}

.node-presence-avatar + .node-presence-avatar,
.node-presence-avatar + .node-presence-extra {
  margin-left: -7px;
}

.node-presence-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.node-presence-extra {
  background: #f7f8ff;
  color: #52608f;
}

@keyframes node-presence-fade-in {
  from { opacity: 0; transform: translateY(-2px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .node.remote-updated,
  .node.activity-focused,
  .node.remote-editing::after,
  .node-editing-indicator,
  .node-presence-overlay {
    animation: none;
  }

  .node-presence-avatar,
  .node-presence-extra {
    transition: none;
  }
}
.node.is-compact { min-height: 90px; padding-bottom: 10px; }
.node.is-compact .content,
.node.is-compact .social-preview,
.node.is-compact .tags,
.node.is-compact .ab-tests,
.node.is-compact .image-strip,
.node.is-compact .content-pack-status,
.node.is-compact .node-expand-content { display: none !important; }
.node.is-compact .node-compact-summary { display: block; }
.node.is-compact .node-ai-toolbar { display: none; }
.node.is-compact:hover .node-ai-toolbar,
.node.is-compact.selected .node-ai-toolbar { display: flex; margin-top: 4px; }
.node.is-compact .node-ai-toolbar button:nth-child(n+4) { display: none; }
.node.is-compact .social-preview:not(.hidden) ~ .reaction-bar {
  display: flex;
  position: relative;
  z-index: 2;
}
.node.search-dimmed { opacity: 0.35 !important; }
.node.search-match { box-shadow: 0 0 0 2px #6f5bff44, 0 10px 20px rgba(82,67,170,0.18); }

#node-search-input {
  width: 170px;
  min-height: 34px;
  border-radius: var(--fk-radius-pill);
  padding: var(--fk-space-2) var(--fk-space-3);
  font-size: var(--fk-font-size-xs);
  background: var(--fk-color-surface-muted);
}
#node-search-input:focus-visible {
  outline: var(--fk-space-1) solid rgba(83, 104, 255, 0.22);
  outline-offset: var(--fk-space-1);
  border-color: var(--fk-color-primary);
  box-shadow: none;
}
.node-filter-chips { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; max-width: 100%; }
.node-filter-chips button { border: 1px solid #d8dcef; background: #f7f8ff; color: #4a5889; border-radius: 999px; font-size: 0.62rem; padding: 2px 7px; cursor: pointer; }
.node-filter-chips button.active { background: #ebe7ff; border-color: #c8bcff; color: #4f39db; }
.node-filter-chips .owner-filter-option {
  display: inline-flex;
  align-items: center;
  max-width: 168px;
  gap: 4px;
}
.node-filter-chips .owner-filter-option span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.node-filter-owner-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8e3ff;
}
.node-filter-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.node-search-count { font-size: 0.66rem; color: #66719a; min-width: 78px; }
.floating-filter-popover {
  position: fixed;
  width: min(430px, 72vw);
  background: #fff;
  border: 1px solid #dde2f3;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(30,40,90,.14);
  padding: 10px;
  z-index: 1200;
}

.node .type {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.node-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  max-width: 128px;
  border: 1px solid rgba(91, 102, 135, 0.16);
  border-radius: 999px;
  background: #f6f7fb;
  color: #59647e;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 3px 7px;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-status-chip[data-status-tone="draft"] {
  border-color: rgba(91, 102, 135, 0.18);
  background: #f5f7fb;
  color: #5b6687;
}

.node-status-chip[data-status-tone="review"] {
  border-color: rgba(67, 111, 255, 0.2);
  background: #eef3ff;
  color: #3159d4;
}

.node-status-chip[data-status-tone="changes"] {
  border-color: rgba(238, 135, 55, 0.24);
  background: #fff4e8;
  color: #b65b12;
}

.node-status-chip[data-status-tone="approved"] {
  border-color: rgba(54, 164, 104, 0.24);
  background: #ecfbf2;
  color: #247a4b;
}

.node-status-chip[data-status-tone="published"] {
  border-color: rgba(107, 78, 255, 0.2);
  background: #f1efff;
  color: #4b3bc4;
}

.node.is-compact .node-status-chip {
  max-width: 118px;
  padding-inline: 6px;
}

.node.is-in-review .node-comment-badge.has-unresolved {
  border-color: rgba(67, 111, 255, 0.36);
  box-shadow: 0 0 0 2px rgba(67, 111, 255, 0.1);
}

.node h3,
.node p {
  margin: 8px 0;
  border-radius: 6px;
  padding: 4px;
  min-height: 22px;
}

.node h3[contenteditable="true"]:empty:not(:focus)::before,
.node p[contenteditable="true"]:empty:not(:focus)::before {
  content: attr(data-placeholder);
  color: #9ea3be;
}

.node h3:focus,
.node p:focus {
  outline: 1px solid var(--primary);
  background: #f8f6ff;
}

.node .content {
  overflow: hidden;
}

.node .content.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.content-pack-status {
  margin: 4px 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #4f5678;
  padding: 2px 4px;
}

.content-pack-status {
  color: #5b63a8;
  font-style: italic;
}

.content-pack-status.error {
  color: #b23939;
}

.node-expand-content {
  border: 1px solid #d7dcf1;
  background: #f8f9ff;
  color: #4b5fd8;
  font-size: 0.8rem;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.node-ai-toolbar {
  display: none;
  gap: 4px;
  flex-wrap: wrap;
  margin: 2px 0 6px;
}

.node:hover .node-ai-toolbar,
.node.selected .node-ai-toolbar {
  display: flex;
}

.node-ai-toolbar button {
  border: 1px solid #d8dced;
  background: #f7f8ff;
  color: #42507f;
  border-radius: 999px;
  font-size: 0.68rem;
  padding: 2px 8px;
  cursor: pointer;
}

.node-ai-toolbar button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.node.ai-loading {
  opacity: 0.75 !important;
  position: relative;
}

.node.ai-loading .node-ai-toolbar::after {
  content: "✨ AI is thinking…";
  font-size: 0.66rem;
  color: #5b63a8;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef1ff 0%, #e1e8ff 50%, #eef1ff 100%);
  background-size: 200% 100%;
  animation: aiThinkingShimmer 1.2s linear infinite;
}

 .image-strip {
  display: flex;
  margin-bottom: 6px;
}

.image-thumb {
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
}

.image-thumb img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d9dff2;
  transition: transform 0.18s ease;
}

.image-thumb-preview {
  box-shadow: 0 2px 8px rgba(27, 35, 77, 0.12);
}

.image-thumb-preview:hover img {
  transform: scale(1.03);
}

.image-thumb.is-favorite img {
  border: 2px solid #f0b429;
}

.image-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
}

.image-more-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 0.68rem;
  border-radius: 999px;
  background: rgba(30, 35, 70, 0.86);
  color: #fff;
  padding: 2px 6px;
}

.image-delete-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #9c1f1f;
  background: #ff4d4f;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 7px rgba(120, 10, 10, 0.35);
}

.inspector-image-list {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 10px;
}

.inspector-image-item {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  border: 1px solid #e2e5f4;
  border-radius: 10px;
  padding: 6px;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.inspector-image-item:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(34, 44, 90, 0.14);
}

.inspector-image-item.is-favorite {
  border-color: #f0b429;
  box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.35);
}

.inspector-image-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.inspector-image-favorite-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #d39a00;
  padding: 2px 6px;
  opacity: 0;
}

.inspector-image-item.is-favorite .inspector-image-favorite-tag {
  opacity: 1;
}

.inspector-image-actions {
  position: absolute;
  inset: 6px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.inspector-image-item:hover .inspector-image-actions {
  opacity: 1;
  pointer-events: auto;
}

.inspector-image-action {
  border: 1px solid #d4d9ef;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  font-size: 0.75rem;
  padding: 3px 6px;
  cursor: pointer;
}

.inspector-image-action.danger {
  border-color: #d98d8f;
  color: #a73336;
}

.inspector-image-name {
  font-size: 0.78rem;
  color: #39415f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-image-delete {
  border: 1px solid #d98d8f;
  background: #fff5f5;
  color: #a73336;
  border-radius: 6px;
  font-size: 0.72rem;
  padding: 4px 7px;
  cursor: pointer;
}

.social-preview {
  margin: 8px 0;
  border: 1px solid #e6e8f4;
  border-radius: 10px;
  padding: 8px;
  background: #fafbff;
}

.social-card { display: grid; gap: 6px; }
.social-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.social-platform-select { font-size: 0.68rem; border: 1px solid #d8dced; border-radius: 8px; padding: 3px 6px; background: #fff; }
.social-platform-regen { border: 1px solid #d8dced; background: #f7f8ff; color: #42507f; border-radius: 999px; font-size: 0.6rem; padding: 2px 7px; cursor: pointer; }
.social-status-badge { font-size: 0.62rem; color: #2f7f5f; background: #eaf8f1; border-radius: 999px; padding: 2px 7px; }
.social-char-count { font-size: 0.62rem; color: #636b8e; }
.social-char-count.warning { color: #b23939; font-weight: 600; }
.social-caption, .social-cta, .social-hashtags { border: 1px solid #e4e7f6; border-radius: 8px; padding: 6px; background: #fff; font-size: 0.7rem; white-space: pre-wrap; line-height: 1.35; }
.social-cta { font-weight: 600; color: #34457f; }
.social-hashtags { color: #63709b; font-size: 0.66rem; }
.social-actions-row { display: flex; flex-wrap: wrap; gap: 5px; }
.social-actions-row button { border: 1px solid #d8dced; background: #f7f8ff; color: #42507f; border-radius: 999px; font-size: 0.62rem; padding: 2px 7px; cursor: pointer; }
.social-actions-row button.is-scheduled { background: #eaf8f1; border-color: #bfe6d2; color: #2b7b58; font-weight: 600; }
.social-schedule-meta { display: flex; align-items: center; gap: 7px; border: 1px solid #e2e7f8; border-left: 3px solid #62709a; border-radius: 10px; background: #fff; padding: 6px 8px; min-height: 38px; }
.social-schedule-meta:empty { display: none; }
.social-schedule-icon { font-size: 0.9rem; line-height: 1; }
.social-schedule-meta small { margin: 0; color: #68739a; font-size: 0.62rem; }
.social-schedule-meta strong { display: block; color: #2f3b67; font-size: 0.68rem; margin-top: 1px; }
.social-image-frame { border: 1px solid #e4e8f8; border-radius: 10px; overflow: hidden; background: #f3f5ff; min-height: 64px; display: flex; align-items: center; justify-content: center; }
.social-image-frame img { width: 100%; max-height: 120px; object-fit: cover; display: block; cursor: zoom-in; }

.landing-preview-card { display: grid; gap: 5px; }
.landing-preview-image { width: 100%; max-height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid #e4e8f8; cursor: zoom-in; }
.landing-preview-line { margin: 0; font-size: 0.67rem; line-height: 1.35; color: #4a537b; }
.landing-preview-line.is-cta { font-weight: 700; color: #30407d; }

#insights-view, #ai-brain-view { max-width: 1180px; margin: 0 auto; padding: 4px 0 20px; }
.insights-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 12px; }
.insight-card { border: 1px solid #e6e8f5; border-radius: 16px; background: linear-gradient(180deg,#fff 0%,#f9faff 100%); padding: 12px; box-shadow: 0 8px 20px rgba(76,90,160,0.06); }
.insight-card.hero { grid-column: span 2; background: linear-gradient(135deg,#f2edff 0%,#ffffff 70%); }
.insight-card small { color: #6a7092; font-weight: 600; font-size: 0.68rem; }
.insight-card h3, .insight-card h4 { margin: 6px 0 4px; color: #2e3561; }
.insight-card h3 span { font-size: 0.8rem; color: #6a7092; }
.insight-card p { margin: 0; font-size: 0.76rem; color: #555f86; line-height: 1.4; }
.insight-funnel { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.insight-step { font-size: 0.64rem; padding: 3px 7px; border-radius: 999px; border: 1px solid #e0e5ff; background: #f8f9ff; color: #626b90; }
.insight-step.covered { background: #ecf5ff; border-color: #cde3ff; color: #2856a7; }
.insight-step.missing { background: #fff2f4; border-color: #ffd6dc; color: #a24559; }
.insights-boundary { display: grid; gap: 16px; }
.insights-section { border: 1px solid #e1e5f4; border-radius: 18px; padding: 16px; background: #fff; }
.insights-section h3 { margin: 0 0 6px; color: #2e3561; }
.insights-section-heading { margin-bottom: 12px; }
.insights-section-heading p { margin: 0; color: #5c668c; font-size: 0.8rem; line-height: 1.5; }
.insights-measured-empty { background: #f7f8fc; border-style: dashed; }
.insights-data-status { display: inline-flex; margin-top: 12px; border-radius: 999px; padding: 5px 9px; background: #eceef6; color: #515b7d; font-size: 0.7rem; font-weight: 700; }
.insights-provenance { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 14px; }
.insights-provenance span { border-radius: 999px; padding: 5px 9px; background: #eef1ff; color: #3d4d86; font-size: 0.68rem; font-weight: 650; }
.insights-provenance .insights-canvas-state { background: #fff5dc; color: #765817; }
.insights-diagnostic-state { border: 1px solid #e6e8f5; border-radius: 14px; padding: 14px; background: #fbfcff; color: #555f86; font-size: 0.8rem; }
@media (max-width: 640px) { .insight-card.hero { grid-column: span 1; } .insights-section { padding: 12px; } }

.insights-page-header { display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end;padding:4px 2px; }
.insights-eyebrow { margin:0;font-weight:750;color:var(--fk-color-text-primary,#2e3561); }
.insights-lede { grid-column:1;margin:2px 0 0;color:var(--fk-color-text-secondary,#5c668c);font-size:.82rem;line-height:1.5; }
.insights-context { grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px; }
.insights-context span { max-width:100%;overflow-wrap:anywhere;border:1px solid var(--fk-color-border-default,#e1e5f4);border-radius:999px;padding:5px 9px;background:var(--fk-color-surface-card,#fff);color:var(--fk-color-text-secondary,#515b7d);font-size:.68rem; }
.insights-refresh { grid-column:2;grid-row:1/3;min-height:44px; }
.insight-value { margin:7px 0;font-size:1.12rem;font-weight:750;color:var(--fk-color-text-primary,#2e3561);overflow-wrap:anywhere; }
.insights-diagnostic-groups { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.insights-diagnostic-group { min-width:0;border:1px solid var(--fk-color-divider,#e6e8f5);border-radius:14px;padding:12px;background:var(--fk-color-surface-panel,#f9faff); }
.insights-diagnostic-group h4 { margin:0 0 10px;color:var(--fk-color-text-primary,#2e3561); }
.insights-diagnostic-group .insight-card + .insight-card { margin-top:8px; }
.insight-card h5 { margin:0;color:var(--fk-color-text-primary,#2e3561);font-size:.8rem; }
.insights-future-note { margin-top:12px; }
.insights-finding { border:1px solid var(--fk-color-divider,#e1e5f4);border-left:4px solid var(--fk-color-information,#64748b);border-radius:14px;padding:14px;background:var(--fk-color-surface-card,#fff); }
.insights-finding + .insights-finding { margin-top:10px; }
.insights-finding.severity-important { border-left-color:var(--fk-color-warning,#b7791f); }
.insights-finding.severity-opportunity { border-left-color:var(--fk-color-primary-action,#6d5ce7); }
.insights-finding h4 { margin:6px 0;color:var(--fk-color-text-primary,#2e3561); }
.insights-finding p,.insights-node-list { color:var(--fk-color-text-secondary,#555f86);font-size:.78rem;line-height:1.5; }
.insights-severity { font-size:.7rem;font-weight:750; }
.insights-node-list { margin:6px 0;padding-left:20px;overflow-wrap:anywhere; }
.insights-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:10px; }
.insights-actions .fk-btn { min-height:44px; }
.insights-methodology summary { cursor:pointer;min-height:44px;padding:10px 0;font-weight:700;color:var(--fk-color-text-primary,#2e3561); }
.insights-classifications { display:grid;grid-template-columns:minmax(120px,.3fr) 1fr;gap:7px 12px; }
.insights-classifications dt { font-weight:700;color:var(--fk-color-text-primary,#2e3561); }
.insights-classifications dd { margin:0;color:var(--fk-color-text-secondary,#555f86); }
.insights-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.insights-summary-card { display:flex;flex-direction:column;gap:7px;min-width:0; }
.insights-summary-card :is(h4,p) { margin:0; }
.insights-quality-label { color:var(--fk-color-text-primary,#2e3561);font-size:.78rem; }
.insights-funnel-stages { display:flex;flex-wrap:wrap;gap:7px;list-style:none;margin:5px 0 0;padding:0; }
.insights-funnel-stages li { display:flex;align-items:center;gap:6px;min-width:0;border-radius:999px;padding:6px 9px;background:var(--fk-color-surface-secondary,#f4f5fb);font-size:.72rem;overflow-wrap:anywhere; }
.insights-funnel-stages .is-covered { color:var(--fk-color-success,#287a51); }
.insights-funnel-stages .is-missing { color:var(--fk-color-text-secondary,#667085);border:1px dashed var(--fk-color-border-default,#d7dbea); }
.insights-stage-icon { font-weight:800; }
.insights-channel-list { display:flex;flex-wrap:wrap;gap:7px;margin-top:5px; }
.insights-channel-row { display:inline-flex;align-items:center;justify-content:space-between;gap:14px;border-radius:999px;padding:6px 10px;background:var(--fk-color-surface-secondary,#f4f5fb);font-size:.74rem; }
.insights-channel-empty { margin:0; }
.insights-diagnostic-row { border:0;border-top:1px solid var(--fk-color-divider,#e6e8f5);border-radius:0;padding:12px 0;background:transparent;box-shadow:none; }
.insights-diagnostic-row:first-of-type { border-top:0;padding-top:2px; }
.insights-diagnostic-row :is(h5,p) { margin:4px 0; }
.insights-score { font-size:.78rem;font-weight:750;color:var(--fk-color-text-primary,#2e3561); }
.insights-calculation summary { cursor:pointer;display:inline-flex;align-items:center;min-height:44px;font-size:.72rem;font-weight:700; }
.insights-calculation p { margin:0 0 8px; }
.insights-affected-count { font-weight:700; }
.insights-method-list { color:var(--fk-color-text-secondary,#555f86);line-height:1.65; }
html[data-theme="dark"] :is(.insights-page-header,.insights-diagnostic-group,.insights-finding) { color:var(--fk-color-text-primary); }
html[data-theme="dark"] :is(.insights-context span,.insights-diagnostic-group,.insights-finding) { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider); }
@media (max-width:760px) { .insights-overview-grid,.insights-diagnostic-groups { grid-template-columns:1fr; }.insights-page-header { grid-template-columns:1fr; }.insights-refresh { grid-column:1;grid-row:auto;width:100%; }.insights-actions { flex-direction:column; }.insights-actions .fk-btn { width:100%; }.insights-classifications { grid-template-columns:1fr; }.insights-classifications dd { margin-bottom:8px; }.insights-funnel-stages li { flex:1 1 145px; } }

.ai-brain-wrap { display: grid; gap: 12px; }
.ai-brain-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #e6e8f5; border-radius: 16px; padding: 12px; background: #fff; }
.ai-brain-header h3 { margin: 0; color: #2f3561; }
.ai-brain-header p { margin: 0; color: #66709a; font-size: 0.8rem; }
.ai-brain-header button { border: 1px solid #d7dbf0; background: #f7f8ff; border-radius: 10px; padding: 6px 10px; font-size: 0.72rem; }
.ai-summary-card, .ai-list-card, .ai-actions-card { border: 1px solid #e6e8f5; border-radius: 16px; background: #fff; padding: 12px; box-shadow: 0 8px 20px rgba(76,90,160,0.06); }
.ai-summary-card h2 { margin: 4px 0; font-size: 1.8rem; color: #2f3561; }
.ai-summary-card h2 span { font-size: 0.9rem; color: #6f769b; }
.ai-summary-card p, .ai-list-card li { color: #556086; font-size: 0.8rem; line-height: 1.45; }
.ai-columns { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 12px; }
.ai-list-card ul { margin: 6px 0 0; padding-left: 16px; }
.ai-actions-card h4, .ai-list-card h4 { margin: 0 0 8px; color: #2f3561; }
.ai-action-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px; }
.ai-action-grid button { border: 1px solid #d8dcef; background: #f8f9ff; color: #415082; border-radius: 12px; padding: 8px 10px; font-size: 0.72rem; text-align: left; }
.ai-action-grid button small { display: block; margin-top: 4px; color: #7280ac; font-size: 0.62rem; }
.insight-suggestion-list { display: grid; gap: 8px; margin-top: 8px; }
.insight-suggestion-item { display: flex; justify-content: space-between; gap: 10px; border: 1px solid #e6e8f5; border-radius: 12px; padding: 8px; background: #fbfcff; }
.insight-suggestion-item strong { color: #2f3561; font-size: 0.78rem; }
.insight-suggestion-item small { display: block; color: #7280ac; font-size: 0.64rem; margin-top: 2px; }
.insight-suggestion-item p { margin: 4px 0 0; color: #5a648e; font-size: 0.7rem; }
.insight-suggestion-item button { border: 1px solid #d8dcef; background: #f7f8ff; color: #415082; border-radius: 10px; padding: 6px 8px; font-size: 0.68rem; white-space: nowrap; }

.social-preview p,
.social-preview small,
.social-preview em {
  display: block;
  margin-top: 4px;
}

.tags,
.ab-tests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.variant {
  background: #f2f3fa;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.74rem;
}

.postit {
  position: absolute;
  width: 180px;
  min-height: 130px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.postit header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  font-size: 0.68rem;
  line-height: 1.1;
  min-width: 0;
  flex-wrap: nowrap;
}

.postit-user {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}

.postit-time {
  flex: 0 1 auto;
  max-width: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.66;
  line-height: 1.1;
}

.postit-color,
.postit-resolve,
.postit-delete {
  flex: 0 0 auto;
}

.postit-color {
  width: 26px;
  height: 22px;
  border: none;
  background: transparent;
  padding: 0;
}

.postit-delete {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
}

.postit-text {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  border: none;
  background: transparent;
  outline: none;
  line-height: 1.25;
}

.ai-review-postit {
  width: 320px;
  min-height: 180px;
}

.ai-review-postit .postit-text {
  resize: none;
}

.ai-review-card {
  display: grid;
  gap: 7px;
  color: #26304f;
  font-size: 0.74rem;
  line-height: 1.35;
  user-select: text;
}

.ai-review-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-review-card-heading strong {
  font-size: 0.82rem;
}

.ai-review-score {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(81, 103, 216, 0.13);
  color: #3140a0;
  font-weight: 900;
  padding: 3px 8px;
}

.ai-review-section {
  border: 1px solid rgba(49, 64, 160, 0.09);
  border-radius: 9px;
  padding: 0;
  overflow: hidden;
}

.ai-review-section summary {
  cursor: pointer;
  font-weight: 800;
  padding: 6px 8px;
}

.ai-review-section-body {
  padding: 0 8px 8px;
}

.ai-review-section-body p {
  margin: 0;
  white-space: pre-wrap;
}

.ai-review-section-body ul {
  margin: 0;
  padding-left: 17px;
}

.ai-review-section-summary {
  background: #eef5ff;
}

.ai-review-section-strengths {
  background: #edf9f2;
}

.ai-review-section-improvements {
  background: #fff6df;
}

.ai-review-section-rewrite {
  background: #f3edff;
}

.ai-review-improvement-row {
  display: grid;
  gap: 3px;
  border-top: 1px solid rgba(125, 82, 16, 0.12);
  padding-top: 7px;
  margin-top: 7px;
}

.ai-review-improvement-row:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.ai-review-improvement-row strong {
  color: #7d5210;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-review-rewrite {
  margin: 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
}


.ai-workspace-section {
  border-color: rgba(81, 103, 216, 0.24);
  background: #f7f9ff;
}

.ai-workspace-body {
  display: grid;
  gap: 8px;
}

.ai-workspace-heading {
  color: #3140a0;
  font-size: 0.82rem;
}

.ai-workspace-meta,
.ai-workspace-improvement,
.ai-workspace-explanation {
  display: grid;
  gap: 3px;
  color: #3a456c;
  font-size: 0.74rem;
}

.ai-workspace-improvement p,
.ai-workspace-explanation p,
.ai-workspace-status,
.ai-workspace-error {
  margin: 0;
  white-space: pre-wrap;
}

.ai-workspace-error {
  color: #a34242;
  font-weight: 700;
}

.ai-workspace-text-wrap {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  color: #6a7190;
  font-size: 0.72rem;
  font-weight: 800;
}

.ai-workspace-text {
  width: 100%;
  min-height: 94px;
  max-height: 170px;
  resize: vertical;
  overflow-y: auto;
  border: 1px solid #dfe5f7;
  border-radius: 8px;
  background: #fff;
  color: #26304f;
  padding: 7px 8px;
  font-size: 0.76rem;
  line-height: 1.35;
  font-weight: 500;
}

.ai-workspace-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ai-workspace-field-updated {
  animation: ai-workspace-field-pulse 1.3s ease-out;
}

@keyframes ai-workspace-field-pulse {
  0% { box-shadow: 0 0 0 0 rgba(81, 103, 216, 0.34); border-color: rgba(81, 103, 216, 0.5); }
  55% { box-shadow: 0 0 0 5px rgba(81, 103, 216, 0.13); border-color: rgba(81, 103, 216, 0.44); }
  100% { box-shadow: 0 0 0 0 rgba(81, 103, 216, 0); }
}

.postit-replies {
  margin-top: 6px;
  border-top: 1px dashed rgba(0, 0, 0, 0.2);
  padding-top: 4px;
}

.postit-reply {
  margin: 0 0 4px;
  font-size: 0.7rem;
}

.postit-reply-editor {
  margin-top: 6px;
  display: grid;
  gap: 4px;
}

.postit-reply-input {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.72rem;
}

.context-menu {
  position: absolute;
  z-index: 40;
  background: linear-gradient(180deg, #ffffff, #f7f4ff);
  border: 1px solid #d8cffe;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(70, 40, 140, 0.2);
  padding: 8px;
}

.context-menu button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 6px;
}

.context-menu button:hover {
  background: #f2f4ff;
}

.emoji-shortcuts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.emoji-quick {
  font-size: 1rem;
  border: 1px solid #e6ddff !important;
  background: #fff !important;
}

.reaction-bar {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reaction-pill {
  cursor: pointer;
  font-size: 0.76rem;
  background: #f2f4ff;
  border: 1px solid #d6dcff;
  color: #36407a;
  border-radius: 999px;
  padding: 3px 8px;
}

.meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.node-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 0 0 auto;
  min-height: unset;
}

.node-form label {
  font-size: 0.8rem;
  color: var(--muted);
}

.node-form input,
.node-form textarea,
.node-form select,
.node-form button {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  font: inherit;
}

.node-form .danger {
  margin-top: 6px;
  color: var(--danger);
  border-color: #f0caca;
}


.node-type-picker {
  position: fixed;
  inset: 0;
  background: rgba(18, 22, 39, 0.36);
  display: grid;
  place-items: center;
  z-index: 60;
}

.picker-panel {
  width: min(580px, 92vw);
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.picker-panel h3 {
  margin: 0 0 12px;
}

.picker-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.picker-option {
  border: 1px solid var(--border);
  background: #f9faff;
  border-radius: 10px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.picker-option:hover {
  background: #f0f3ff;
}


.node.just-connected {
  animation: nodeFlash 0.9s ease;
}

.node.ai-updated {
  border-color: #7a72ff !important;
  box-shadow: 0 0 0 2px rgba(122, 114, 255, 0.25), 0 12px 30px rgba(78, 142, 255, 0.25) !important;
  transition: box-shadow 220ms ease-out, border-color 220ms ease-out;
}

@keyframes aiThinkingShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes nodeFlash {
  0% { filter: brightness(1); transform: scale(1); }
  35% { filter: brightness(2.2) saturate(1.8); transform: scale(1.04); }
  100% { filter: brightness(1); transform: scale(1); }
}

.selection-box {
  position: absolute;
  border: 1px dashed #6b4eff;
  background: rgba(107, 78, 255, 0.12);
  pointer-events: none;
  z-index: 50;
}

.impulse-path {
  stroke-dasharray: 14 8;
  animation: impulseMove 0.7s linear forwards;
  pointer-events: none;
}

@keyframes impulseMove {
  from { stroke-dashoffset: 60; opacity: 0.9; }
  to { stroke-dashoffset: 0; opacity: 0; }
}

.hidden {
  display: none;
}

.calendar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

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

.calendar-day {
  min-height: 120px;
  border: 1px solid #e3e7f4;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

.calendar-day.today {
  border-color: #6b4eff;
  box-shadow: 0 0 0 2px #6b4eff33 inset;
}

.calendar-post {
  margin-top: 6px;
  width: 100%;
  font-size: 0.74rem;
  border: 1px solid #f3c9bc;
  background: #fff3ef;
  border-radius: 6px;
  padding: 4px 6px;
  text-align: left;
  cursor: pointer;
}


.posting-panel { width: min(420px, 92vw); padding: 18px; display: grid; gap: 8px; }
.posting-panel h3 { margin-bottom: 4px; color: #2f3561; }
.posting-panel label { font-size: 0.74rem; color: #68739a; font-weight: 600; margin-top: 2px; }
.posting-panel input { border: 1px solid #dce1f0; border-radius: 10px; padding: 8px 9px; }
.posting-panel .posting-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.posting-panel .posting-actions button { border-radius: 10px; padding: 7px 10px; }

.calendar-post { margin-top: 6px; width: 100%; font-size: 0.72rem; border: 1px solid #e2e6f4; border-left: 3px solid #62709a; background: #ffffff; border-radius: 10px; padding: 7px; text-align: left; cursor: pointer; display: grid; gap: 4px; }
.calendar-post strong { font-size: 0.75rem; color: #2f3b67; line-height: 1.2; }
.calendar-post small { color: #5f6d95; line-height: 1.3; }
.calendar-post-platform { display: inline-flex; width: fit-content; padding: 2px 7px; border-radius: 999px; font-size: 0.62rem; font-weight: 600; }
.calendar-post-thumb { width: 100%; max-height: 58px; object-fit: cover; border-radius: 7px; border: 1px solid #e7ebf8; margin-top: 2px; }
@media (max-width: 1300px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .sidebar .nav-item {
    display: none;
  }

  .sidebar .settings-nav-item { display: flex; justify-content: center; padding: var(--fk-space-2); }
  .sidebar .settings-nav-item .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (max-width: 1023px) {
  .app-shell[data-inspector-open="true"] .inspector {
    display: flex;
    position: fixed;
    z-index: 1200;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    max-height: 100dvh;
    border-left: 1px solid var(--border);
    box-shadow: -18px 0 42px rgba(20, 25, 45, .22);
  }
  .app-shell[data-inspector-mode="overlay"] .inspector-close { display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 767px) {
  .app-shell[data-inspector-open="true"] .inspector { width: 100vw; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell { transition: none; }
}

@media (max-width: 600px) {
  .settings-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; padding: var(--fk-space-4); }
}


.node.image-generating {
  position: relative;
}

.node.image-generating::after {
  content: "Generating…";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(245,247,255,.55), rgba(230,236,255,.72), rgba(245,247,255,.55));
  background-size: 200% 100%;
  animation: aiThinkingShimmer 1.2s linear infinite;
  color: #3f4f89;
  font-size: 0.82rem;
  font-weight: 600;
  pointer-events: none;
}


.inspector {
  font-size: 13px;
}

.inspector h2 {
  font-size: 14px;
  margin-bottom: 8px;
}

.meta {
  font-size: 11px;
}

.node-form {
  gap: 5px;
}

.node-form label {
  font-size: 11px;
  color: #7a8099;
  margin-top: 6px;
}

.node-form input,
.node-form textarea,
.node-form select {
  font-size: 12px;
  padding: 6px 8px;
}

.node-form button {
  font-size: 12px;
  padding: 6px 8px;
}

.inspector-image-name {
  font-size: 11px;
}

#improve-node-btn {
  font-weight: 600;
}

.topbar {
  padding: 8px 12px;
  min-height: unset;
}

.topbar h1 {
  font-size: 16px;
  margin: 0;
}

.topbar p {
  font-size: 11px;
  margin: 2px 0 0 0;
  color: #8a90a6;
}

.topbar button:not(.fk-btn) {
  font-size: 12px;
  padding: 5px 8px;
}

.create-campaign-btn:not(.fk-btn) {
  font-size: 12px;
  padding: 6px 10px;
}

.topbar .actions {
  gap: 6px;
  align-items: center;
}

#zoom-label,
#save-status {
  font-size: 11px;
}

.topbar button:not(.create-campaign-btn):not(.fk-btn) {
  opacity: 0.85;
}


/* Top Toolbar Controls Foundation */
.topbar {
  border-bottom-color: var(--fk-color-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(83, 104, 255, 0.04);
}

.topbar .fk-btn {
  min-height: 34px;
  padding: var(--fk-space-2) var(--fk-space-3);
  border-radius: var(--fk-radius-md);
  font-size: var(--fk-font-size-xs);
  line-height: 1.1;
  white-space: nowrap;
}

.topbar .fk-btn:hover,
.topbar .fk-btn:active {
  transform: none;
}

.topbar .create-campaign-btn.fk-btn-primary {
  border-color: var(--fk-color-primary);
  background: linear-gradient(135deg, var(--fk-color-primary), var(--fk-color-primary-2));
  color: var(--fk-color-surface);
  box-shadow: var(--fk-shadow-sm);
}

.topbar .create-campaign-btn.fk-btn-primary:hover {
  border-color: var(--fk-color-primary-hover);
  background: var(--fk-color-primary-hover);
}

.topbar .toolbar-group,
.topbar .toolbar-row2-left,
.topbar .toolbar-row2-right {
  gap: var(--fk-space-2);
}

.topbar .toolbar-group-left,
.topbar .toolbar-row2-left,
.topbar .toolbar-row2-right {
  align-items: center;
}

.topbar .utility-muted.fk-btn {
  opacity: 1;
}

.topbar .board-access-chip.fk-pill,
.topbar .readonly-board-notice.fk-badge {
  min-height: 26px;
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-medium);
}

.topbar .auth-signin-btn.fk-btn,
.topbar .auth-signout-btn.fk-btn {
  border-radius: var(--fk-radius-pill);
}

.inspector-section {
  border: 1px solid #e7eaf4;
  border-radius: 10px;
  padding: 8px;
  background: #fbfcff;
  margin-bottom: 8px;
}

.inspector-section-title {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #8a90a6;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 24, 0.74);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12000;
}

.image-lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1rem;
}

.inspector-section label {
  display: block;
  width: 100%;
  margin-top: 6px;
  margin-bottom: 3px;
}

.inspector-section input,
.inspector-section textarea,
.inspector-section select,
.inspector-section button {
  display: block;
  width: 100%;
}

/* Inspector Static Fields Foundation */
.inspector .inspector-section.fk-card {
  gap: var(--fk-space-2);
  margin-bottom: var(--fk-space-3);
  padding: var(--fk-space-3);
  border-color: var(--fk-color-border);
  background: var(--fk-color-surface-muted);
  box-shadow: var(--fk-shadow-sm);
}

.inspector .inspector-section.fk-card .inspector-section-title {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-bold);
  letter-spacing: 0.05em;
}

.inspector .inspector-section.fk-card label {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-medium);
}

.inspector .node-form .fk-input,
.inspector .node-form .fk-select,
.inspector .node-form .fk-textarea {
  border-color: var(--fk-color-border);
  border-radius: var(--fk-radius-md);
  background: var(--fk-color-surface);
  color: var(--fk-color-text);
  font-size: var(--fk-font-size-sm);
  padding: var(--fk-space-2) var(--fk-space-3);
}

.inspector .node-form .fk-input,
.inspector .node-form .fk-select {
  min-height: 36px;
}

.inspector .node-form .fk-textarea {
  min-height: 76px;
}

.inspector .node-form .fk-input:focus-visible,
.inspector .node-form .fk-select:focus-visible,
.inspector .node-form .fk-textarea:focus-visible {
  outline: var(--fk-space-1) solid rgba(83, 104, 255, 0.22);
  outline-offset: var(--fk-space-1);
  border-color: var(--fk-color-primary);
  box-shadow: none;
}

/* Inspector Action Buttons Foundation */
.inspector .node-form .fk-btn {
  justify-content: center;
  min-height: 36px;
  margin-top: var(--fk-space-1);
  padding: var(--fk-space-2) var(--fk-space-3);
  border-radius: var(--fk-radius-md);
  font-size: var(--fk-font-size-xs);
  line-height: 1.15;
  text-align: center;
}

.inspector .node-form .fk-btn:hover,
.inspector .node-form .fk-btn:active {
  transform: none;
}

.inspector .node-form .fk-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.inspector .node-form .primary-add.fk-btn-primary {
  border-color: var(--fk-color-primary);
  background: linear-gradient(135deg, var(--fk-color-primary), var(--fk-color-primary-2));
  color: var(--fk-color-surface);
}

.inspector .node-form .inspector-danger-action {
  border-color: rgba(210, 74, 74, 0.24);
  background: var(--fk-color-danger-soft);
  color: var(--fk-color-danger);
}

.inspector .node-form .inspector-danger-action:hover,
.inspector .node-form .inspector-danger-action:focus-visible {
  border-color: var(--fk-color-danger);
  background: #ffe8e8;
  color: var(--fk-color-danger);
}

.inspector-image-actions {
  pointer-events: none;
}

.inspector-image-actions .inspector-image-action {
  pointer-events: auto;
}

.image-lightbox {
  z-index: 20000;
  pointer-events: auto;
}

.image-lightbox-close {
  z-index: 20001;
  pointer-events: auto;
}

.brand-core-side h3,
.brand-core-side h4 {
  margin-top: 0;
  margin-bottom: 8px;
}

.brand-confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 34, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 13000;
}

.brand-confirm-card {
  width: min(420px, 92vw);
  background: #fff;
  border: 1px solid #e1e5f4;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(24, 30, 66, 0.2);
  padding: 16px;
}

.brand-confirm-card h3 { margin: 0 0 8px; color: #4736c8; }
.brand-confirm-card p { margin: 0 0 14px; color: #5e657f; font-size: 0.92rem; }
.brand-confirm-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--fk-space-2);
  justify-content: flex-end;
}

.brand-confirm-actions button:not(.fk-btn) {
  border-radius: 9px;
  padding: 7px 10px;
}

.founder-story-import-card { width: min(760px, 94vw); max-height: 88vh; overflow: auto; position: relative; }
.founder-story-import-card > .brand-dna-recommendation-close { top: 8px; right: 8px; }
.founder-story-import-card input[type="url"],
.founder-story-import-card textarea { width: 100%; box-sizing: border-box; }
.founder-story-import-fields { display: grid; gap: 12px; margin: 12px 0; }
.founder-story-import-field { border: 1px solid #e1e5f4; border-radius: 10px; padding: 12px; }
.founder-story-import-field p { margin: 7px 0; overflow-wrap: anywhere; }
.founder-story-import-select { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.founder-story-import-evidence { border-left: 3px solid #dcd7ff; padding-left: 9px; }
.bc-import-error { color: #a52d2d !important; min-height: 1.25em; }

.brand-dna-founder-story-recommendation .brand-confirm-card {
  position: relative;
  padding: 22px;
}

.brand-dna-recommendation-close {
  position: absolute;
  right: 12px;
  top: 10px;
  min-height: calc(var(--fk-space-5) * 2);
  min-width: calc(var(--fk-space-5) * 2);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
}

.brand-dna-recommendation-close:hover {
  background: var(--fk-color-surface-muted);
  border-color: var(--fk-color-border);
  color: var(--fk-color-heading);
  transform: translateY(-1px);
}

.brand-dna-recommendation-close:active {
  transform: translateY(0);
}

.brand-dna-recommendation-close:focus-visible {
  border-color: var(--fk-color-primary);
  outline: var(--fk-space-1) solid var(--fk-color-primary-soft);
  outline-offset: var(--fk-space-1);
}

.brand-dna-founder-story-recommendation .brand-confirm-actions {
  flex-wrap: wrap-reverse;
}


.ai-brain-header button.is-loading { display: inline-flex; align-items: center; gap: 6px; }
.ai-brain-header .spinner { width: 12px; height: 12px; border: 2px solid #cfd5ee; border-top-color: #5e4bf4; border-radius: 999px; animation: spin 0.8s linear infinite; }
.ai-brain-conversation { max-width: 860px; margin: 0 auto; }
.ai-brain-readonly { padding: 5px 9px; border-radius: 999px; background: #f0efff; color: #5143c7; font-size: .72rem; font-weight: 700; }
.ai-brain-context { display: flex; flex-wrap: wrap; gap: 7px; }
.ai-brain-context span { padding: 5px 9px; border: 1px solid #e4e6f2; border-radius: 999px; background: #fff; color: #596080; font-size: .72rem; }
.ai-brain-context span.is-unsaved { border-color: #f1c879; background: #fff8e9; color: #82550b; }
.ai-brain-transcript { display: grid; gap: 10px; min-height: 220px; max-height: 52vh; overflow: auto; padding: 16px; border: 1px solid #e6e8f5; border-radius: 16px; background: #f8f9fd; }
.ai-brain-empty, .ai-brain-unavailable { padding: 28px; text-align: center; border: 1px solid #e6e8f5; border-radius: 16px; background: #fff; color: #626987; }
.ai-brain-empty h4, .ai-brain-unavailable h4 { margin: 0 0 8px; color: #303653; }
.ai-brain-message { max-width: 82%; min-width: 0; padding: 12px 14px; border-radius: 14px; line-height: 1.55; overflow-wrap: anywhere; color: #303653; background: #fff; border: 1px solid #e2e5f2; }
.ai-brain-message.is-user { justify-self: end; background: #5e4bf4; border-color: #5e4bf4; color: #fff; }
.ai-brain-message strong { display: block; margin-bottom: 5px; font-size: .73rem; }
.ai-brain-message small { display: block; margin-top: 9px; color: #737b99; }
.ai-brain-message.is-user small { color: #e5e2ff; }
.ai-brain-question { white-space: pre-wrap; }
.ai-brain-formatted-answer { min-width: 0; }
.ai-brain-formatted-answer :is(h3, h4, h5, h6) { margin: 16px 0 6px; line-height: 1.25; color: #303653; }
.ai-brain-formatted-answer h3 { font-size: 1.05rem; }
.ai-brain-formatted-answer :is(h4, h5, h6) { font-size: .95rem; }
.ai-brain-formatted-answer > :first-child { margin-top: 0; }
.ai-brain-formatted-answer p { margin: 0 0 10px; }
.ai-brain-formatted-answer p:last-child { margin-bottom: 0; }
.ai-brain-formatted-answer :is(ul, ol), .ai-brain-assumptions ul { margin: 6px 0 10px; padding-inline-start: 24px; }
.ai-brain-formatted-answer li + li, .ai-brain-assumptions li + li { margin-top: 4px; }
.ai-brain-formatted-answer strong { display: inline; margin: 0; font-size: inherit; }
.ai-brain-formatted-answer code { padding: 1px 4px; border-radius: 4px; background: #f0f1f8; font: .9em ui-monospace, monospace; }
.ai-brain-assumptions { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e2e5f2; }
.ai-brain-assumptions h5 { margin: 0; font-size: .82rem; }
@media (max-width: 640px) { .ai-brain-message { max-width: 94%; } }
.ai-brain-composer { display: grid; gap: 8px; padding: 14px; border: 1px solid #e2e5f2; border-radius: 16px; background: #fff; }
.ai-brain-composer label { font-size: .78rem; font-weight: 700; color: #3a4165; }
.ai-brain-composer textarea { min-height: 92px; resize: vertical; padding: 11px; border: 1px solid #d7dbeb; border-radius: 10px; font: inherit; }
.ai-brain-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-brain-composer small { color: #737b99; }
.ai-brain-composer button { padding: 9px 14px; border: 0; border-radius: 9px; background: #5e4bf4; color: #fff; font-weight: 700; white-space: nowrap; }
.ai-brain-proposal-prepare { margin-top: 12px; padding: 7px 10px; border: 1px solid #cbcfe3; border-radius: 8px; background: #f7f8fc; color: #3c4264; font-weight: 700; }
.ai-brain-proposal-status { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: #f1f0ff; color: #5143c7; font-size: .82rem; }
.ai-brain-proposal-status.is-error { background: #fff0f0; color: #9b3030; }
.ai-brain-proposal-status.is-success { background: #eaf8f2; color: #137453; }
.ai-brain-node-preview { display: grid; gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid #cfd5ee; border-radius: 12px; background: #fff; overflow-wrap: anywhere; }
.ai-brain-node-preview h4 { margin: 0; color: #303653; }
.ai-brain-node-type { justify-self: start; padding: 4px 8px; border-radius: 999px; background: #e8f8f2; color: #137453; font-size: .72rem; font-weight: 700; }
.ai-brain-proposal-copy { margin-top: 4px; max-height: 240px; overflow: auto; white-space: pre-wrap; color: #3d4568; }
.ai-brain-proposal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ai-brain-proposal-actions button { padding: 8px 12px; border: 1px solid #cbcfe3; border-radius: 8px; background: #fff; font-weight: 700; }
.ai-brain-proposal-actions button:last-child { border-color: #5e4bf4; background: #5e4bf4; color: #fff; }
.ai-brain-proposal-actions button:disabled { opacity: .55; cursor: wait; }
.ai-inline-error { color: #bb2f2f; margin-left: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.floating-zoom-control {
  position: fixed;
  left: calc(var(--sidebar-width) + 14px);
  bottom: 14px;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.94);
  border: 1px solid #d9dff2;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(27,35,77,0.16);
  padding: 6px 8px;
}

.app-shell.sidebar-collapsed .floating-zoom-control {
  left: calc(var(--sidebar-collapsed-width) + 14px);
}

.floating-zoom-control button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #d5dcf3; background: #fff; cursor: pointer; }
.floating-zoom-control #zoom-label { margin-left: 0; min-width: 44px; text-align: center; font-weight: 600; color: #5b6687; }

@media (max-width: 1300px) {
  .floating-zoom-control {
    left: 102px;
  }
}

.share-link-toast.share-link-popover {
  width: min(360px, calc(100vw - 16px));
  max-width: min(360px, calc(100vw - 16px));
}

.share-editor-panel {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
}

.share-editor-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.share-editor-heading strong {
  font-size: 12px;
}

.share-editor-heading span,
.share-editor-empty,
.share-editor-meta span {
  color: rgba(245, 247, 255, 0.68);
  font-size: 11px;
}

.share-editor-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-bottom: 8px;
}

.share-editor-form input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f7ff;
  padding: 7px 8px;
  font-size: 12px;
}

.share-editor-form input::placeholder {
  color: rgba(245, 247, 255, 0.52);
}

.share-editor-form button,
.share-editor-remove {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #f5f7ff;
  cursor: pointer;
  font-size: 12px;
  padding: 7px 9px;
}

.share-editor-form button:hover,
.share-editor-remove:hover {
  background: rgba(115, 148, 233, 0.24);
  border-color: rgba(185, 204, 255, 0.5);
}

.share-editor-list {
  display: grid;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.share-editor-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.share-editor-meta {
  display: grid;
  min-width: 0;
}

.share-editor-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.share-editor-remove {
  padding: 5px 7px;
  font-size: 11px;
}

.share-editor-status {
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 6px 7px;
  font-size: 11px;
}

.share-editor-status.success {
  background: rgba(84, 164, 117, 0.14);
  color: #bdf2cf;
}

.share-editor-status.error {
  background: rgba(201, 74, 74, 0.16);
  color: #ffc0c0;
}

.collab-cursor-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: visible;
}

.collab-cursor {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(25, 30, 70, 0.2));
  transition: transform 140ms ease-out, opacity 160ms ease-out;
  will-change: transform;
}

.collab-cursor-pointer {
  color: #6b4eff;
  font-size: 17px;
  line-height: 1;
  transform: translate(-2px, -1px) rotate(-18deg);
  text-shadow: 0 0 0 #fff, 0 1px 5px rgba(44, 37, 120, 0.22);
}

.collab-cursor-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 150px;
  margin-top: 12px;
  padding: 3px 7px 3px 4px;
  border: 1px solid rgba(107, 78, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #4c3cc4;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.collab-cursor-pill img,
.collab-cursor-initials {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.collab-cursor-pill img {
  object-fit: cover;
  border: 1px solid rgba(107, 78, 255, 0.16);
}

.collab-cursor-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #efeaff;
  color: #4f39db;
  font-size: 9px;
  font-weight: 900;
}

.collab-cursor-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
  .collab-cursor {
    transition: none;
  }
}

.node-comment-badge {
  position: relative;
  flex: 0 0 auto;
  z-index: 5;
  border: 1px solid rgba(107, 78, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #5b4bd9;
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  padding: 4px 7px;
  box-shadow: 0 4px 10px rgba(39, 45, 90, 0.08);
}

.node-comment-badge.has-comments {
  background: #f0edff;
  border-color: rgba(107, 78, 255, 0.32);
}

.node.comments-highlighted .postit {
  animation: postit-comment-focus 1.1s ease-out;
}

@keyframes postit-comment-focus {
  0% { box-shadow: 0 0 0 0 rgba(107, 78, 255, 0.28), 0 6px 14px rgba(0, 0, 0, 0.12); }
  45% { box-shadow: 0 0 0 8px rgba(107, 78, 255, 0.16), 0 8px 18px rgba(64, 56, 140, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(107, 78, 255, 0), 0 6px 14px rgba(0, 0, 0, 0.12); }
}

.postit.is-resolved {
  opacity: 0.58;
  filter: saturate(0.6);
}

.postit-avatar,
.postit-reply-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff8cf;
  color: #6d5c00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.58rem;
  font-weight: 900;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.postit-avatar img,
.postit-reply-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.postit-resolve,
.postit-reply-button {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.62rem;
  padding: 2px 6px;
}

.postit-reply {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 0.7rem;
}

.postit-reply-body {
  min-width: 0;
}

.postit-reply-body p {
  margin: 2px 0 0;
  white-space: pre-wrap;
}

.postit-reply-meta {
  color: rgba(0, 0, 0, 0.55);
  font-size: 0.62rem;
  font-weight: 700;
}

.node-comment-badge.has-unresolved {
  background: #ede8ff;
  border-color: rgba(107, 78, 255, 0.46);
  color: #4930d4;
  box-shadow: 0 0 0 3px rgba(107, 78, 255, 0.08), 0 4px 10px rgba(39, 45, 90, 0.08);
}

.node-comment-badge.has-unread {
  border-color: rgba(255, 138, 61, 0.48);
  background: #fff3e6;
  color: #9a4a0f;
}

.node-comment-badge.has-unread::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff8a3d;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(255, 138, 61, 0.18);
}

.node-comment-badge.has-recent::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #36c08b;
  border: 2px solid #fff;
}

.postit-resolved-summary {
  margin-top: 6px;
  border-top: 1px dashed rgba(0, 0, 0, 0.14);
  padding-top: 6px;
  color: rgba(0, 0, 0, 0.58);
  font-size: 0.68rem;
  line-height: 1.25;
}

.postit.is-resolved {
  min-height: 58px;
  max-height: 96px;
  overflow: hidden;
}

.postit.is-resolved .postit-color,
.postit.is-resolved .postit-delete {
  opacity: 0.72;
}

.postit-replies {
  display: grid;
  gap: 6px;
}

.postit-reply-editor {
  border-top: 1px dashed rgba(0, 0, 0, 0.14);
  padding-top: 6px;
}

.postit-reply-editor button {
  justify-self: end;
}

.presence-avatar {
  appearance: none;
  padding: 0;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.presence-avatar:disabled {
  cursor: default;
}

.presence-avatar:not(:disabled):hover,
.presence-avatar.is-following {
  transform: translateY(-1px) scale(1.08);
  box-shadow: 0 0 0 2px rgba(107, 78, 255, 0.22), 0 6px 14px rgba(34, 44, 90, 0.18);
}

.node-presence-avatar.is-clickable,
.node-editing-avatar.is-clickable {
  cursor: pointer;
}

.collab-follow-menu {
  position: fixed;
  z-index: 1200;
  display: grid;
  gap: 6px;
  min-width: 160px;
  padding: 8px;
  border: 1px solid rgba(216, 222, 244, 0.96);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(31, 38, 84, 0.18);
  color: #26315c;
}

.collab-follow-menu strong {
  padding: 0 4px 2px;
  font-size: 0.74rem;
}

.collab-follow-menu button {
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f6f7ff;
  color: #4651a8;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 7px 8px;
  text-align: left;
}

.collab-follow-menu button:hover {
  border-color: rgba(107, 78, 255, 0.22);
  background: #eeecff;
}

.collab-follow-indicator {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(107, 78, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(31, 38, 84, 0.18);
  color: #4738bd;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 7px 8px 7px 12px;
}

.collab-follow-indicator button {
  border: 1px solid rgba(107, 78, 255, 0.18);
  border-radius: 999px;
  background: #f1efff;
  color: #4b3bc4;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 4px 9px;
}

.collab-focus-pulse {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 18px;
  min-height: 18px;
  transform-origin: center;
  border: 2px solid rgba(107, 78, 255, 0.44);
  border-radius: 999px;
  color: #4b3bc4;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 18px 10px 0;
  pointer-events: none;
  white-space: nowrap;
  animation: collab-focus-pulse 1.5s ease-out both;
}

@keyframes collab-focus-pulse {
  0% { opacity: 0; transform: translate(var(--focus-x, 0), var(--focus-y, 0)) scale(0.6); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--focus-x, 0), var(--focus-y, 0)) scale(2.5); }
}

.topbar .presence-lite .presence-avatars {
  align-items: center;
  gap: 3px;
  flex-direction: row-reverse;
  overflow: visible;
}

.topbar .presence-lite .presence-avatar {
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  flex: 0 0 24px;
  margin-left: 0;
  padding: 0;
  border-width: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  line-height: 1;
  vertical-align: middle;
  text-align: center;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  opacity: 1;
}

.topbar .presence-lite .presence-avatar img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
  flex: 0 0 auto;
}

.topbar .presence-lite .presence-avatar:not(:disabled):hover,
.topbar .presence-lite .presence-avatar.is-following {
  transform: translateY(-1px) scale(1.06);
}

.board-access-chip.owner {
  border-color: rgba(84, 164, 117, 0.28);
  background: #eefaf4;
  color: #2f7c56;
}

.board-access-chip.editor {
  border-color: rgba(107, 78, 255, 0.24);
  background: #f1efff;
  color: #4b3bc4;
}

.board-access-chip.viewer {
  border-color: rgba(234, 179, 8, 0.28);
  background: #fff8df;
  color: #84620d;
}

.board-access-chip.unowned {
  border-color: rgba(91, 102, 135, 0.22);
  background: #f5f7fb;
  color: #59647e;
}

.share-editor-role {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(185, 204, 255, 0.14);
  padding: 2px 6px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.node-owner-chip,
.node-owner-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(107, 78, 255, 0.16);
  border-radius: 999px;
  background: #f6f3ff;
  color: #4f45ad;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  padding: 3px 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.node-owner-chip {
  flex: 0 1 auto;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-owner-chip span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-owner-chip.hidden {
  display: none !important;
}

.node-owner-avatar {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8e3ff;
  color: #4f45ad;
  font-size: 0.5rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.node-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.node-owner-display {
  flex: 0 0 auto;
  max-width: 150px;
  color: #4f5a7f;
  background: #f7f8ff;
  border-color: #e0e5f7;
}

.node-owner-display span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-owner-display.is-unassigned {
  color: #858ba3;
  background: #fafbff;
}

.node-summary-owner {
  justify-self: end;
}

.node.is-compact .node-owner-chip {
  max-width: 82px;
  padding-inline: 5px;
}

.brand-dna-card {
  border: 1px solid #dcd7ff;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f1ff 58%, #fff8ec 100%);
  box-shadow: 0 12px 30px rgba(73, 61, 171, 0.12);
  color: #293054;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.brand-dna-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.brand-dna-header h2 {
  color: #312a78;
  font-size: 1.45rem;
  line-height: 1.1;
  margin: 4px 0 6px;
}

.brand-dna-header p,
.brand-dna-empty,
.brand-dna-block p,
.brand-dna-signals p {
  color: #626982;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
}

.brand-dna-eyebrow {
  background: #ebe7ff;
  border-radius: 999px;
  color: #6554f1;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 9px;
  text-transform: uppercase;
}

.brand-dna-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 220px;
}

.brand-dna-loading,
.brand-dna-empty {
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed #cfc8ff;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.brand-dna-loading {
  color: #6554f1;
  font-size: 0.85rem;
  font-weight: 800;
}

.brand-dna-result {
  display: grid;
  gap: 12px;
}

.brand-dna-score-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.brand-dna-score {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #e5e1ff;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.brand-dna-score.primary {
  border-color: #b9afff;
  box-shadow: inset 0 0 0 1px #d8d2ff;
}

.brand-dna-score span {
  color: #7d85a4;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-dna-score strong {
  color: #312a78;
  font-size: 1.22rem;
}

.brand-dna-score em {
  color: #6554f1;
  font-style: normal;
  font-weight: 900;
}

.brand-dna-block {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid #ece9ff;
  border-radius: 14px;
  padding: 12px;
}

.brand-dna-block h4,
.brand-dna-signals h5 {
  color: #4b429c;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.brand-dna-signals {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.brand-dna-signals > div {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid #ece9ff;
  border-radius: 12px;
  padding: 10px;
}

.brand-dna-signals ul,
.brand-dna-alternatives {
  color: #49506d;
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0;
  padding-left: 16px;
}

.brand-dna-alternatives li {
  margin-bottom: 6px;
}

.brand-dna-alternatives span {
  color: #68708c;
  display: block;
  font-size: 0.76rem;
  margin-top: 2px;
}


.brand-dna-avatar-section {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #dcd7ff;
  border-radius: 16px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.brand-dna-avatar-copy h3 {
  color: #312a78;
  font-size: 1.08rem;
  margin: 8px 0 4px;
}

.brand-dna-avatar-copy p {
  color: #626982;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
}

.brand-dna-avatar-preview {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.brand-dna-avatar-image {
  background: #fff;
  border: 1px solid #d8d2ff;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(73, 61, 171, 0.14);
  cursor: pointer;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}

.brand-dna-avatar-image:hover {
  border-color: var(--fk-color-primary);
  box-shadow: var(--fk-shadow-md);
  transform: translateY(-1px);
}

.brand-dna-avatar-image:active {
  box-shadow: var(--fk-shadow-sm);
  transform: translateY(0);
}

.brand-dna-avatar-image:focus-visible {
  border-color: var(--fk-color-primary);
  outline: var(--fk-space-1) solid var(--fk-color-primary-soft);
  outline-offset: var(--fk-space-1);
}

.brand-dna-avatar-image img {
  aspect-ratio: 1;
  display: block;
  height: 132px;
  object-fit: cover;
  width: 132px;
}

.brand-dna-avatar-details {
  color: #626982;
  display: grid;
  font-size: 0.82rem;
  gap: 6px;
  line-height: 1.45;
  min-width: 0;
}

.brand-dna-avatar-details strong {
  color: #312a78;
  font-size: 0.95rem;
}

.brand-dna-avatar-details details {
  background: rgba(244, 241, 255, 0.72);
  border: 1px solid #ece9ff;
  border-radius: 12px;
  padding: 8px 10px;
}

.brand-dna-avatar-details summary {
  color: #5f52cf;
  cursor: pointer;
  font-weight: 800;
}

.brand-dna-avatar-details p {
  color: #626982;
  margin: 8px 0 0;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
}

.brand-dna-avatar-actions {
  justify-content: flex-start;
  min-width: 0;
}

@media (max-width: 1180px) {
  .brand-dna-header,
  .brand-dna-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .brand-dna-actions {
    justify-content: flex-start;
    min-width: 0;
  }
  .brand-dna-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brand-dna-avatar-preview {
    flex-direction: column;
  }
}

.campaign-builder-overlay,
.campaign-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(23, 28, 48, 0.42);
  backdrop-filter: blur(8px);
}

.campaign-builder-modal,
.campaign-loading-card {
  width: min(680px, 96vw);
  max-height: 92vh;
  overflow: auto;
}

.campaign-loading-card {
  background: #fff;
  border: 1px solid rgba(107, 124, 180, 0.18);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(28, 37, 75, 0.28);
}

.campaign-builder-modal {
  gap: var(--fk-space-4);
}

.campaign-builder-hero {
  gap: var(--fk-space-2);
}

.campaign-builder-kicker {
  margin-bottom: var(--fk-space-1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.campaign-builder-hero h3 {
  margin: 0;
  color: #232b4d;
  font-size: 1.18rem;
}

.campaign-builder-hero p,
.campaign-builder-field span,
.campaign-builder-card > span,
.campaign-builder-toggle small {
  color: #697292;
}

.campaign-builder-hero p {
  margin: 7px 0 0;
  line-height: 1.4;
}

.campaign-builder-status,
.campaign-builder-error {
  min-height: 1.4em;
  margin: 0;
  font-weight: var(--fk-font-weight-bold);
}

.campaign-builder-status {
  color: var(--fk-color-primary);
}

.campaign-builder-error {
  color: var(--fk-color-danger);
}

.campaign-builder-field {
  display: grid;
  gap: var(--fk-space-2);
  font-weight: var(--fk-font-weight-bold);
}

.campaign-builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fk-space-3);
}

.campaign-builder-card {
  display: grid;
  gap: var(--fk-space-2);
}

.campaign-stepper {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 8px;
  align-items: center;
}

.campaign-stepper button {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  font-weight: var(--fk-font-weight-bold);
}

.campaign-stepper input {
  width: 100%;
  height: 38px;
  text-align: center;
  font-weight: var(--fk-font-weight-bold);
}

.campaign-builder-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.campaign-builder-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--fk-color-primary);
}

.campaign-builder-toggle span {
  display: grid;
  gap: 2px;
}

.campaign-estimate-output {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.campaign-estimate-output div {
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e6eaf7;
  padding: 8px;
  display: grid;
  gap: 2px;
}

.campaign-estimate-output strong {
  color: #26304f;
  font-size: 1rem;
}

.campaign-estimate-output span {
  color: #697292;
  font-size: 0.72rem;
}

.campaign-estimate-output p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: #4d5a8f;
  font-weight: 800;
}

.campaign-builder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.campaign-loading-overlay {
  pointer-events: auto;
  transition: opacity 260ms ease, transform 260ms ease;
}

.campaign-loading-overlay.is-exiting {
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
}

.campaign-loading-card {
  width: min(430px, 94vw);
  padding: 22px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
}

.campaign-loading-avatar {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff, #eaf9ff);
  border: 1px solid #dfe6ff;
  box-shadow: 0 12px 28px rgba(81, 103, 216, 0.18);
  overflow: hidden;
  animation: campaignAvatarPulse 1.6s ease-in-out infinite;
}

.campaign-loading-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campaign-loading-avatar span {
  font-size: 2.2rem;
}

.campaign-loading-copy strong {
  color: #232b4d;
  font-size: 1.05rem;
}

.campaign-loading-copy p {
  margin: 5px 0 0;
  color: #697292;
  font-size: 0.82rem;
}

.campaign-loading-steps {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
  text-align: left;
}

.campaign-loading-steps li {
  border-radius: 12px;
  padding: 9px 10px;
  color: #7a829f;
  background: #f7f9ff;
  border: 1px solid #edf0fa;
  font-weight: 700;
}

.campaign-loading-steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  margin-right: 6px;
  color: #7b86aa;
}

.campaign-loading-steps li.is-active {
  color: #3140a0;
  border-color: rgba(81, 103, 216, 0.26);
  background: #eef3ff;
}

.campaign-loading-steps li.is-active span {
  animation: campaignStepBlink 900ms ease-in-out infinite;
}

.campaign-loading-steps li.is-done {
  color: #247357;
  background: #effaf4;
  border-color: rgba(54, 192, 139, 0.22);
}

.campaign-loading-steps li.is-done span {
  color: #28a66f;
}

@keyframes campaignAvatarPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 12px 28px rgba(81, 103, 216, 0.18); }
  50% { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(81, 103, 216, 0.28); }
}

@keyframes campaignStepBlink {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 1; }
}

@media (max-width: 720px) {
  .campaign-builder-grid,
  .campaign-estimate-output {
    grid-template-columns: 1fr;
  }
}

.campaign-v3-creation-modal {
  width: min(620px, 96vw);
  padding: 24px;
  overflow: hidden;
}

.campaign-v3-creation-shell,
.campaign-v3-complete-shell,
.campaign-v3-error-shell {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.campaign-v3-avatar-wrap {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
}

.campaign-v3-avatar-orbit {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 28%),
    conic-gradient(from 120deg, rgba(126, 95, 255, 0.16), rgba(54, 192, 139, 0.28), rgba(88, 188, 255, 0.2), rgba(126, 95, 255, 0.16));
  filter: blur(0.2px);
  animation: campaignV3OrbitGlow 4.8s linear infinite;
}

.campaign-v3-avatar {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-size: 2.2rem;
  background: linear-gradient(135deg, #5368ff, #7d5cff 52%, #35c18b);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 44px rgba(81, 103, 216, 0.28), 0 0 32px rgba(54, 192, 139, 0.2);
  animation: campaignV3AvatarFloat 2.8s ease-in-out infinite;
}

.campaign-v3-avatar::after {
  content: "";
  position: absolute;
  inset: 12px 18px auto auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.86);
  animation: campaignV3AvatarBlink 3.4s ease-in-out infinite;
}

.campaign-v3-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campaign-v3-creation-copy h3,
.campaign-v3-complete-shell h3,
.campaign-v3-error-shell h3 {
  margin: 0;
  color: #222a4c;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.campaign-v3-creation-copy p,
.campaign-v3-complete-shell p,
.campaign-v3-error-shell p {
  margin: 6px auto 0;
  max-width: 460px;
  color: #65708f;
  line-height: 1.5;
}

.campaign-v3-creation-copy small {
  display: inline-flex;
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #50609c;
  background: #f2f5ff;
  border: 1px solid #e2e8ff;
  font-weight: 800;
}

.campaign-v3-progress-steps,
.campaign-v3-summary-list {
  width: 100%;
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 4px 0 0;
  list-style: none;
  text-align: left;
}

.campaign-v3-progress-steps li,
.campaign-v3-summary-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 15px;
  padding: 11px 13px;
  color: #7a829f;
  background: #f7f9ff;
  border: 1px solid #edf0fa;
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.campaign-v3-progress-steps li span,
.campaign-v3-summary-list li span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #8993b5;
  background: #fff;
  border: 1px solid #e3e8f7;
  font-size: 0.8rem;
}

.campaign-v3-progress-steps li.is-active {
  color: #2e3d9e;
  border-color: rgba(81, 103, 216, 0.28);
  background: linear-gradient(135deg, #eef3ff, #f8fbff);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(81, 103, 216, 0.1);
}

.campaign-v3-progress-steps li.is-active span {
  color: #5167d8;
  animation: campaignV3StepPulse 900ms ease-in-out infinite;
}

.campaign-v3-progress-steps li.is-done,
.campaign-v3-summary-list li {
  color: #237456;
  background: #f0fbf5;
  border-color: rgba(54, 192, 139, 0.24);
}

.campaign-v3-progress-steps li.is-done span,
.campaign-v3-summary-list li span {
  color: #fff;
  background: #2bb979;
  border-color: #2bb979;
}

.campaign-v3-complete-mark,
.campaign-v3-error-mark {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 900;
}

.campaign-v3-complete-mark {
  color: #fff;
  background: linear-gradient(135deg, #28b978, #5bd89e);
  box-shadow: 0 18px 42px rgba(43, 185, 121, 0.28);
  animation: campaignV3CompletePop 520ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.campaign-v3-error-mark {
  color: #b63b3b;
  background: #fff2f2;
  border: 1px solid #ffd7d7;
}

.campaign-v3-complete-actions,
.campaign-v3-error-actions {
  width: 100%;
  margin-top: 4px;
}

@keyframes campaignV3AvatarFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.02); }
}

@keyframes campaignV3OrbitGlow {
  to { transform: rotate(360deg); }
}

@keyframes campaignV3AvatarBlink {
  0%, 86%, 100% { opacity: 0.9; transform: scaleY(1); }
  90% { opacity: 0.45; transform: scaleY(0.25); }
}

@keyframes campaignV3StepPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes campaignV3CompletePop {
  from { opacity: 0; transform: scale(0.72); }
  to { opacity: 1; transform: scale(1); }
}

/* Campaign V3 premium generation refinements: scoped to the in-modal creation experience. */
.campaign-v3-creation-modal .campaign-v3-avatar-wrap {
  margin-top: 2px;
  isolation: isolate;
}

.campaign-v3-creation-modal .campaign-v3-avatar-wrap::before,
.campaign-v3-creation-modal .campaign-v3-avatar-wrap::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.campaign-v3-creation-modal .campaign-v3-avatar-wrap::before {
  inset: -12px;
  background: radial-gradient(circle, rgba(126, 95, 255, 0.18), transparent 66%);
  animation: campaignV3AuraBreathe 2.9s ease-in-out infinite;
}

.campaign-v3-creation-modal .campaign-v3-avatar-wrap::after {
  inset: 22px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 0 34px rgba(126, 95, 255, 0.24);
}

.campaign-v3-avatar-fallback {
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
  letter-spacing: -0.04em;
}

.campaign-v3-avatar-fallback strong {
  font-size: 2rem;
  color: #fff;
}

.campaign-v3-avatar-fallback small {
  margin-top: -4px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.82);
}

.campaign-v3-live-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 12px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #4253b6;
  background: linear-gradient(135deg, #f0f3ff, #f8fbff);
  border: 1px solid rgba(81, 103, 216, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  font-size: 0.86rem;
  font-weight: 900;
}

.campaign-v3-live-status::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: #36c08b;
  box-shadow: 0 0 12px rgba(54, 192, 139, 0.7);
  animation: campaignV3WorkingDot 1.2s ease-in-out infinite;
}

.campaign-v3-creation-modal .campaign-v3-progress-steps {
  margin-top: 8px;
}

.campaign-v3-creation-modal .campaign-v3-progress-steps li {
  min-height: 48px;
}

.campaign-v3-creation-modal .campaign-v3-progress-steps li.is-active strong::after {
  content: "";
  display: inline-block;
  width: 1.3em;
  text-align: left;
  animation: campaignV3WorkingDots 1.3s steps(4, end) infinite;
}

.campaign-v3-creation-modal .campaign-v3-summary-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 0;
  margin: 8px 0 0;
  list-style: none;
}

.campaign-v3-creation-modal .campaign-v3-summary-chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #227354;
  background: linear-gradient(135deg, #effbf5, #f8fffb);
  border: 1px solid rgba(54, 192, 139, 0.22);
  box-shadow: 0 8px 22px rgba(54, 192, 139, 0.08);
  font-size: 0.82rem;
  font-weight: 900;
}

.campaign-v3-creation-modal .campaign-v3-summary-chips li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #fff;
  background: #2bb979;
  font-size: 0.72rem;
}

.campaign-v3-avatar-check {
  position: absolute;
  right: 8px;
  bottom: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #27b978, #5bd89e);
  border: 3px solid #fff;
  box-shadow: 0 12px 28px rgba(43, 185, 121, 0.3);
  font-weight: 900;
  animation: campaignV3CompletePop 520ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.campaign-v3-creation-modal .campaign-v3-primary-button,
.campaign-v3-creation-modal .campaign-v3-secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  min-height: 46px;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background 160ms ease;
}

.campaign-v3-creation-modal .campaign-v3-primary-button {
  min-width: 190px;
  color: #fff;
  background: linear-gradient(135deg, #5368ff 0%, #7d5cff 58%, #8e6cff 100%);
  box-shadow: 0 16px 34px rgba(83, 104, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.campaign-v3-creation-modal .campaign-v3-secondary-button {
  color: #4e5b8f;
  background: #f4f6ff;
  border: 1px solid #dfe5fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.campaign-v3-creation-modal .campaign-v3-primary-button:hover,
.campaign-v3-creation-modal .campaign-v3-secondary-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}

.campaign-v3-creation-modal .campaign-v3-primary-button:hover {
  box-shadow: 0 20px 42px rgba(83, 104, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.campaign-v3-creation-modal .campaign-v3-primary-button:active,
.campaign-v3-creation-modal .campaign-v3-secondary-button:active {
  transform: translateY(1px) scale(0.99);
}

.campaign-v3-creation-modal .campaign-v3-primary-button:focus-visible,
.campaign-v3-creation-modal .campaign-v3-secondary-button:focus-visible {
  outline: 3px solid rgba(83, 104, 255, 0.24);
  outline-offset: 3px;
}

@keyframes campaignV3AuraBreathe {
  0%, 100% { opacity: 0.62; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes campaignV3WorkingDot {
  0%, 100% { opacity: 0.48; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes campaignV3WorkingDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

/* Campaign V3 generation-only spacing and pacing polish. */
.campaign-v3-creation-modal {
  padding: 32px 26px 26px;
  overflow: auto;
}

.campaign-v3-creation-modal .campaign-v3-creation-shell {
  gap: 14px;
  padding-top: 8px;
}

.campaign-v3-creation-modal .campaign-v3-creation-shell .campaign-v3-avatar-wrap:not(.is-complete) {
  width: 98px;
  height: 98px;
  margin-top: 6px;
}

.campaign-v3-creation-modal .campaign-v3-creation-shell .campaign-v3-avatar-wrap:not(.is-complete) .campaign-v3-avatar {
  width: 72px;
  height: 72px;
  font-size: 1.8rem;
  box-shadow: 0 14px 34px rgba(81, 103, 216, 0.24), 0 0 26px rgba(54, 192, 139, 0.18);
}

.campaign-v3-creation-modal .campaign-v3-creation-shell .campaign-v3-avatar-wrap:not(.is-complete)::before {
  inset: -8px;
}

.campaign-v3-creation-modal .campaign-v3-creation-shell .campaign-v3-avatar-wrap:not(.is-complete)::after {
  inset: 18px;
}

.campaign-v3-creation-modal .campaign-v3-creation-copy h3 {
  margin-top: 2px;
}

.campaign-v3-creation-modal .campaign-v3-progress-steps {
  margin-top: 12px;
}

.campaign-v3-creation-modal .campaign-v3-complete-shell {
  padding-top: 4px;
}

/* Home Dashboard Shell */
#dashboard-view.dashboard-view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: clamp(24px, 4vw, 56px);
  background:
    radial-gradient(circle at top left, rgba(103, 83, 255, 0.10), transparent 34%),
    linear-gradient(180deg, #f7f7fb 0%, var(--fk-color-bg) 42%, var(--fk-color-bg) 100%);
  box-sizing: border-box;
}

#dashboard-view .mission-control {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}

#dashboard-view .mission-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--fk-space-5);
  align-items: center;
  min-height: 220px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgba(102, 82, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(246, 244, 255, 0.88)),
    var(--fk-color-surface);
  box-shadow: 0 24px 70px rgba(32, 29, 72, 0.10);
}

#dashboard-view .mission-avatar {
  width: 74px;
  height: 74px;
  border-radius: 28px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #1f2440, #6c5cff);
  color: #fff;
  box-shadow: 0 16px 36px rgba(67, 56, 202, 0.24);
}

#dashboard-view .mission-avatar span {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.08em;
}

#dashboard-view .mission-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

#dashboard-view .mission-hero-copy {
  display: grid;
}

#dashboard-view .mission-hero h1 {
  margin: 0;
  color: var(--fk-color-heading);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

#dashboard-view .mission-hero p {
  max-width: 650px;
  margin: 0;
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-md);
  line-height: 1.65;
}

#dashboard-view .mission-hero p.dashboard-hero-briefing {
  display: grid;
  gap: 8px;
}

#dashboard-view .dashboard-hero-focus-line {
  white-space: pre-line;
}

#dashboard-view .dashboard-hero-mission-insight {
  color: var(--fk-color-heading);
  font-weight: var(--fk-font-weight-semibold);
}

#dashboard-view .mission-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fk-space-2);
  justify-content: flex-end;
}

#dashboard-view .dashboard-kicker {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#dashboard-view .dashboard-continue-working {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: var(--fk-space-5);
  align-items: stretch;
  border-color: rgba(102, 82, 255, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 54px rgba(27, 31, 59, 0.08);
}

#dashboard-view .dashboard-continue-copy {
  display: grid;
  gap: var(--fk-space-3);
  align-content: start;
}

#dashboard-view .dashboard-continue-action {
  margin: 0;
  max-width: 620px;
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-md);
  line-height: 1.55;
}

#dashboard-view .dashboard-campaign-summary {
  display: grid;
  gap: var(--fk-space-3);
  padding-top: var(--fk-space-2);
}

#dashboard-view .dashboard-campaign-summary-label {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#dashboard-view .dashboard-campaign-summary p {
  margin: 0;
  max-width: 640px;
  color: var(--fk-color-heading);
  font-size: var(--fk-font-size-md);
  line-height: 1.6;
}

#dashboard-view .dashboard-campaign-summary-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--fk-space-3);
  margin: var(--fk-space-2) 0 0;
}

#dashboard-view .dashboard-campaign-summary-fields div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: var(--fk-space-3);
  border: 1px solid rgba(102, 82, 255, 0.14);
  border-radius: var(--fk-radius-lg);
  background: rgba(255, 255, 255, 0.72);
}

#dashboard-view .dashboard-campaign-summary-fields dt {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dashboard-view .dashboard-campaign-summary-fields dd {
  margin: 0;
  color: var(--fk-color-heading);
  font-size: var(--fk-font-size-sm);
  font-weight: var(--fk-font-weight-semibold);
  overflow-wrap: anywhere;
}

#dashboard-view .dashboard-campaign-health {
  display: grid;
  gap: var(--fk-space-4);
  min-width: 0;
}

#dashboard-view .dashboard-campaign-progress,
#dashboard-view .dashboard-campaign-health-section {
  display: grid;
  gap: var(--fk-space-3);
  padding: var(--fk-space-4);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-xl);
  background: var(--fk-color-surface-muted);
}

#dashboard-view .dashboard-campaign-progress-header,
#dashboard-view .dashboard-campaign-updated {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fk-space-3);
}

#dashboard-view .dashboard-campaign-progress-header span,
#dashboard-view .dashboard-campaign-health-section > span,
#dashboard-view .dashboard-campaign-updated {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dashboard-view .dashboard-campaign-progress-header strong {
  color: var(--fk-color-heading);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1;
}

#dashboard-view .dashboard-campaign-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(102, 82, 255, 0.12);
}

#dashboard-view .dashboard-campaign-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6c5cff, #16a47b);
  transition: width 180ms ease;
}

#dashboard-view .dashboard-campaign-progress p,
#dashboard-view .dashboard-campaign-empty-note {
  margin: 0;
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-sm);
}

#dashboard-view .dashboard-campaign-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fk-space-3);
}

#dashboard-view .dashboard-campaign-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#dashboard-view .dashboard-campaign-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(102, 82, 255, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-medium);
}

#dashboard-view .dashboard-campaign-chip strong {
  color: var(--fk-color-heading);
  font-size: var(--fk-font-size-sm);
}

#dashboard-view .dashboard-campaign-chip-list.is-kpi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#dashboard-view .dashboard-campaign-chip-list.is-kpi .dashboard-campaign-chip {
  display: grid;
  align-items: start;
  gap: 4px;
  min-height: 74px;
  padding: var(--fk-space-3);
  border-radius: var(--fk-radius-lg);
}

#dashboard-view .dashboard-campaign-chip-list.is-kpi .dashboard-campaign-chip::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: rgba(32, 35, 54, 0.16);
}

#dashboard-view .dashboard-campaign-chip-list.is-kpi .dashboard-campaign-chip[data-bucket="completed"]::before {
  background: rgba(22, 164, 123, 0.82);
}

#dashboard-view .dashboard-campaign-chip-list.is-kpi .dashboard-campaign-chip[data-bucket="inReview"]::before {
  background: rgba(216, 150, 26, 0.78);
}

#dashboard-view .dashboard-campaign-chip-list.is-kpi .dashboard-campaign-chip[data-bucket="needsChanges"]::before {
  background: rgba(221, 83, 83, 0.72);
}

#dashboard-view .dashboard-campaign-chip-list.is-kpi .dashboard-campaign-chip strong {
  font-size: 1.45rem;
  line-height: 1;
}

#dashboard-view .dashboard-campaign-updated {
  justify-content: flex-start;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

#dashboard-view .dashboard-campaign-updated strong {
  color: var(--fk-color-heading);
}

#dashboard-view .dashboard-continue-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fk-space-3);
}

#dashboard-view .dashboard-continue-stat {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: var(--fk-space-3);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  background: var(--fk-color-surface-muted);
}

#dashboard-view .dashboard-continue-stat span,
#dashboard-view .dashboard-continue-context {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dashboard-view .dashboard-continue-stat strong {
  color: var(--fk-color-heading);
  font-size: var(--fk-font-size-md);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#dashboard-view .dashboard-continue-footer {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: var(--fk-space-3);
  padding-top: var(--fk-space-2);
  border-top: 1px solid var(--fk-color-border);
}

#dashboard-view .dashboard-continue-context {
  text-transform: none;
  letter-spacing: 0;
}

#dashboard-view .dashboard-continue-stat.hidden {
  display: none;
}

#dashboard-view .dashboard-continue-working.is-empty {
  grid-template-columns: 1fr;
  gap: var(--fk-space-4);
}

#dashboard-view .dashboard-continue-working.is-empty .dashboard-continue-meta {
  display: none;
}

#dashboard-view .dashboard-continue-working.is-empty .dashboard-continue-footer {
  grid-column: 1;
}

#dashboard-view .mission-two-column,
#dashboard-view .mission-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fk-space-5);
  align-items: stretch;
}

#dashboard-view .mission-support-grid {
  margin-top: var(--fk-space-4);
  padding-top: var(--fk-space-4);
  border-top: 1px solid var(--fk-color-border);
}

#dashboard-view .mission-card,
#dashboard-view .mission-focus {
  min-width: 0;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: var(--fk-shadow-sm);
}

#dashboard-view .dashboard-card-title {
  margin: 0;
  max-width: 620px;
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-md);
  line-height: 1.55;
}

#dashboard-view .dashboard-continue-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fk-space-3);
}

#dashboard-view .dashboard-continue-stat {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: var(--fk-space-3);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  background: var(--fk-color-surface-muted);
}

#dashboard-view .dashboard-continue-stat span,
#dashboard-view .dashboard-continue-context {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dashboard-view .dashboard-continue-stat strong {
  color: var(--fk-color-heading);
  font-size: var(--fk-font-size-md);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#dashboard-view .mission-card-body,
#dashboard-view .mission-opportunities,
#dashboard-view .mission-focus-list,
#dashboard-view .mission-activity-list {
  display: grid;
  gap: var(--fk-space-3);
}

#dashboard-view .mission-callout,
#dashboard-view .mission-opportunities article,
#dashboard-view .mission-focus-list article,
#dashboard-view .mission-activity-list span {
  display: grid;
  gap: 6px;
  padding: var(--fk-space-3);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-heading);
}

#dashboard-view .mission-card-body,
#dashboard-view .mission-opportunities,
#dashboard-view .mission-focus-list,
#dashboard-view .mission-activity-list {
  display: grid;
  gap: var(--fk-space-3);
}

#dashboard-view .mission-callout,
#dashboard-view .mission-opportunities article,
#dashboard-view .mission-focus-list article,
#dashboard-view .mission-activity-list span {
  display: grid;
  gap: 6px;
  padding: var(--fk-space-3);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-heading);
}

#dashboard-view .mission-callout span,
#dashboard-view .mission-focus-list span,
#dashboard-view .mission-opportunities span {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-sm);
}

#dashboard-view .mission-card-body,
#dashboard-view .mission-opportunities,
#dashboard-view .mission-focus-list,
#dashboard-view .mission-activity-list {
  display: grid;
  gap: var(--fk-space-3);
}

#dashboard-view .mission-callout,
#dashboard-view .mission-opportunities article,
#dashboard-view .mission-focus-list article,
#dashboard-view .mission-activity-list span {
  display: grid;
  gap: 6px;
  padding: var(--fk-space-3);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-heading);
}

#dashboard-view .mission-callout span,
#dashboard-view .mission-focus-list span,
#dashboard-view .mission-opportunities span {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-sm);
}

#dashboard-view .mission-card-body,
#dashboard-view .mission-opportunities,
#dashboard-view .mission-focus-list,
#dashboard-view .mission-activity-list {
  display: grid;
  gap: var(--fk-space-3);
}

#dashboard-view .mission-callout,
#dashboard-view .mission-opportunities article,
#dashboard-view .mission-focus-list article,
#dashboard-view .mission-activity-list span {
  display: grid;
  gap: 6px;
  padding: var(--fk-space-3);
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-heading);
}

#dashboard-view .mission-callout span,
#dashboard-view .mission-focus-list span,
#dashboard-view .mission-opportunities span {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-sm);
}

#dashboard-view .mission-muted {
  margin: 0;
  color: var(--fk-color-muted);
  line-height: 1.6;
}

#dashboard-view .mission-empty-state {
  padding: var(--fk-space-3);
  border: 1px dashed var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-heading);
  cursor: pointer;
}

#dashboard-view .dashboard-brand-pill:hover,
#dashboard-view .dashboard-focus-action:hover {
  border-color: var(--fk-color-primary-soft);
  background: rgba(102, 82, 255, 0.08);
}

#dashboard-view .dashboard-focus-action {
  cursor: pointer;
}

#dashboard-view .dashboard-focus-action:focus-visible,
#dashboard-view .dashboard-brand-pill:focus-visible {
  outline: 2px solid var(--fk-color-primary);
  outline-offset: 2px;
}

#dashboard-view .mission-empty-state p {
  margin: 0;
  line-height: 1.6;
}

#dashboard-view .dashboard-brand-missing {
  display: grid;
  gap: var(--fk-space-2);
}

#dashboard-view .dashboard-brand-missing > span {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dashboard-view .dashboard-brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fk-space-2);
}

#dashboard-view .dashboard-brand-pill {
  border-color: var(--fk-color-border);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-heading);
  cursor: pointer;
}

#dashboard-view .dashboard-brand-pill:hover,
#dashboard-view .dashboard-focus-action:hover {
  border-color: var(--fk-color-primary-soft);
  background: rgba(102, 82, 255, 0.08);
}

#dashboard-view .dashboard-focus-action {
  cursor: pointer;
}

#dashboard-view .dashboard-focus-action:focus-visible,
#dashboard-view .dashboard-brand-pill:focus-visible {
  outline: 2px solid var(--fk-color-primary);
  outline-offset: 2px;
}

#dashboard-view .mission-empty-state p {
  margin: 0;
  line-height: 1.6;
}

#dashboard-view .dashboard-brand-missing {
  display: grid;
  gap: var(--fk-space-2);
}

#dashboard-view .dashboard-brand-missing > span {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
  font-weight: var(--fk-font-weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dashboard-view .dashboard-brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fk-space-2);
}

#dashboard-view .dashboard-brand-pill {
  border-color: var(--fk-color-border);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-heading);
  cursor: pointer;
}

#dashboard-view .dashboard-brand-pill:hover,
#dashboard-view .dashboard-focus-action:hover {
  border-color: var(--fk-color-primary-soft);
  background: rgba(102, 82, 255, 0.08);
}

#dashboard-view .dashboard-focus-action {
  cursor: pointer;
}

#dashboard-view .dashboard-focus-action:focus-visible,
#dashboard-view .dashboard-brand-pill:focus-visible {
  outline: 2px solid var(--fk-color-primary);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  #dashboard-view.dashboard-view {
    padding: var(--fk-space-4);
  }

  #dashboard-view .mission-hero,
  #dashboard-view .dashboard-continue-working,
  #dashboard-view .mission-two-column,
  #dashboard-view .mission-support-grid {
    grid-template-columns: 1fr;
  }

  #dashboard-view .mission-hero-actions {
    justify-content: flex-start;
  }

  #dashboard-view .dashboard-continue-meta,
  #dashboard-view .dashboard-campaign-health-grid,
  #dashboard-view .dashboard-campaign-summary-fields {
    grid-template-columns: 1fr;
  }

  #dashboard-view .dashboard-continue-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Inspector Image Controls Foundation */
.inspector #content-upload-fields,
.inspector #content-format-field {
  display: grid;
  gap: var(--fk-space-2);
}

.inspector #content-upload-fields.hidden,
.inspector #content-format-field.hidden {
  display: none;
}

.inspector #node-image-upload.fk-input {
  padding: var(--fk-space-2);
  cursor: pointer;
}

.inspector #node-image-upload.fk-input::file-selector-button {
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-pill);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-heading);
  font: inherit;
  font-weight: var(--fk-font-weight-medium);
  padding: 6px 10px;
  margin-right: var(--fk-space-3);
  cursor: pointer;
}

.inspector #node-image-upload.fk-input::file-selector-button:hover {
  border-color: var(--fk-color-primary-soft);
  background: var(--fk-color-primary-soft);
}

.inspector .inspector-image-list {
  margin-top: var(--fk-space-3);
  gap: var(--fk-space-3);
}

.inspector .inspector-image-item.fk-card {
  gap: var(--fk-space-2);
  border-color: var(--fk-color-border);
  border-radius: var(--fk-radius-lg);
  padding: var(--fk-space-2);
  background: var(--fk-color-surface);
  box-shadow: var(--fk-shadow-sm);
  cursor: zoom-in;
}

.inspector .inspector-image-item.fk-card:hover {
  transform: translateY(-1px);
  border-color: var(--fk-color-primary-soft);
  box-shadow: var(--fk-shadow-md);
}

.inspector .inspector-image-item.fk-card.is-favorite {
  border-color: var(--fk-color-warning);
  box-shadow: 0 0 0 1px var(--fk-color-warning-soft), var(--fk-shadow-sm);
}

.inspector .inspector-image-thumb {
  border-radius: var(--fk-radius-md);
  background: var(--fk-color-surface-muted);
}

.inspector .inspector-image-favorite-tag.fk-pill {
  top: var(--fk-space-2);
  left: var(--fk-space-2);
  border-color: var(--fk-color-warning-soft);
  background: var(--fk-color-warning-soft);
  color: #8a5a00;
  line-height: 1;
}

.inspector .inspector-image-actions {
  inset: var(--fk-space-2);
  gap: var(--fk-space-1);
}

.inspector .inspector-image-actions .inspector-image-action.fk-btn {
  min-height: 28px;
  padding: 4px 7px;
  border-radius: var(--fk-radius-md);
  font-size: var(--fk-font-size-xs);
  line-height: 1;
  box-shadow: var(--fk-shadow-sm);
}

.inspector .inspector-image-actions .inspector-image-action.danger.fk-btn {
  border-color: #ffd0d0;
  background: var(--fk-color-danger-soft);
  color: var(--fk-color-danger);
}

.inspector .inspector-image-actions .inspector-image-action.danger.fk-btn:hover,
.inspector .inspector-image-actions .inspector-image-action.danger.fk-btn:focus-visible {
  border-color: var(--fk-color-danger);
  background: #ffe8e8;
  color: var(--fk-color-danger);
}

.inspector .inspector-image-name {
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-xs);
}

.inspector .inspector-image-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: var(--fk-space-3);
  border: 1px dashed var(--fk-color-border);
  border-radius: var(--fk-radius-md);
  background: var(--fk-color-surface-muted);
  color: var(--fk-color-muted);
  text-align: center;
  white-space: normal;
}

/* Boards / My Boards design migration */
#boards-library-view.boards-library-page {
  width: min(100%, 1120px);
  height: calc(100vh - 150px);
  margin: 0 auto;
  padding: var(--fk-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--fk-space-5);
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(107, 91, 255, 0.12), transparent 34%),
    var(--fk-color-surface);
}

#boards-library-view.hidden {
  display: none !important;
}

#boards-library-view .boards-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fk-space-5);
  padding-bottom: var(--fk-space-4);
  border-bottom: 1px solid var(--fk-color-border);
}

#boards-library-view .boards-header-copy {
  display: grid;
  gap: var(--fk-space-2);
  min-width: 0;
}

#boards-library-view .boards-library-kicker,
#boards-library-view .boards-empty-kicker {
  width: fit-content;
}

#boards-library-view #boards-library-title {
  margin: 0;
  color: var(--fk-color-heading);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

#boards-library-view #boards-library-subtitle {
  max-width: 620px;
  margin: 0;
  color: var(--fk-color-muted);
  font-size: var(--fk-font-size-md);
  line-height: 1.5;
}

#boards-library-view #boards-create-btn.boards-create-btn.fk-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding-inline: var(--fk-space-5);
  border-color: var(--fk-color-primary);
  background: var(--fk-color-primary);
  color: var(--fk-color-surface);
}

#boards-library-view .boards-library-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: var(--fk-space-1) var(--fk-space-1) var(--fk-space-3);
  overflow-y: auto;
  overflow-x: hidden;
}

#boards-library-view .boards-library-filters { display: flex; flex-wrap: wrap; gap: var(--fk-space-2); margin-top: var(--fk-space-4); }
#boards-library-view .boards-library-filters [aria-pressed="true"] { border-color: var(--fk-color-primary); background: var(--fk-color-primary-soft); color: var(--fk-color-heading); }
#boards-library-view .boards-library-scope-status { min-height: 1.4em; margin: var(--fk-space-2) 0; color: var(--fk-color-muted); font-size: var(--fk-font-size-sm); }
#boards-library-view .boards-filter-note { padding: var(--fk-space-3); color: var(--fk-color-muted); }

#boards-library-view .board-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--fk-space-4);
  align-items: stretch;
  margin: 0 0 var(--fk-space-3);
  padding: var(--fk-space-4);
  border-color: var(--fk-color-border-default);
  background: var(--fk-color-surface-card);
  color: var(--fk-color-text-primary);
  box-shadow: var(--fk-shadow-card);
}

#boards-library-view .board-row:hover {
  border-color: var(--fk-color-border-strong);
  background: var(--fk-color-surface-hover);
  box-shadow: var(--fk-shadow-panel);
}

#boards-library-view .board-row:focus-within {
  border-color: var(--fk-color-focus-ring);
  box-shadow: 0 0 0 2px var(--fk-color-selection), var(--fk-shadow-card);
}

#boards-library-view .board-row-content {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--fk-space-4);
  align-items: start;
  min-width: 0;
}

#boards-library-view .board-row-avatar {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(107, 91, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(107, 91, 255, 0.14), rgba(38, 145, 86, 0.1)),
    var(--fk-color-surface-muted);
  color: var(--fk-color-primary);
  font-size: 1.2rem;
  font-weight: var(--fk-font-weight-bold);
  box-shadow: inset 0 0 0 1px var(--fk-color-border-default);
}

#boards-library-view .board-row-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#boards-library-view .board-row-details {
  display: grid;
  gap: var(--fk-space-2);
  min-width: 0;
}

#boards-library-view .board-row-titleline {
  display: flex;
  align-items: center;
  gap: var(--fk-space-2);
  flex-wrap: wrap;
  min-width: 0;
}

#boards-library-view .board-row-title {
  min-width: min(100%, 220px);
  color: var(--fk-color-text-primary);
  font-size: 1.05rem;
  font-weight: var(--fk-font-weight-bold);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

#boards-library-view .board-row-brand,
#boards-library-view .board-row-meta {
  display: grid;
  gap: 2px;
  color: var(--fk-color-text-muted);
  font-size: var(--fk-font-size-xs);
  line-height: 1.35;
}

#boards-library-view .board-row-brand span,
#boards-library-view .board-row-meta span {
  color: var(--fk-color-text-muted);
  font-size: 0.66rem;
  font-weight: var(--fk-font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#boards-library-view .board-row-brand strong,
#boards-library-view .board-row-meta strong {
  color: var(--fk-color-text-secondary);
  font-size: var(--fk-font-size-sm);
}

#boards-library-view .board-row-description {
  color: var(--fk-color-text-muted);
  font-size: var(--fk-font-size-sm);
  line-height: 1.45;
}

#boards-library-view .board-row-chip {
  opacity: 1;
  font-size: 0.68rem;
  font-weight: var(--fk-font-weight-bold);
}

#boards-library-view .board-row-chip.owned {
  border-color: rgba(38, 145, 86, 0.28);
  background: rgba(38, 145, 86, 0.1);
  color: var(--fk-color-success);
}

#boards-library-view .board-row-chip.shared {
  border-color: rgba(107, 91, 255, 0.26);
  background: var(--fk-color-primary-soft);
  color: var(--fk-color-primary);
}

#boards-library-view .board-row-chip.copy {
  border-color: rgba(122, 92, 255, 0.22);
  background: rgba(122, 92, 255, 0.09);
  color: #6b4eff;
}

#boards-library-view .board-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--fk-space-2);
  flex-wrap: wrap;
  padding-top: var(--fk-space-3);
  border-top: 1px solid var(--fk-color-divider);
}

#boards-library-view .board-action-btn.fk-btn {
  min-height: 34px;
  padding: 7px 11px;
  font-size: var(--fk-font-size-xs);
  white-space: nowrap;
}

#boards-library-view .board-action-tertiary.fk-btn {
  min-height: 32px;
  padding-inline: var(--fk-space-2);
  color: var(--fk-color-muted);
  font-weight: var(--fk-font-weight-medium);
  box-shadow: none;
}

#boards-library-view .board-action-btn.danger {
  border-color: var(--fk-color-danger);
  background: var(--fk-color-danger-subtle);
  color: var(--fk-color-danger);
}

#boards-library-view .board-action-btn.danger:hover,
#boards-library-view .board-action-btn.danger:focus-visible {
  border-color: var(--fk-color-danger);
  background: var(--fk-color-danger-subtle);
  color: var(--fk-color-danger);
}

#boards-library-view .board-rename {
  display: flex;
  align-items: center;
  gap: var(--fk-space-2);
  flex-wrap: wrap;
  margin-top: var(--fk-space-3);
}

#boards-library-view .board-rename.hidden {
  display: none;
}

#boards-library-view .board-rename .fk-input {
  min-width: min(100%, 260px);
  min-height: 36px;
}

#boards-library-view .board-rename .fk-btn {
  min-height: 36px;
  padding: 7px 12px;
  font-size: var(--fk-font-size-xs);
}

#boards-library-view .board-empty {
  display: grid;
  place-items: center;
  gap: var(--fk-space-3);
  min-height: 280px;
  margin: var(--fk-space-3) 0 0;
  padding: var(--fk-space-8);
  border: 1px dashed rgba(107, 91, 255, 0.32);
  text-align: center;
  opacity: 1;
  background:
    radial-gradient(circle at center top, rgba(107, 91, 255, 0.1), transparent 44%),
    var(--fk-color-surface);
}

#boards-library-view .board-empty strong {
  display: block;
  margin: 0;
  color: var(--fk-color-heading);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: -0.03em;
}

#boards-library-view .board-empty span:not(.fk-badge) {
  max-width: 420px;
  color: var(--fk-color-muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  #boards-library-view.boards-library-page {
    height: auto;
    min-height: calc(100vh - 150px);
    padding: var(--fk-space-4);
  }

  #boards-library-view .boards-header-row,
  #boards-library-view .board-row {
    grid-template-columns: 1fr;
  }

  #boards-library-view .boards-header-row {
    align-items: stretch;
    flex-direction: column;
  }

  #boards-library-view #boards-create-btn.boards-create-btn.fk-btn {
    width: 100%;
  }

  #boards-library-view .board-row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  #boards-library-view .board-row-actions,
  #boards-library-view .board-rename {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  #boards-library-view .board-action-btn.fk-btn,
  #boards-library-view .board-rename .fk-btn,
  #boards-library-view .board-rename .fk-input {
    width: 100%;
  }

  #boards-library-view .board-row-content {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: var(--fk-space-3);
  }

  #boards-library-view .board-row-avatar {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }
}

/* Boards drag-and-drop completion polish */
#boards-library-view .board-row[draggable="true"] {
  cursor: grab;
  position: relative;
  transition: transform 160ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, opacity 160ms ease;
}

#boards-library-view .board-row[draggable="true"]:active {
  cursor: grabbing;
}

#boards-library-view .board-row.is-dragging {
  opacity: 0.72;
  border-color: rgba(107, 91, 255, 0.55);
  box-shadow: var(--fk-shadow-lg);
  transform: scale(1.01);
}

#boards-library-view .board-row.is-dragging::after {
  content: "";
  position: absolute;
  left: var(--fk-space-4);
  right: var(--fk-space-4);
  bottom: calc(var(--fk-space-2) * -1);
  height: 3px;
  border-radius: 999px;
  background: var(--fk-color-primary);
  box-shadow: 0 0 0 4px var(--fk-color-primary-soft);
}

#boards-library-view .board-row-drag-handle {
  position: absolute;
  top: var(--fk-space-3);
  right: var(--fk-space-3);
  width: 28px;
  height: 28px;
  border: 1px solid rgba(107, 91, 255, 0.18);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fk-color-muted);
  background: var(--fk-color-surface-secondary);
  font-size: 0.82rem;
  letter-spacing: -0.25em;
  cursor: grab;
  opacity: 0.72;
  transition: opacity 160ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

#boards-library-view .board-row:hover .board-row-drag-handle,
#boards-library-view .board-row:focus-within .board-row-drag-handle {
  opacity: 1;
  color: var(--fk-color-primary);
  border-color: rgba(107, 91, 255, 0.34);
  background: var(--fk-color-primary-soft);
}

#boards-library-view .board-row.is-dragging .board-row-drag-handle {
  cursor: grabbing;
  transform: scale(1.04);
}

#boards-library-view .board-row-actions,
#boards-library-view .board-rename {
  cursor: default;
}

/* Brand Core shell hierarchy migration */
.brand-core-workspace.fk-section {
  background:
    radial-gradient(circle at top left, rgba(111, 91, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #f8f9fd 0%, #f2f4fb 100%);
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
}

.brand-workspace-hero {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  margin: 0;
  padding: 22px;
}

.brand-workspace-hero-main,
.brand-workspace-hero-side,
.brand-workspace-readiness {
  min-width: 0;
}

.brand-workspace-hero-main {
  display: grid;
  gap: 12px;
}

.brand-workspace-kicker {
  justify-self: flex-start;
  text-transform: uppercase;
}

.brand-workspace-title-row {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.brand-workspace-avatar {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #efeaff, #ffffff);
  border: 1px solid rgba(111, 91, 255, 0.24);
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(73, 61, 171, 0.16);
  color: #5f52cf;
  display: inline-flex;
  flex: 0 0 76px;
  font-size: 1.7rem;
  font-weight: 900;
  justify-content: center;
  overflow: hidden;
}

.brand-workspace-avatar img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.brand-workspace-avatar span {
  line-height: 1;
}

.brand-workspace-title-row h1 {
  color: #252b4a;
  font-size: clamp(2rem, 4vw, 3.45rem);
  letter-spacing: -0.055em;
  line-height: 0.94;
  margin: 0;
}

.brand-workspace-title-row p {
  color: #6554f1;
  font-size: 0.94rem;
  font-weight: 900;
  margin: 8px 0 0;
}

.brand-workspace-support {
  color: #5e657f;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
  max-width: 620px;
}

.brand-workspace-hero-side {
  align-content: space-between;
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.brand-workspace-readiness {
  background: linear-gradient(135deg, rgba(244, 241, 255, 0.88), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(111, 91, 255, 0.18);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.brand-workspace-readiness strong {
  color: #312a78;
  font-size: 1rem;
}

.brand-workspace-readiness small {
  color: #66708f;
  line-height: 1.45;
}

.brand-workspace-hero-side #reset-brand-core-btn {
  justify-self: flex-end;
}

.brand-workspace-hero #reset-brand-core-btn {
  background: #ffffff;
  border-color: rgba(111, 91, 255, 0.2);
  border-radius: 999px;
  color: #5f52cf;
  font-weight: 800;
}

.brand-workspace-body {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 0;
}

.brand-core-workspace .brand-core-canvas {
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: 16px;
  padding: 0;
}

.brand-workspace-group {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.brand-workspace-group-header {
  display: grid;
  gap: 6px;
}

.brand-workspace-group-header h2 {
  color: #252b4a;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.brand-workspace-group-header p {
  color: #66708f;
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

.brand-core-workspace .bc-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.brand-core-workspace .bc-row-foundation {
  grid-template-columns: minmax(0, 1fr);
}

.brand-core-workspace .bc-main {
  justify-self: stretch;
  width: 100%;
}

.brand-core-workspace .brand-core-side {
  border: 1px solid rgba(224, 228, 241, 0.95);
  border-radius: 22px;
  gap: 8px;
  padding: 18px;
}

.brand-core-side-copy {
  color: #66708f;
  font-size: 0.84rem;
  line-height: 1.45;
  margin: -2px 0 6px;
}

.brand-core-workspace .brand-core-side h3 {
  color: #252b4a;
  font-size: 1.05rem;
  margin: 0;
}

.brand-core-workspace .brand-core-side h4 {
  color: #5f52cf;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin: 8px 0 2px;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .brand-workspace-hero,
  .brand-workspace-body {
    grid-template-columns: 1fr;
  }

  .brand-workspace-hero-side {
    align-content: start;
  }

  .brand-workspace-hero-side #reset-brand-core-btn {
    justify-self: flex-start;
  }
}

@media (max-width: 860px) {
  .brand-core-workspace.fk-section {
    padding: 12px;
  }

  .brand-workspace-hero,
  .brand-workspace-group,
  .brand-core-workspace .brand-core-side {
    border-radius: 18px;
    padding: 14px;
  }

  .brand-workspace-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-workspace-avatar {
    flex-basis: 64px;
    width: 64px;
  }

  .brand-core-workspace .bc-row {
    grid-template-columns: 1fr;
  }
}

/* Brand Core shell regression fix: restore page scroll and editor width */
.brand-core-workspace.fk-section {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
}

.brand-core-workspace .brand-workspace-body {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  overflow: visible;
}

.brand-core-workspace .brand-core-canvas {
  align-self: start;
  min-height: auto;
  overflow: visible;
}

.brand-core-workspace .brand-core-side {
  align-self: start;
  min-width: 320px;
  width: 100%;
}

@media (max-width: 1400px) {
  .brand-core-workspace .brand-workspace-body {
    grid-template-columns: 1fr;
  }

  .brand-core-workspace .brand-core-side {
    min-width: 0;
  }
}

/* Brand Core PR 2: sticky editor, readable cards, contextual missing knowledge */
@media (min-width: 1401px) {
  .brand-core-workspace .brand-core-side {
    position: sticky;
    top: var(--fk-space-4);
    max-height: calc(100vh - var(--fk-space-8));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.brand-core-workspace .brand-dna-score-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.brand-core-workspace .brand-dna-signals {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.brand-core-workspace .brand-dna-score,
.brand-core-workspace .brand-dna-block,
.brand-core-workspace .brand-dna-signals > div,
.brand-core-workspace .brand-dna-avatar-details,
.brand-core-workspace .bc-node,
.brand-core-workspace .bc-preview,
.brand-core-workspace .bc-edit-list li,
.brand-core-workspace .bc-tags,
.brand-core-workspace .bc-tags span,
.brand-core-workspace .bc-assets-preview {
  min-width: 0;
  overflow-wrap: anywhere;
}

.brand-core-workspace .bc-row {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.brand-core-workspace .bc-node {
  max-height: none;
  overflow: visible;
}

.brand-core-workspace .bc-preview {
  display: block;
  max-height: none;
  overflow: visible;
}

.brand-core-workspace .bc-edit-list li {
  align-items: flex-start;
}

.brand-core-workspace .bc-edit-list li button {
  flex: 0 0 auto;
}

.brand-core-workspace .brand-workspace-missing-knowledge {
  background: rgba(248, 249, 255, 0.86);
  border: 1px dashed rgba(111, 91, 255, 0.22);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.brand-core-workspace .brand-workspace-missing-knowledge strong {
  color: #312a78;
  font-size: 0.92rem;
}

.brand-core-workspace .brand-workspace-missing-knowledge p {
  color: #66708f;
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0;
}

.brand-core-workspace .brand-workspace-missing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 1400px) {
  .brand-core-workspace .brand-core-side {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* Brand Core PR 3: actionable missing knowledge tiles */
.brand-core-workspace .brand-workspace-missing-action {
  appearance: none;
  cursor: pointer;
  font: inherit;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.brand-core-workspace .brand-workspace-missing-action span {
  color: #6554f1;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-core-workspace .brand-workspace-missing-action:hover,
.brand-core-workspace .brand-workspace-missing-action:focus-visible {
  background: #ffffff;
  border-color: rgba(111, 91, 255, 0.45);
  color: #312a78;
  transform: translateY(-1px);
}

/* Strategy Knowledge Modules: shared, additive lifecycle surfaces. */
.strategy-module-card-actions,
.strategy-module-editor-actions,
.strategy-module-maintenance {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fk-space-2);
}

.strategy-module-card-actions .fk-btn {
  min-height: 34px;
  padding: 6px 10px;
}

.knowledge-module-status[data-status="accepted"] { color: #18794e; }
.knowledge-module-status[data-status="needs_review"],
.knowledge-module-status[data-status="draft"] { color: #7a5a00; }
.knowledge-module-status[data-status="error"] { color: #b42318; }

.strategy-module-section {
  border: 1px solid var(--fk-color-border);
  border-radius: var(--fk-radius-md);
  display: grid;
  gap: var(--fk-space-2);
  margin: var(--fk-space-3) 0;
  min-width: 0;
  padding: var(--fk-space-3);
}

.strategy-module-section legend { color: var(--fk-color-heading); font-weight: 800; padding: 0 var(--fk-space-2); }
.strategy-module-section textarea { box-sizing: border-box; width: 100%; }
.strategy-accepted-summary { background: var(--fk-color-surface-muted); border-radius: var(--fk-radius-md); padding: var(--fk-space-3); }
.strategy-accepted-summary p { overflow-wrap: anywhere; white-space: pre-wrap; }
[data-strategy-message][data-tone="error"] { color: #b42318; }

.brand-core-workspace .brand-workspace-missing-action:focus-visible {
  outline: 2px solid rgba(111, 91, 255, 0.34);
  outline-offset: 2px;
}

/* BW-27 component migration layer: presentation only; Canvas geometry remains behavior-owned. */
html[data-theme] { background:var(--fk-color-app-bg); color-scheme:light; }
html[data-theme="dark"] { color-scheme:dark; }
html[data-theme] body { background:var(--fk-color-app-bg); color:var(--fk-color-text-primary); }
html[data-theme] .sidebar,html[data-theme] .topbar,html[data-theme] .inspector { background:var(--fk-color-surface-panel);color:var(--fk-color-text-primary);border-color:var(--fk-color-border-default); }
html[data-theme] .workspace-wrap,html[data-theme] .dashboard-view,html[data-theme] .boards-library-page { background:var(--fk-color-app-bg);color:var(--fk-color-text-primary); }
html[data-theme] .canvas,html[data-theme] .canvas-scroll-surface { background-color:var(--fk-color-canvas-bg);background-image:radial-gradient(var(--fk-color-canvas-grid) 1px,transparent 1px); }
html[data-theme] .fk-card,html[data-theme] .inspector-section,html[data-theme] .insights-section,html[data-theme] .insight-card,html[data-theme] .ai-brain-header,html[data-theme] .ai-brain-empty,html[data-theme] .ai-brain-unavailable,html[data-theme] .board-row { background:var(--fk-color-surface-card);border-color:var(--fk-color-border-default);color:var(--fk-color-text-primary);box-shadow:var(--fk-shadow-card); }
html[data-theme] .nav-item:hover { background:var(--fk-color-surface-hover); }
html[data-theme] .nav-item.active { background:var(--fk-color-surface-selected);color:var(--fk-color-primary-action); }
html[data-theme] .fk-btn { min-height:var(--fk-control-height-md);border-color:var(--fk-color-border-control);border-radius:var(--fk-radius-md);font-weight:700;transition:background var(--fk-duration-fast),border-color var(--fk-duration-fast),transform var(--fk-duration-fast); }
html[data-theme] .fk-btn-primary,html[data-theme] .boards-create-btn { background:var(--fk-color-primary-action);border-color:var(--fk-color-primary-action);color:#fff; }
html[data-theme] .fk-btn-primary:hover,html[data-theme] .boards-create-btn:hover { background:var(--fk-color-primary-hover);border-color:var(--fk-color-primary-hover); }
html[data-theme] .fk-btn-primary:active { background:var(--fk-color-primary-active); }
html[data-theme] .fk-btn-secondary { background:var(--fk-color-surface-elevated);color:var(--fk-color-text-primary); }
html[data-theme] .fk-btn-subtle { background:var(--fk-color-primary-subtle);color:var(--fk-color-primary-action); }
html[data-theme] .fk-btn-ghost { background:transparent;color:var(--fk-color-text-secondary); }
html[data-theme] .fk-btn-icon { width:var(--fk-control-height-md);padding:0; }
html[data-theme] .fk-btn-destructive,html[data-theme] .inspector-danger-action { background:var(--fk-color-danger-subtle);border-color:var(--fk-color-danger);color:var(--fk-color-danger); }
html[data-theme] button:disabled,html[data-theme] input:disabled,html[data-theme] select:disabled,html[data-theme] textarea:disabled { background:var(--fk-color-surface-disabled);color:var(--fk-color-text-disabled);cursor:not-allowed;opacity:.72; }
html[data-theme] :where(button,a,input,select,textarea,[contenteditable],summary):focus-visible { outline:3px solid var(--fk-color-focus-ring);outline-offset:2px; }
html[data-theme] :where(input,select,textarea,.fk-input,.fk-select,.fk-textarea) { background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary); }
html[data-theme] ::placeholder { color:var(--fk-color-text-muted);opacity:1; }
html[data-theme] input:read-only,html[data-theme] textarea:read-only { background:var(--fk-color-surface-secondary); }
html[data-theme] :user-invalid { border-color:var(--fk-color-danger); }
html[data-theme] .node { background:var(--fk-color-node-surface);border-color:var(--fk-color-node-border);color:var(--fk-color-text-primary); }
html[data-theme] .node.selected { outline:var(--fk-border-width-strong) solid var(--fk-color-node-selection);box-shadow:0 0 0 4px var(--fk-color-selection),var(--fk-shadow-panel); }
html[data-theme] #links path { stroke:var(--fk-color-canvas-edge); }
html[data-theme] #links path:hover { stroke:var(--fk-color-canvas-edge-hover); }
html[data-theme] .postit { border-color:var(--fk-color-border-strong);color:#29261d; }
html[data-theme="dark"] .postit { box-shadow:inset 0 0 0 999px rgba(255,255,255,.08),var(--fk-shadow-card); }
html[data-theme] .ai-review-card { background:var(--fk-color-ai-review-surface);border-color:var(--fk-color-border-default);color:var(--fk-color-text-primary); }
html[data-theme] .ai-brain-transcript,html[data-theme] .ai-brain-message,html[data-theme] .ai-brain-context span,html[data-theme] .ai-brain-node-preview,html[data-theme] .ai-brain-composer,html[data-theme] .insights-diagnostic-state { background:var(--fk-color-surface-secondary);border-color:var(--fk-color-border-default);color:var(--fk-color-text-primary); }
html[data-theme] .ai-brain-node-preview h4,html[data-theme] .ai-brain-proposal-copy,html[data-theme] .ai-brain-composer label { color:var(--fk-color-text-primary); }
html[data-theme] .ai-brain-message small,html[data-theme] .ai-brain-composer small { color:var(--fk-color-text-muted); }
html[data-theme] .ai-brain-proposal-actions button { background:var(--fk-color-surface-elevated);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary); }
html[data-theme] .ai-brain-message.is-user { background:var(--fk-color-primary-action);border-color:var(--fk-color-primary-action);color:#fff; }
html[data-theme] dialog,html[data-theme] .context-menu,html[data-theme] .filter-popover,html[data-theme] .tools-menu,html[data-theme] .theme-quick-menu { background:var(--fk-color-surface-elevated);border-color:var(--fk-color-border-default);color:var(--fk-color-text-primary);box-shadow:var(--fk-shadow-modal); }
html[data-theme] dialog::backdrop { background:var(--fk-color-overlay-backdrop); }
.theme-quick-control { position:relative;flex:0 0 auto; }
.theme-quick-menu { position:absolute;right:0;top:calc(100% + 8px);z-index:var(--fk-z-menu);width:220px;padding:6px;border:1px solid;border-radius:var(--fk-radius-lg); }
.theme-quick-menu[hidden] { display:none; }
.theme-quick-menu button { width:100%;display:grid;gap:2px;text-align:left;padding:9px 10px;border:0;border-radius:var(--fk-radius-md);background:transparent;color:inherit;cursor:pointer; }
.theme-quick-menu button:hover,.theme-quick-menu button.is-selected { background:var(--fk-color-surface-selected); }
.theme-quick-menu button.is-selected::after { content:"✓";position:absolute;right:14px;color:var(--fk-color-primary-action); }
.theme-quick-menu small { color:var(--fk-color-text-muted); }
html[data-theme] * { scrollbar-color:var(--fk-color-scrollbar-thumb) var(--fk-color-scrollbar-track); }
html[data-theme] ::-webkit-scrollbar-track { background:var(--fk-color-scrollbar-track); }
html[data-theme] ::-webkit-scrollbar-thumb { background:var(--fk-color-scrollbar-thumb); }
html[data-theme] ::-webkit-scrollbar-thumb:hover { background:var(--fk-color-scrollbar-hover); }
html[data-theme] h1 { font-size:1.5rem;line-height:var(--fk-line-height-tight); } html[data-theme] h2 { font-size:1.25rem; } html[data-theme] h3 { font-size:1rem; } html[data-theme] small,html[data-theme] .caption { color:var(--fk-color-text-muted);line-height:var(--fk-line-height-body); }
@media (max-width:720px) { .theme-quick-control { display:none; } .settings-category { min-width:0; } .theme-quick-menu { max-width:calc(100vw - 24px); } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important; } }
@media (forced-colors:active) { :focus-visible { outline:2px solid Highlight!important; } .node.selected { outline:2px solid Highlight; } }

/* Compatibility aliases: existing components inherit the active semantic theme. */
html[data-theme] { --bg:var(--fk-color-app-bg);--panel:var(--fk-color-surface-panel);--text:var(--fk-color-text-primary);--muted:var(--fk-color-text-muted);--primary:var(--fk-color-primary-action);--primary-soft:var(--fk-color-primary-subtle);--border:var(--fk-color-border-default);--danger:var(--fk-color-danger);--fk-color-bg:var(--fk-color-app-bg);--fk-color-background:var(--fk-color-app-bg);--fk-color-surface:var(--fk-color-surface-elevated);--fk-color-surface-muted:var(--fk-color-surface-secondary);--fk-color-text:var(--fk-color-text-primary);--fk-color-heading:var(--fk-color-text-primary);--fk-color-muted:var(--fk-color-text-muted);--fk-color-border:var(--fk-color-border-default);--fk-color-primary:var(--fk-color-primary-action);--fk-color-primary-soft:var(--fk-color-primary-subtle);--fk-color-success-soft:var(--fk-color-success-subtle);--fk-color-warning-soft:var(--fk-color-warning-subtle);--fk-color-danger-soft:var(--fk-color-danger-subtle);--fk-shadow-sm:var(--fk-shadow-card);--fk-shadow-md:var(--fk-shadow-panel);--fk-shadow-lg:var(--fk-shadow-modal); }

/* BW-27.2 — premium Dark Mode shell and continuous product pages. */
html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] main,
html[data-theme="dark"] .workspace-wrap {
  background: var(--fk-color-app-bg);
}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar { background:var(--fk-color-nav-bg); }
html[data-theme="dark"] :is(.dashboard-view,.boards-library-page,.board-list-view,.brand-core-workspace) {
  background:var(--fk-color-page-bg);color:var(--fk-color-text-secondary);
}
/* BW-27.3: the dashboard owns the Start Screen atmosphere.  This replaces the
   light-mode page gradient at its authoritative page selector without changing
   the light composition above. */
html[data-theme="dark"] #dashboard-view.dashboard-view {
  background:
    radial-gradient(circle at 14% 0,rgba(124,92,255,.18),transparent 58%),
    radial-gradient(circle at 66% 18%,rgba(78,92,190,.10),transparent 66%),
    var(--fk-color-app-bg);
}
html[data-theme="dark"] :is(.dashboard-view,.boards-library-page,.board-list-view,.brand-core-workspace) > h1,
html[data-theme="dark"] :is(.dashboard-view,.boards-library-page,.board-list-view,.brand-core-workspace) > h2 { color:var(--fk-color-text-primary); }

/* Campaign Canvas: restrained grid, role accents, and dark node internals. */
html[data-theme="dark"] :is(.canvas,.canvas-scroll-surface) {
  background-color:var(--fk-color-canvas-bg);
  background-image:radial-gradient(circle,var(--fk-color-canvas-grid) 1px,transparent 1px);
}
html[data-theme="dark"] #links path { stroke:var(--fk-color-canvas-edge); }
html[data-theme="dark"] #links path:hover { stroke:var(--fk-color-canvas-edge-hover); }
html[data-theme="dark"] .node {
  background:linear-gradient(180deg,var(--node-role-tint,var(--fk-color-role-idea-surface)),transparent 58px),var(--fk-color-node-surface);
  border-color:var(--fk-color-node-border);border-top:2px solid var(--node-role-accent,var(--fk-color-role-idea-accent));
  box-shadow:0 10px 28px rgba(0,0,0,.22),0 0 12px color-mix(in srgb,var(--node-role-accent,var(--fk-color-role-idea-accent)) 5%,transparent);
}
html[data-theme="dark"] .node:hover { box-shadow:0 14px 34px rgba(0,0,0,.28),0 0 14px color-mix(in srgb,var(--node-role-accent,var(--fk-color-role-idea-accent)) 7%,transparent); }
html[data-theme="dark"] .node[data-node-role="campaign-variation"] { --node-role-accent:var(--fk-color-role-variation-accent);--node-role-tint:var(--fk-color-role-variation-surface); }
html[data-theme="dark"] .node[data-node-role="content"] { --node-role-accent:var(--fk-color-role-content-accent);--node-role-tint:var(--fk-color-role-content-surface); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] { --node-role-accent:var(--fk-color-role-social-accent);--node-role-tint:var(--fk-color-role-social-surface); }
html[data-theme="dark"] .node[data-node-role="landing-page"] { --node-role-accent:var(--fk-color-role-landing-accent);--node-role-tint:var(--fk-color-role-landing-surface); }
html[data-theme="dark"] .node[data-node-role="email-campaign"] { --node-role-accent:var(--fk-color-role-email-accent);--node-role-tint:var(--fk-color-role-email-surface); }
html[data-theme="dark"] .node[data-node-role="visual-concept"] { --node-role-accent:var(--fk-color-role-visual-accent);--node-role-tint:var(--fk-color-role-visual-surface); }
html[data-theme="dark"] .node :is(h3,.title) { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .node :is(p,.content,.compact-preview) { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .node :is(.type,.compact-meta span,.tag,.variant,.node-owner-display) { background:var(--node-role-tint,var(--fk-color-primary-subtle));border-color:color-mix(in srgb,var(--node-role-accent,var(--fk-color-primary-action)) 30%,transparent);color:var(--node-role-accent,var(--fk-color-text-secondary)); }
html[data-theme="dark"] .node :is(.control-btn,.node-compact-toggle,.node-ai-toolbar button,.connector-handle,.connector-link-handle) { background:var(--fk-color-surface-input);border-color:var(--fk-color-border-default);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .node :is(.control-btn,.node-compact-toggle,.node-ai-toolbar button):hover { background:var(--fk-color-surface-hover);color:var(--fk-color-text-primary); }
html[data-theme="dark"] .node.selected { outline-color:var(--fk-color-node-selection);box-shadow:0 0 0 3px var(--fk-color-selection),var(--fk-shadow-panel); }
html[data-theme="dark"] .node :is(.node-header,.node-footer,.node-summary,.expanded-content,.node-details) { border-color:var(--fk-color-divider); }
html[data-theme="dark"] .node :is(.expanded-content,.node-details) { background:var(--fk-color-node-surface);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .ai-review-postit { background:var(--fk-color-ai-review-surface);border-color:var(--fk-color-primary-border);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .ai-review-postit :is(button,textarea) { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .ai-review-card { background:var(--fk-color-ai-review-surface);border:1px solid var(--fk-color-divider);border-radius:var(--fk-radius-md);box-shadow:none;color:var(--fk-color-text-secondary);padding:8px; }
html[data-theme="dark"] .ai-review-card-heading strong { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .ai-review-score { background:var(--fk-color-primary-subtle);color:#c3b7ff; }
html[data-theme="dark"] .ai-review-section { border-color:var(--fk-color-divider);background:var(--fk-color-surface-card); }
html[data-theme="dark"] .ai-review-section summary { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .ai-review-section-body { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .ai-review-card :is(time,small,.meta,.metadata) { color:var(--fk-color-text-muted); }
html[data-theme="dark"] .ai-review-section-summary { background:var(--fk-color-information-subtle); }
html[data-theme="dark"] .ai-review-section-strengths { background:var(--fk-color-success-subtle); }
html[data-theme="dark"] .ai-review-section-improvements { background:var(--fk-color-warning-subtle); }
html[data-theme="dark"] .ai-review-section-rewrite { background:var(--fk-color-primary-subtle); }
html[data-theme="dark"] .ai-review-improvement-row strong { color:var(--fk-color-warning); }
html[data-theme="dark"] .postit { background:var(--fk-color-comment-surface);color:#242014;box-shadow:0 10px 28px rgba(0,0,0,.24); }
html[data-theme="dark"] .postit :is(button,textarea) { color:#242014; }
html[data-theme="dark"] .floating-zoom-control { background:var(--fk-color-surface-elevated);border-color:var(--fk-color-border-default);box-shadow:var(--fk-shadow-panel);color:var(--fk-color-text-primary); }
html[data-theme="dark"] .floating-zoom-control button { background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary); }
html[data-theme="dark"] .floating-zoom-control button:hover { background:var(--fk-color-surface-hover); }
html[data-theme="dark"] .floating-zoom-control button:focus-visible { outline:0;box-shadow:var(--fk-focus-shadow); }
html[data-theme="dark"] .floating-zoom-control #zoom-label { color:var(--fk-color-text-secondary); }

/* BW-27.4 Canvas component polish. These component-owned tokens deliberately
   sit after the general Canvas migration rules so Post-its, attached reviews,
   and social previews do not inherit generic dark input or light legacy chrome. */
html[data-theme="dark"] .postit:not(.ai-review-postit) {
  --postit-surface:#e7c968;
  --postit-body:#f0d77d;
  --postit-secondary:#ddbd5d;
  --postit-text:#282313;
  --postit-text-secondary:#574c26;
  --postit-text-muted:#746637;
  --postit-border:rgba(105,82,18,.32);
  --postit-hover:rgba(255,248,202,.32);
  background:var(--postit-surface) !important;
  border-color:var(--postit-border);
  color:var(--postit-text);
  box-shadow:0 10px 24px rgba(0,0,0,.24);
}
html[data-theme="dark"] .postit:not(.ai-review-postit) header {
  border-bottom:1px solid var(--postit-border);
  color:var(--postit-text-secondary);
  padding-bottom:6px;
}
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-text,.postit-reply-input) {
  background:var(--postit-body);
  border:1px solid var(--postit-border);
  border-radius:6px;
  color:var(--postit-text);
  caret-color:var(--postit-text);
  padding:6px;
}
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-text,.postit-reply-input)::placeholder { color:var(--postit-text-muted);opacity:1; }
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-text,.postit-reply-input):focus-visible {
  border-color:#6f5bff;outline:2px solid rgba(111,91,255,.38);outline-offset:1px;
}
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-replies,.postit-reply-editor,.postit-resolved-summary) { border-color:var(--postit-border); }
html[data-theme="dark"] .postit:not(.ai-review-postit) .postit-reply { color:var(--postit-text-secondary); }
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-time,.postit-reply-meta,.postit-resolved-summary) { color:var(--postit-text-muted);opacity:1; }
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-resolve,.postit-reply-button,.postit-delete) {
  background:var(--postit-secondary);border-color:var(--postit-border);color:var(--postit-text);opacity:1;
}
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-resolve,.postit-reply-button,.postit-delete):hover { background:var(--postit-hover); }
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-resolve,.postit-reply-button,.postit-delete):focus-visible { outline:2px solid #6f5bff;outline-offset:1px; }
html[data-theme="dark"] .postit:not(.ai-review-postit) .postit-color { background:transparent;color-scheme:light; }
html[data-theme="dark"] .postit:not(.ai-review-postit) .postit-text::-webkit-resizer { background:linear-gradient(135deg,transparent 50%,var(--postit-text-secondary) 51%); }
html[data-theme="dark"] .postit:not(.ai-review-postit).is-resolved { background:var(--postit-secondary) !important; }

html[data-theme="dark"] .ai-review-postit {
  --review-shell:#182239;
  --review-elevated:#202b46;
  --review-nested:#141d31;
  background:var(--review-shell) !important;
  border-color:var(--fk-color-primary-border);
  color:var(--fk-color-text-secondary);
  box-shadow:0 10px 24px rgba(0,0,0,.28);
  padding:0;
  overflow:hidden;
}
html[data-theme="dark"] .ai-review-postit > header {
  background:var(--review-elevated);border-bottom:1px solid var(--fk-color-divider);color:var(--fk-color-text-secondary);margin:0;padding:8px;
}
html[data-theme="dark"] .ai-review-postit :is(.postit-time,.postit-reply-meta,.postit-resolved-summary) { color:var(--fk-color-text-muted);opacity:1; }
html[data-theme="dark"] .ai-review-postit :is(.postit-resolve,.postit-reply-button,.postit-delete,.ai-review-apply-fix) {
  background:var(--fk-color-surface-input);border:1px solid var(--fk-color-border-control);color:var(--fk-color-text-primary);
}
html[data-theme="dark"] .ai-review-postit :is(.postit-resolve,.postit-reply-button,.postit-delete,.ai-review-apply-fix):hover { background:var(--fk-color-surface-hover); }
html[data-theme="dark"] .ai-review-postit :is(button,summary):focus-visible { outline:0;box-shadow:var(--fk-focus-shadow); }
html[data-theme="dark"] .ai-review-card { background:var(--review-shell);border:0;border-radius:0;box-shadow:none;padding:8px; }
html[data-theme="dark"] .ai-review-card-heading { background:var(--review-elevated);border-bottom:1px solid var(--fk-color-divider);border-radius:8px;padding:7px 8px; }
html[data-theme="dark"] .ai-review-section { border-color:var(--fk-color-divider); }
html[data-theme="dark"] .ai-review-section-summary { background:var(--review-elevated); }
html[data-theme="dark"] .ai-review-section-strengths { background:#162d2b; }
html[data-theme="dark"] .ai-review-section-improvements { background:#30291c; }
html[data-theme="dark"] .ai-review-section-rewrite { background:#27223d; }
html[data-theme="dark"] .ai-review-section-body { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .ai-review-postit > :is(.postit-replies,.postit-reply-editor,.postit-reply-button,.postit-resolved-summary) { margin-left:8px;margin-right:8px; }
html[data-theme="dark"] .ai-review-postit .postit-replies { background:var(--review-nested);border:1px solid var(--fk-color-divider);border-radius:8px;padding:7px; }
html[data-theme="dark"] .ai-review-postit .postit-reply { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .ai-review-postit .postit-reply-editor { background:var(--review-nested);border-color:var(--fk-color-divider);padding:7px; }
html[data-theme="dark"] .ai-review-postit .postit-reply-input { background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary); }
html[data-theme="dark"] .ai-review-postit .postit-reply-input::placeholder { color:var(--fk-color-text-muted);opacity:1; }
html[data-theme="dark"] .ai-review-postit > .postit-reply-button { margin-bottom:8px; }

html[data-theme="dark"] .node[data-node-role="social-media-posting"] {
  border-color:var(--fk-color-node-border) !important;border-top-color:var(--fk-color-role-social-accent) !important;
  box-shadow:0 10px 24px rgba(0,0,0,.24),0 0 10px color-mix(in srgb,var(--fk-color-role-social-accent) 4%,transparent) !important;
}
html[data-theme="dark"] .node[data-node-role="social-media-posting"].selected { box-shadow:0 0 0 3px var(--fk-color-selection),var(--fk-shadow-panel) !important; }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-preview { background:var(--fk-color-surface-elevated);border-color:var(--fk-color-divider);box-shadow:inset 3px 0 0 var(--fk-color-role-social-accent); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-card { gap:7px; }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] :is(.social-platform-select,.social-platform-regen,.social-actions-row button) { background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-platform-select { color-scheme:dark; }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-status-badge { background:var(--fk-color-success-subtle);border:1px solid color-mix(in srgb,var(--fk-color-success) 35%,transparent);color:var(--fk-color-success);font-weight:700; }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-char-count { color:var(--fk-color-text-muted); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-char-count.warning { color:var(--fk-color-warning); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] :is(.social-caption,.social-cta,.social-hashtags,.social-schedule-meta) { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-caption:not(:focus) {
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;line-clamp:6;overflow:hidden;max-height:calc(6 * 1.35em + 12px);
}
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-caption:focus { display:block;max-height:11em;overflow-y:auto; }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] :is(.social-caption,.social-cta,.social-hashtags):focus-visible { border-color:var(--fk-color-primary-action);outline:0;box-shadow:var(--fk-focus-shadow); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-cta { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-hashtags { max-height:4.6em;overflow:auto;color:var(--fk-color-information); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-schedule-meta :is(small,strong) { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-image-frame { background:var(--fk-color-surface-input);border-color:var(--fk-color-divider);min-height:0; }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-image-frame:empty { display:none; }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-image-frame img { width:100%;height:auto;max-height:140px;object-fit:contain;background:var(--fk-color-surface-input); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-actions-row { border-top:1px solid var(--fk-color-divider);padding-top:7px; }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-actions-row button { min-height:24px;line-height:1.2;padding:4px 7px; }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] :is(.social-platform-regen,.social-actions-row button):hover { background:var(--fk-color-surface-hover); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] :is(.social-platform-select,.social-platform-regen,.social-actions-row button):focus-visible { outline:0;box-shadow:var(--fk-focus-shadow); }
html[data-theme="dark"] .node[data-node-role="social-media-posting"] .social-actions-row button:disabled { background:var(--fk-color-surface-disabled);color:var(--fk-color-text-disabled); }

/* BW-27.5 Landing Page preview. The role scope is intentional: Landing Page
   and Social nodes share .social-preview, whose legacy light surface remains
   the Light Mode authority. Structured previews also carry legacy inline
   colors, so the narrow !important declarations below are required to make
   semantic Dark Mode tokens authoritative without changing their DOM/data. */
html[data-theme="dark"] .node[data-node-role="landing-page"] .social-preview {
  background:var(--fk-color-surface-elevated);
  border-color:var(--fk-color-divider);
  box-shadow:inset 3px 0 0 var(--fk-color-role-landing-accent);
  color:var(--fk-color-text-secondary);
}
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-card {
  gap:0;
  max-height:16.5em;
  overflow:hidden;
}
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-image {
  margin-bottom:7px;
  border-color:var(--fk-color-divider);
}
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-line {
  color:var(--fk-color-text-secondary) !important;
  opacity:1;
  overflow-wrap:anywhere;
  padding:5px 2px;
}
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-line + .landing-preview-line,
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-structured + .landing-preview-line,
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-line + .landing-preview-structured {
  border-top:1px solid var(--fk-color-divider);
}
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-line strong {
  color:var(--fk-color-role-landing-accent);
  font-size:.61rem;
  letter-spacing:.035em;
  text-transform:uppercase;
}
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-structured {
  border-color:var(--fk-color-divider);
}
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-structured > .landing-preview-line:first-child {
  color:var(--fk-color-text-primary) !important;
}
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-structured > .landing-preview-line[style*="font-weight: 700"] {
  color:var(--fk-color-role-landing-accent) !important;
  font-size:.61rem;
  letter-spacing:.035em;
  text-transform:uppercase;
}
html[data-theme="dark"] .node[data-node-role="landing-page"] .landing-preview-line.is-cta {
  background:var(--fk-color-primary-subtle) !important;
  border:1px solid var(--fk-color-primary-border) !important;
  border-radius:8px;
  color:var(--fk-color-text-primary) !important;
  margin-top:5px;
  padding:5px 7px;
}

/* Inspector: a level-two panel with level-three sections and level-four controls. */
html[data-theme="dark"] .inspector { background:var(--fk-color-surface-panel);border-color:var(--fk-color-divider); }
html[data-theme="dark"] .inspector :is(h2,.inspector-section-title) { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .inspector :is(.meta,label) { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .inspector .inspector-section.fk-card { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider);box-shadow:none; }
html[data-theme="dark"] .inspector .node-form :is(.fk-input,.fk-select,.fk-textarea) { background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary); }
html[data-theme="dark"] .inspector .node-form :is(.fk-input,.fk-select,.fk-textarea):focus-visible { border-color:var(--fk-color-primary-action);box-shadow:var(--fk-focus-shadow);outline:0; }

/* Dashboard: elevated briefing, panel continuation, and quieter nested metrics. */
html[data-theme="dark"] #dashboard-view .mission-hero { background:radial-gradient(circle at 12% 0,var(--fk-color-primary-glow),transparent 42%),linear-gradient(145deg,var(--fk-color-surface-elevated),var(--fk-color-surface-panel));border-color:var(--fk-color-primary-border);box-shadow:var(--fk-shadow-panel); }
html[data-theme="dark"] #dashboard-view .mission-hero :is(h1,.dashboard-hero-mission-insight) { color:var(--fk-color-text-primary); }
html[data-theme="dark"] #dashboard-view .mission-hero p { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] #dashboard-view :is(.dashboard-continue-working,.mission-card,.mission-focus) { background:var(--fk-color-surface-panel);border-color:var(--fk-color-border-default);box-shadow:var(--fk-shadow-card); }
html[data-theme="dark"] #dashboard-view :is(.dashboard-campaign-progress,.dashboard-campaign-health-section,.dashboard-continue-stat,.mission-callout,.mission-opportunities article,.mission-focus-list article,.mission-activity-list span) { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider);box-shadow:none; }
html[data-theme="dark"] #dashboard-view :is(.dashboard-campaign-summary-fields div,.dashboard-campaign-chip) { background:var(--fk-color-surface-elevated);border-color:var(--fk-color-divider);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] #dashboard-view :is(.dashboard-card-title,.dashboard-campaign-summary p,.dashboard-campaign-chip strong,.dashboard-continue-stat strong,.mission-callout strong) { color:var(--fk-color-text-primary); }

/* Brand Workspace: one related editor and preview surface system. */
html[data-theme="dark"] .brand-core-workspace .brand-workspace-hero { background:linear-gradient(140deg,var(--fk-color-surface-elevated),var(--fk-color-surface-panel));border-color:var(--fk-color-primary-border); }
html[data-theme="dark"] .brand-workspace-title-row h1,
html[data-theme="dark"] .brand-workspace-group-header h2,
html[data-theme="dark"] .brand-core-workspace .brand-core-side h3 { color:var(--fk-color-text-primary); }
html[data-theme="dark"] :is(.brand-workspace-support,.brand-workspace-group-header p,.brand-core-side-copy) { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .brand-workspace-readiness { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider); }
html[data-theme="dark"] .brand-workspace-readiness strong { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .brand-workspace-readiness small { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .brand-core-workspace :is(.brand-workspace-group,.brand-core-side) { background:var(--fk-color-surface-panel);border-color:var(--fk-color-border-default); }
html[data-theme="dark"] .brand-core-workspace :is(.bc-node,.bc-main,.brand-core-card,.brand-workspace-missing-knowledge,.strategy-module-section,.strategy-accepted-summary) { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .brand-core-workspace :is(.bc-title,.bc-node h3,.bc-node h4,.bc-preview strong,.brand-core-card h3,.brand-workspace-missing-knowledge strong) { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .brand-core-workspace :is(.bc-preview,.bc-preview p,.bc-preview li,.bc-preview small,.bc-assets-preview) { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .brand-core-workspace .bc-preview li::marker { color:var(--fk-color-primary-action); }
html[data-theme="dark"] .brand-core-workspace :is(.bc-tags span,.bc-count,.bc-badge) { background:var(--fk-color-surface-elevated);color:var(--fk-color-text-muted); }
html[data-theme="dark"] .brand-core-workspace :is(input,textarea,select) { background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary); }
.bc-domain-import-status { margin:.5rem 0 1rem;padding:.75rem;border:1px solid var(--fk-color-border-default);border-radius:var(--fk-radius-md);background:var(--fk-color-surface-panel);color:var(--fk-color-text-secondary); }
.bc-domain-import-status[data-kind="error"] { border-color:var(--fk-color-danger);background:var(--fk-color-danger-subtle);color:var(--fk-color-danger); }
html[data-theme="dark"] .bc-domain-import-status { background:var(--fk-color-surface-elevated);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .bc-domain-import-status[data-kind="error"] { background:var(--fk-color-danger-subtle);color:var(--fk-color-danger); }
html[data-theme="dark"] .brand-core-workspace .brand-core-side :is(label,.bc-helper) { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .brand-core-workspace :is(input,textarea,select):focus-visible { border-color:var(--fk-color-primary-action);outline:0;box-shadow:var(--fk-focus-shadow); }
html[data-theme="dark"] .brand-workspace-hero #reset-brand-core-btn { background:var(--fk-color-danger-subtle);border-color:color-mix(in srgb,var(--fk-color-danger) 40%,transparent);color:var(--fk-color-danger); }

/* Brand DNA is application UI: every nested result remains in the workspace
   surface hierarchy rather than retaining its light document presentation. */
html[data-theme="dark"] .brand-core-workspace .brand-dna-card { background:linear-gradient(145deg,var(--fk-color-surface-elevated),var(--fk-color-surface-panel));border-color:var(--fk-color-primary-border);box-shadow:var(--fk-shadow-card);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .brand-core-workspace .brand-dna-eyebrow { background:var(--fk-color-primary-subtle);color:#c3b7ff; }
html[data-theme="dark"] .brand-core-workspace .brand-dna-header h2,
html[data-theme="dark"] .brand-core-workspace :is(.brand-dna-score strong,.brand-dna-block h4,.brand-dna-signals h5,.brand-dna-avatar-copy h3,.brand-dna-avatar-details strong) { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .brand-core-workspace :is(.brand-dna-header p,.brand-dna-empty,.brand-dna-block p,.brand-dna-signals p,.brand-dna-signals ul,.brand-dna-alternatives,.brand-dna-alternatives span,.brand-dna-avatar-copy p,.brand-dna-avatar-details) { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .brand-core-workspace :is(.brand-dna-loading,.brand-dna-empty,.brand-dna-score,.brand-dna-block,.brand-dna-signals>div,.brand-dna-avatar-section,.brand-dna-avatar-details details) { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider);box-shadow:none; }
html[data-theme="dark"] .brand-core-workspace .brand-dna-score.primary { border-color:var(--fk-color-primary-border);box-shadow:inset 3px 0 0 var(--fk-color-primary-action); }
html[data-theme="dark"] .brand-core-workspace .brand-dna-score span { color:var(--fk-color-text-muted); }
html[data-theme="dark"] .brand-core-workspace .brand-dna-score em,
html[data-theme="dark"] .brand-core-workspace .brand-dna-loading { color:#c3b7ff; }
html[data-theme="dark"] .brand-core-workspace :is(.brand-dna-signals li,.brand-dna-alternatives li)::marker { color:var(--fk-color-primary-action); }
html[data-theme="dark"] .brand-core-workspace .brand-dna-avatar-image { background:var(--fk-color-surface-input);border-color:var(--fk-color-primary-border);box-shadow:var(--fk-shadow-card); }

/* AI Brain: continuous page, readable transcript, and nested composer. */
html[data-theme="dark"] #ai-brain-view { min-height:100%; }
html[data-theme="dark"] #ai-brain-view .ai-brain-wrap { background:var(--fk-color-page-bg); }
html[data-theme="dark"] .ai-brain-header { background:var(--fk-color-surface-elevated);border-color:var(--fk-color-primary-border); }
html[data-theme="dark"] .ai-brain-header h3 { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .ai-brain-header p { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .ai-brain-readonly { background:var(--fk-color-primary-subtle);color:#c3b7ff; }
html[data-theme="dark"] .ai-brain-context span { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .ai-brain-transcript { background:var(--fk-color-surface-panel);border-color:var(--fk-color-divider); }
html[data-theme="dark"] :is(.ai-brain-empty,.ai-brain-unavailable,.ai-brain-message,.ai-brain-node-preview) { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider);color:var(--fk-color-text-secondary); }
html[data-theme="dark"] :is(.ai-brain-empty,.ai-brain-unavailable) h4,
html[data-theme="dark"] .ai-brain-formatted-answer :is(h3,h4,h5,h6) { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .ai-brain-composer { background:var(--fk-color-surface-panel);border-color:var(--fk-color-border-default); }
html[data-theme="dark"] .ai-brain-composer textarea { background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary); }
html[data-theme="dark"] .ai-brain-formatted-answer code { background:var(--fk-color-surface-input);color:var(--fk-color-information); }

/* AI Insights: analytics panels, distinct diagnostics, and semantic chips. */
html[data-theme="dark"] #insights-view { min-height:100%; }
html[data-theme="dark"] .insights-section { background:var(--fk-color-surface-panel);border-color:var(--fk-color-border-default); }
html[data-theme="dark"] .insights-section h3,
html[data-theme="dark"] .insight-card :is(h3,h4) { color:var(--fk-color-text-primary); }
html[data-theme="dark"] .insights-section-heading p,
html[data-theme="dark"] .insight-card p { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] .insights-measured-empty { background:var(--fk-color-surface-panel); }
html[data-theme="dark"] .insights-data-status { background:var(--fk-color-information-subtle);color:var(--fk-color-information); }
html[data-theme="dark"] .insights-provenance span,
html[data-theme="dark"] .insight-step { background:var(--fk-color-primary-subtle);border-color:var(--fk-color-primary-border);color:#c3b7ff; }
html[data-theme="dark"] :is(.insight-card,.insights-diagnostic-state,.insight-suggestion-item) { background:var(--fk-color-surface-card);border-color:var(--fk-color-divider);color:var(--fk-color-text-secondary);box-shadow:none; }
html[data-theme="dark"] .insight-card.hero { background:linear-gradient(135deg,var(--fk-color-primary-subtle),var(--fk-color-surface-card) 68%); }

/* Boards, settings, overlays, buttons, and transient level-four surfaces. */
html[data-theme="dark"] #boards-library-view .board-row { background:var(--fk-color-surface-card);border-color:var(--fk-color-border-default);box-shadow:var(--fk-shadow-card); }
html[data-theme="dark"] :is(.settings-dialog,.brand-workspace-detail,.brand-core-comparison-dialog,dialog,.context-menu,.filter-popover,.tools-menu,.theme-quick-menu,.brand-switcher-menu) { background:var(--fk-color-surface-elevated);border-color:var(--fk-color-border-default);color:var(--fk-color-text-primary); }
html[data-theme="dark"] .fk-btn-primary,
html[data-theme="dark"] .boards-create-btn { background:var(--fk-color-primary-action);border-color:var(--fk-color-primary-action);color:var(--fk-color-button-primary-text);box-shadow:0 8px 20px var(--fk-color-primary-glow); }
html[data-theme="dark"] .fk-btn-secondary { background:var(--fk-color-surface-elevated);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary); }
html[data-theme="dark"] .fk-btn-ghost { background:transparent;border-color:transparent;color:var(--fk-color-text-secondary); }
html[data-theme="dark"] :is(.fk-btn-secondary,.fk-btn-ghost,.fk-btn-icon):hover { background:var(--fk-color-surface-hover);color:var(--fk-color-text-primary); }
html[data-theme="dark"] :is(.fk-btn-destructive,.inspector-danger-action) { background:var(--fk-color-danger-subtle);border-color:color-mix(in srgb,var(--fk-color-danger) 45%,transparent);color:var(--fk-color-danger); }
html[data-theme="dark"] :is(.fk-btn,.fk-btn-icon):focus-visible { box-shadow:var(--fk-focus-shadow); }

/* BW-28.3: one scroll owner and premium campaign-health composition */
#canvas-topbar { flex: 0 0 auto; flex-shrink: 0; }
#insights-view { overflow-y: auto; min-height: 0; overscroll-behavior: contain; scroll-padding-top: var(--fk-space-4); }
#insights-cards.boards-library-panel { max-height: none; height: auto; overflow: visible; padding: var(--fk-space-3); }
.insights-boundary { max-width: 1120px; margin: 0 auto; gap: var(--fk-space-5); padding-bottom: var(--fk-space-6); }
.insights-page-header { grid-template-columns:minmax(0,1fr) auto; align-items:center; padding:var(--fk-space-5); border:1px solid var(--fk-color-border-default); border-radius:var(--fk-radius-xl); background:var(--fk-color-surface-panel); box-shadow:var(--fk-shadow-card); }
.insights-header-copy h2,.insights-header-copy p { margin:0; }.insights-header-copy h2 { color:var(--fk-color-heading);font-size:clamp(1.4rem,3vw,2rem); }.insights-purpose { margin-top:var(--fk-space-2);color:var(--fk-color-text-secondary); }.insights-source { margin-top:var(--fk-space-2);color:var(--fk-color-muted);font-size:var(--fk-font-size-xs); }
.insights-context { grid-column:1; }.insights-refresh { grid-row:1/3; }
.insights-section { padding:var(--fk-space-5); }.insights-overview { border:0;box-shadow:var(--fk-shadow-card); }
.insights-executive-panel { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0; }.insights-executive-panel article { min-width:0;padding:var(--fk-space-4); }.insights-executive-panel article+article { border-left:1px solid var(--fk-color-divider); }.insights-executive-panel :is(h4,p) { margin:0 0 var(--fk-space-2); }
.insights-readiness-ring { --insights-score:0;width:82px;aspect-ratio:1;display:grid;place-content:center;margin-bottom:var(--fk-space-3);border-radius:50%;background:radial-gradient(circle,var(--fk-color-surface-card) 58%,transparent 60%),conic-gradient(var(--fk-color-primary-action) calc(var(--insights-score)*1%),var(--fk-color-surface-secondary) 0);text-align:center; }.insights-readiness-ring strong { font-size:1.3rem; }.insights-readiness-ring span { font-size:.65rem;color:var(--fk-color-muted); }
.insights-attention-list { margin:0;padding:0;list-style:none; }.insights-attention-list button { width:100%;padding:8px 0;border:0;border-bottom:1px solid var(--fk-color-divider);background:transparent;color:var(--fk-color-text-primary);font:inherit;text-align:left;cursor:pointer;overflow-wrap:anywhere; }.insights-attention-list button:hover,.insights-attention-list button:focus-visible { color:var(--fk-color-primary-action); }
.insights-journey-preview { display:flex;align-items:center;margin-top:var(--fk-space-3); }.insights-journey-preview span { display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid var(--fk-color-border-default);font-size:.7rem; }.insights-journey-preview span+span:before { content:"";width:12px;border-top:1px solid var(--fk-color-border-default);position:absolute;transform:translateX(-18px); }.insights-journey-preview .is-covered { color:var(--fk-color-success);background:var(--fk-color-success-subtle); }.insights-journey-preview .is-missing { color:var(--fk-color-warning);background:var(--fk-color-warning-subtle);border-color:var(--fk-color-warning); }
.insights-channel-list { display:grid; }.insights-channel-row { display:grid;gap:5px;padding:4px 0;background:transparent;border-radius:0; }.insights-channel-bar { width:100%;height:5px;border-radius:999px;background:linear-gradient(90deg,var(--fk-color-primary-action) var(--channel-share),var(--fk-color-surface-secondary) 0); }
.insights-campaign-journey { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:var(--fk-space-3);list-style:none;margin:var(--fk-space-4) 0;padding:0;counter-reset:stage; }.insights-campaign-journey li { position:relative;display:grid;grid-template-columns:auto 1fr;gap:2px 8px;align-items:center;min-width:0;padding:var(--fk-space-3);border:1px solid var(--fk-color-border-default);border-radius:var(--fk-radius-lg);background:var(--fk-color-surface-secondary); }.insights-campaign-journey li:not(:last-child):after { content:"→";position:absolute;right:calc(var(--fk-space-3)*-1);z-index:1;color:var(--fk-color-muted); }.insights-campaign-journey .is-covered { border-color:var(--fk-color-success); }.insights-campaign-journey .is-missing { border:2px solid var(--fk-color-warning);background:var(--fk-color-warning-subtle);color:var(--fk-color-warning); }.insights-stage-icon { grid-row:1/3;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;border:1px solid currentColor; }.insights-stage-status { font-size:var(--fk-font-size-xs); }.insights-journey-disclaimer { color:var(--fk-color-muted);font-size:var(--fk-font-size-xs); }
.insights-opportunities { border-color:var(--fk-color-information); }.insights-finding { position:relative;padding-left:48px; }.insights-finding.severity-critical { border-color:var(--fk-color-danger);background:var(--fk-color-danger-subtle); }.insights-finding.severity-important { background:var(--fk-color-warning-subtle); }.insights-severity-icon { position:absolute;left:14px;top:14px;display:grid;place-items:center;width:24px;height:24px;border:1px solid currentColor;border-radius:50%;font-weight:800; }
.insights-diagnostic-groups { grid-template-columns:1fr; }.insights-diagnostic-group { border:0;padding:0;background:transparent; }.insights-diagnostic-row { display:grid;grid-template-columns:28px minmax(160px,.8fr) minmax(130px,.5fr) minmax(220px,1.4fr);gap:var(--fk-space-3);align-items:start;padding:var(--fk-space-3);border:0;border-left:3px solid var(--fk-color-border-default);border-radius:var(--fk-radius-md); }.insights-diagnostic-row+.insights-diagnostic-row { margin-top:var(--fk-space-2); }.insights-diagnostic-row.status-strong { border-left-color:var(--fk-color-success); }.insights-diagnostic-row.status-good-foundation { border-left-color:var(--fk-color-information);background:var(--fk-color-information-subtle); }.insights-diagnostic-row.status-needs-attention { border-left-color:var(--fk-color-warning);background:var(--fk-color-warning-subtle); }.insights-diagnostic-row.status-incomplete { border-left-color:var(--fk-color-danger);background:var(--fk-color-danger-subtle); }.insights-diagnostic-icon { font-weight:800; }.insights-calculation { grid-column:2/-1; }
.insights-disclosure-section { padding:var(--fk-space-3) var(--fk-space-5); }.insights-disclosure-section>.insights-section-heading { margin:0; }.insights-collapsed-disclosure summary { display:flex;align-items:center;gap:var(--fk-space-3);min-height:44px;cursor:pointer;color:var(--fk-color-text-primary); }.insights-collapsed-disclosure summary span:last-child { margin-left:auto;color:var(--fk-color-muted);font-size:var(--fk-font-size-xs); }.insights-unavailable-icon { display:grid;place-items:center;width:24px;height:24px;border:1px solid var(--fk-color-border-default);border-radius:50%; }
.ai-brain-header>div { display:grid;grid-template-columns:auto 1fr;column-gap:var(--fk-space-3); }.ai-brain-header>div .ai-brain-advisor-avatar { grid-row:1/3; }.ai-brain-advisor-avatar { flex:0 0 auto;display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--fk-color-border-default);border-radius:14px;overflow:hidden;background:var(--fk-color-primary-soft);color:var(--fk-color-primary-action);font-weight:800; }.ai-brain-advisor-avatar img { width:100%;height:100%;object-fit:cover; }.ai-brain-empty .ai-brain-advisor-avatar { width:64px;height:64px;margin:0 auto var(--fk-space-3); }.ai-brain-message.is-advisor { display:grid;grid-template-columns:auto 1fr;column-gap:var(--fk-space-3); }.ai-brain-message.is-advisor>.ai-brain-advisor-avatar { grid-row:1/20;align-self:start; }.ai-brain-message.is-loading { align-items:center; }
@media(max-width:900px){.insights-executive-panel{grid-template-columns:repeat(2,minmax(0,1fr))}.insights-executive-panel article:nth-child(3){border-left:0;border-top:1px solid var(--fk-color-divider)}.insights-executive-panel article:nth-child(4){border-top:1px solid var(--fk-color-divider)}.insights-campaign-journey{grid-template-columns:1fr}.insights-campaign-journey li:not(:last-child):after{content:"↓";right:50%;bottom:calc(var(--fk-space-3)*-1);top:auto}.insights-diagnostic-row{grid-template-columns:28px 1fr}.insights-diagnostic-row>:not(.insights-diagnostic-icon){grid-column:2}}
@media(max-width:600px){#insights-cards.boards-library-panel{padding:var(--fk-space-2)}.insights-page-header{grid-template-columns:1fr}.insights-context,.insights-refresh{grid-column:1;grid-row:auto}.insights-refresh{width:100%}.insights-executive-panel{grid-template-columns:1fr}.insights-executive-panel article+article{border-left:0;border-top:1px solid var(--fk-color-divider)}.insights-section{padding:var(--fk-space-3)}.ai-brain-message{max-width:96%}.ai-brain-message.is-advisor{grid-template-columns:34px 1fr}.ai-brain-message.is-advisor>.ai-brain-advisor-avatar{width:34px;height:34px}}

/* BW-29: isolated assumption-based Funnel Simulator */
.simulator-shell{max-width:1180px;margin:0 auto;padding:clamp(18px,3vw,38px);display:grid;gap:24px;color:var(--text-primary,#172033)}
.simulator-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.simulator-header h2{font-size:clamp(1.75rem,3vw,2.5rem);margin:8px 0}.simulator-header p,.simulator-disclosure{color:var(--text-secondary,#5f6878)}
.simulator-badge,.scenario-identity{display:inline-flex;align-items:center;font-weight:750;letter-spacing:.02em;color:var(--accent-primary,#7254d6)}.simulator-disclosure{border-left:4px solid var(--accent-primary,#7254d6);padding:14px 18px;background:var(--surface-secondary,#f7f5ff);border-radius:0 12px 12px 0;margin:0}
.simulator-context,.simulator-scenario,.simulator-results,.simulator-comparison,.simulator-commercial,.simulator-methodology{background:var(--surface-primary,#fff);border:1px solid var(--border-subtle,#dfe3eb);border-radius:18px;padding:20px;box-shadow:var(--shadow-sm,0 4px 16px rgba(20,25,40,.06))}.simulator-context ul{display:flex;flex-wrap:wrap;gap:8px 24px;padding-left:20px}.simulator-context-note{padding:10px 12px;background:var(--surface-secondary,#f6f3ff);border-radius:10px}.simulator-context-boundary{font-size:.88rem;color:var(--text-secondary,#667085)}
.simulator-scenarios,.simulator-funnels,.simulator-commercial-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.simulator-scenario-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:16px}.simulator-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.simulator-field{display:grid;align-content:start;gap:6px}.simulator-field label{font-weight:650}.simulator-field small{color:var(--text-secondary,#667085)}.simulator-input-wrap{display:flex;align-items:center;border:1px solid var(--border-strong,#cbd2df);border-radius:10px;min-height:44px;background:var(--input-bg,#fff);overflow:hidden}.simulator-input-wrap input{min-width:0;width:100%;border:0!important;background:transparent!important;padding:10px 12px}.simulator-input-wrap span{padding-right:12px}.simulator-field select{min-height:44px;border-radius:10px;padding:8px 12px}.simulator-error{min-height:1.1em;color:var(--danger,#b42318);font-size:.82rem}.simulator-field [aria-invalid=true]{outline:2px solid var(--danger,#b42318);outline-offset:-2px}
.simulator-funnel{display:grid;gap:9px}.simulator-stage{width:var(--stage-width);min-width:160px;max-width:100%;padding:12px 14px;border-radius:10px;background:color-mix(in srgb,var(--accent-primary,#7254d6) 13%,var(--surface-primary,#fff));border-left:4px solid var(--accent-primary,#7254d6)}.simulator-alternative .simulator-stage{border-left-style:dashed}.simulator-stage-text{display:grid;gap:2px}.simulator-stage-text>span{font-size:1.25rem;font-weight:750}.simulator-stage-text small{color:var(--text-secondary,#5f6878)}
.simulator-comparison{overflow-x:auto}.simulator-comparison table{width:100%;border-collapse:collapse;min-width:650px}.simulator-comparison th,.simulator-comparison td{text-align:left;padding:12px;border-bottom:1px solid var(--border-subtle,#e2e6ee)}.simulator-commercial-card{display:grid;gap:2px}.commercial-row{display:flex;justify-content:space-between;gap:15px;padding:11px 0;border-bottom:1px solid var(--border-subtle,#e2e6ee)}.simulator-commercial-card button{min-height:44px;margin-top:16px}.simulator-methodology summary{cursor:pointer;font-weight:750;min-height:44px;display:flex;align-items:center}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:800px){.simulator-scenarios,.simulator-funnels,.simulator-commercial-grid{grid-template-columns:1fr}.simulator-fields{grid-template-columns:1fr}.simulator-header{flex-direction:column}.simulator-header button{width:100%;min-height:44px}.simulator-stage{min-width:130px}}
@media(prefers-reduced-motion:reduce){.simulator-shell *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
[data-theme="dark"] .simulator-shell{color:var(--text-primary,#f2f4f8)}

/* BW-29.1: guided simulator hierarchy and authoritative theme-safe surfaces. */
.simulator-shell{padding:clamp(14px,2vw,24px);gap:16px;color:var(--fk-color-text-primary)}
.simulator-header h2{margin:5px 0;font-size:clamp(1.55rem,2.4vw,2rem)}.simulator-header p{margin:0;color:var(--fk-color-text-secondary)}
.simulator-badge{padding:4px 9px;border:1px solid var(--fk-color-primary-border,var(--fk-color-border-default));border-radius:999px;background:var(--fk-color-primary-subtle);color:var(--fk-color-primary-action);font-size:.75rem}
.simulator-disclosure{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;padding:9px 13px;border:1px solid var(--fk-color-border-default);border-left:3px solid var(--fk-color-information);border-radius:10px;background:var(--fk-color-information-subtle);color:var(--fk-color-text-secondary);font-size:.86rem}.simulator-disclosure details{display:flex}.simulator-disclosure summary{cursor:pointer;color:var(--fk-color-text-link)}.simulator-disclosure details span{display:block;margin-top:5px}
.simulator-setup,.simulator-results,.simulator-alternative-section,.simulator-comparison,.simulator-context,.simulator-commercial,.simulator-methodology,.simulator-handoff{padding:18px;border:1px solid var(--fk-color-border-default);border-radius:16px;background:var(--fk-color-surface-panel);box-shadow:var(--fk-shadow-card)}
.simulator-stepper{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0 0 16px;padding:0;list-style:none;counter-reset:none}.simulator-stepper li{padding:8px 10px;border-bottom:2px solid var(--fk-color-divider);color:var(--fk-color-text-muted);font-size:.78rem;font-weight:700}.simulator-stepper li:before{content:attr(data-step);display:inline-grid;place-items:center;width:20px;height:20px;margin-right:7px;border-radius:50%;background:var(--fk-color-surface-elevated)}.simulator-stepper .is-active{border-color:var(--fk-color-primary-action);color:var(--fk-color-text-primary)}
.simulator-step-title{margin:10px 0 12px;font-size:1rem}.simulator-audience-row{max-width:520px}.simulator-rate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.simulator-field label{color:var(--fk-color-text-primary)}.simulator-field small{color:var(--fk-color-text-secondary)}.simulator-input-wrap{background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary)}.simulator-input-wrap input{color:inherit}.simulator-input-wrap:focus-within{border-color:var(--fk-color-primary-action);box-shadow:var(--fk-focus-shadow)}.simulator-interpretation{color:var(--fk-color-information)!important}.simulator-error:empty{min-height:0}.simulator-error{color:var(--fk-color-danger)}
.simulator-results-placeholder{margin:0;padding:22px;border:1px dashed var(--fk-color-border-strong);border-radius:12px;color:var(--fk-color-text-secondary);text-align:center}.simulator-funnel{max-width:850px}.simulator-stage{background:color-mix(in srgb,var(--fk-color-primary-action) 13%,var(--fk-color-surface-card));border-color:var(--fk-color-primary-action);color:var(--fk-color-text-primary)}.simulator-stage-text small{color:var(--fk-color-text-secondary)}
.simulator-alternative-section:not(.is-active){display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 16px}.simulator-alternative-section:not(.is-active) :is(h3,p){margin:0}.simulator-alternative-section:not(.is-active) button{grid-column:2;grid-row:1/3}.simulator-comparison-list{display:grid;gap:6px}.simulator-comparison-row{display:grid;grid-template-columns:1.2fr repeat(3,1fr);gap:10px;padding:10px;border-bottom:1px solid var(--fk-color-divider);color:var(--fk-color-text-secondary)}.simulator-comparison-row strong{color:var(--fk-color-text-primary)}
.simulator-context summary,.simulator-commercial summary,.simulator-methodology summary{min-height:28px;cursor:pointer;color:var(--fk-color-text-primary);font-weight:750}.simulator-context :is(p,li),.simulator-commercial p,.simulator-methodology p,.simulator-handoff p{color:var(--fk-color-text-secondary)}.simulator-context-note{background:var(--fk-color-warning-subtle)}.simulator-handoff button{min-height:44px}
html[data-theme="dark"] #funnel-simulator-view{background:var(--fk-color-page-bg)}
html[data-theme="dark"] .simulator-shell{color:var(--fk-color-text-primary)}
html[data-theme="dark"] .simulator-shell :is(.simulator-setup,.simulator-results,.simulator-alternative-section,.simulator-comparison,.simulator-context,.simulator-commercial,.simulator-methodology,.simulator-handoff){background:var(--fk-color-surface-panel);border-color:var(--fk-color-border-default);color:var(--fk-color-text-primary)}
html[data-theme="dark"] .simulator-disclosure{background:var(--fk-color-information-subtle);border-color:var(--fk-color-border-default);color:var(--fk-color-text-secondary)}
html[data-theme="dark"] .simulator-input-wrap{background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control)}
html[data-theme="dark"] .simulator-stage{background:color-mix(in srgb,var(--fk-color-primary-action) 14%,var(--fk-color-surface-card))}
html[data-theme="dark"] .activity-panel{background:var(--fk-color-surface-panel);border-color:var(--fk-color-border-default);color:var(--fk-color-text-primary)}
html[data-theme="dark"] .activity-toggle{color:var(--fk-color-text-secondary)}
html[data-theme="dark"] .activity-entry{background:var(--fk-color-surface-elevated);border-color:var(--fk-color-divider);box-shadow:var(--fk-shadow-card)}
html[data-theme="dark"] .activity-body p,html[data-theme="dark"] .activity-body strong{color:var(--fk-color-text-primary)}
html[data-theme="dark"] .activity-body time,html[data-theme="dark"] .activity-empty{color:var(--fk-color-text-secondary)}
html[data-theme="dark"] .activity-empty{background:var(--fk-color-surface-card);border-color:var(--fk-color-border-default)}
html[data-theme="dark"] .activity-feed{overflow-y:auto;scrollbar-color:var(--fk-color-scrollbar-thumb) var(--fk-color-scrollbar-track)}
html[data-theme="dark"] .activity-entry.is-clickable:hover,html[data-theme="dark"] .activity-entry.is-clickable:focus-visible{background:var(--fk-color-surface-hover);border-color:var(--fk-color-primary-border);box-shadow:var(--fk-focus-shadow)}
@media(max-width:800px){.simulator-stepper,.simulator-rate-grid{grid-template-columns:1fr}.simulator-alternative-section:not(.is-active){grid-template-columns:1fr}.simulator-alternative-section:not(.is-active) button{grid-column:1;grid-row:auto;width:100%}.simulator-comparison-row{grid-template-columns:1fr 1fr}.simulator-comparison-row strong{grid-column:1/-1}.simulator-shell{padding:10px}.simulator-setup,.simulator-results,.simulator-alternative-section,.simulator-comparison,.simulator-context,.simulator-commercial,.simulator-methodology,.simulator-handoff{padding:14px}}
.simulator-field select{min-height:44px;padding:8px 12px;border:1px solid var(--fk-color-border-control);border-radius:10px;background:var(--fk-color-surface-input);color:var(--fk-color-text-primary)}.simulator-field select:focus-visible{border-color:var(--fk-color-primary-action);outline:0;box-shadow:var(--fk-focus-shadow)}.simulator-commercial-output{padding:10px 14px;border:1px solid var(--fk-color-divider);border-radius:12px;background:var(--fk-color-surface-card)}

/* BW-29.3: editor-only, ephemeral Persona journey. */
.journey-simulator-shell{max-width:1180px;margin:0 auto;padding:clamp(12px,2.5vw,30px);display:grid;gap:16px;color:var(--fk-color-text-primary)}
.simulator-mode-tabs{display:inline-grid;grid-template-columns:1fr 1fr;gap:4px;width:min(100%,520px);padding:4px;border:1px solid var(--fk-color-border-default);border-radius:14px;background:var(--fk-color-surface-secondary)}
.simulator-mode-tab{min-height:44px;padding:9px 14px;border:0;border-radius:10px;background:transparent;color:var(--fk-color-text-secondary);font:inherit;font-weight:750;cursor:pointer}.simulator-mode-tab[aria-selected=true]{background:var(--fk-color-surface-panel);color:var(--fk-color-text-primary);box-shadow:var(--fk-shadow-card)}.simulator-mode-tab[aria-selected=true]::before{content:"✓ ";color:var(--fk-color-primary-action)}
.journey-header{padding:20px;border:1px solid var(--fk-color-border-default);border-radius:18px;background:var(--fk-color-surface-panel);box-shadow:var(--fk-shadow-card)}.journey-header h2{margin:8px 0 6px;font-size:clamp(1.55rem,3vw,2.2rem)}.journey-header p{margin:0;color:var(--fk-color-text-secondary)}
.journey-disclosure,.journey-result-disclosure{margin:0;padding:12px 14px;border-left:3px solid var(--fk-color-information);border-radius:8px;background:var(--fk-color-information-subtle);color:var(--fk-color-text-secondary)}
.journey-summary{position:sticky;top:8px;z-index:4;padding:10px 14px;border:1px solid var(--fk-color-border-default);border-radius:12px;background:var(--fk-color-surface-elevated);box-shadow:var(--fk-shadow-card);font-size:.86rem;font-weight:700}
.journey-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0;padding:0;list-style:none}.journey-steps li{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;padding:10px;border-bottom:3px solid var(--fk-color-divider);color:var(--fk-color-text-muted);font-size:.8rem;font-weight:700}.journey-steps .is-current{border-color:var(--fk-color-primary-action);color:var(--fk-color-text-primary)}.journey-steps .is-complete{border-color:var(--fk-color-success);color:var(--fk-color-text-secondary)}.journey-edit{border:0;background:transparent;color:var(--fk-color-text-link);cursor:pointer}
.journey-panel{display:grid;gap:14px;padding:clamp(14px,2.5vw,24px);border:1px solid var(--fk-color-border-default);border-radius:18px;background:var(--fk-color-surface-panel);box-shadow:var(--fk-shadow-card)}.journey-step-title{margin:0}.journey-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.journey-choice,.journey-stage,.journey-asset,.journey-result-stage,.journey-persona,.journey-insight{padding:14px;border:1px solid var(--fk-color-border-default);border-radius:14px;background:var(--fk-color-surface-card)}.journey-choice.is-selected,.journey-stage.is-selected,.journey-asset.is-selected{border:2px solid var(--fk-color-primary-action);background:var(--fk-color-primary-subtle)}.journey-choice.is-custom{border-style:dashed}.journey-source{display:inline-block;margin-bottom:7px;color:var(--fk-color-text-muted);font-size:.72rem;font-weight:800;text-transform:uppercase}.journey-choice-control{display:block;width:100%;min-height:44px;padding:9px;border:1px solid var(--fk-color-border-control);border-radius:9px;background:var(--fk-color-surface-input);color:var(--fk-color-text-primary);font:inherit;font-weight:700;text-align:left;cursor:pointer}.journey-choice label{display:block;margin:8px 0 4px;font-weight:700}.journey-choice :is(input,textarea){box-sizing:border-box;width:100%;min-height:44px;padding:9px;border:1px solid var(--fk-color-border-control);border-radius:9px;background:var(--fk-color-surface-input);color:var(--fk-color-text-primary)}
.journey-stage-list{display:grid;gap:8px}.journey-stage{display:grid;grid-template-columns:minmax(120px,1fr) minmax(180px,2fr) minmax(140px,1fr);gap:12px;align-items:center}.journey-assets-stage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.journey-assets-stage h4,.journey-assets-stage .journey-gap{grid-column:1/-1}.journey-asset{display:grid;align-content:start;gap:8px}.journey-preview{max-height:7.5em;overflow:hidden;color:var(--fk-color-text-secondary);overflow-wrap:anywhere}.journey-gap{padding:12px;border:2px dashed var(--fk-color-warning);border-radius:10px;background:var(--fk-color-warning-subtle)}
.journey-nav,.journey-playback-controls{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.journey-nav button,.journey-playback-controls button,.journey-run{min-height:44px}.journey-review{display:grid;grid-template-columns:minmax(140px,.35fr) 1fr;margin:0}.journey-review :is(dt,dd){margin:0;padding:8px;border-bottom:1px solid var(--fk-color-divider)}.journey-review dt{font-weight:750}.journey-loading{display:grid;gap:8px;padding:14px;border-radius:12px;background:var(--fk-color-surface-secondary)}.journey-loading span:first-child{color:var(--fk-color-primary-action);font-weight:750}.journey-error{padding:14px;border:1px solid var(--fk-color-danger);border-radius:10px;background:var(--fk-color-danger-subtle);color:var(--fk-color-danger)}
.journey-result-rail{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:9px;overflow-x:auto}.journey-result-stage{border-top:4px solid var(--fk-color-primary-action)}.journey-result-stage.status-explicit_gap{border-top-style:dashed;border-top-color:var(--fk-color-warning)}.journey-result-stage.status-unreachable{border-top-color:var(--fk-color-border-strong)}.journey-personas{display:grid;gap:10px}.journey-persona summary{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer;font-weight:750}.persona-avatar{display:grid;place-items:center;width:42px;height:42px;border:2px solid var(--fk-color-primary-action);border-radius:14px;background:repeating-linear-gradient(135deg,var(--fk-color-primary-subtle) 0 6px,var(--fk-color-surface-elevated) 6px 12px);color:var(--fk-color-text-primary)}.persona-timeline-row{margin-left:20px;padding:10px 16px;border-left:3px solid var(--fk-color-border-strong)}.persona-timeline-row h5{margin:0}.persona-timeline-row p{margin:6px 0;color:var(--fk-color-text-secondary)}.journey-insight ul{margin-bottom:0}.journey-empty{padding:18px;border:1px dashed var(--fk-color-border-strong);border-radius:12px;background:var(--fk-color-surface-secondary);color:var(--fk-color-text-secondary)}
html[data-theme=dark] .journey-simulator-shell :is(.journey-header,.journey-panel,.journey-choice,.journey-stage,.journey-asset,.journey-result-stage,.journey-persona,.journey-insight,.simulator-mode-tab[aria-selected=true]){background:var(--fk-color-surface-panel);color:var(--fk-color-text-primary)}
@media(max-width:768px){.journey-steps,.journey-card-grid,.journey-assets-stage{grid-template-columns:1fr}.journey-stage{grid-template-columns:1fr}.journey-assets-stage h4,.journey-assets-stage .journey-gap{grid-column:1}.journey-summary{top:4px}.journey-nav{position:sticky;bottom:4px;padding:8px;background:var(--fk-color-surface-elevated);border-radius:12px}.journey-nav button{flex:1}.journey-result-rail{grid-template-columns:1fr;overflow:visible}.journey-review{grid-template-columns:1fr}.journey-review dd{padding-top:0}.journey-steps li{overflow-wrap:anywhere}}
@media(max-width:360px){.simulator-mode-tabs{grid-template-columns:1fr}.journey-simulator-shell{padding:8px}.journey-panel{padding:12px}}
@media(prefers-reduced-motion:reduce){.journey-simulator-shell *{animation:none;transition:none;scroll-behavior:auto}}

/* BW-29.3.2: compact, content-first journey configuration. */
.journey-simulator-shell{gap:10px;padding:clamp(8px,1.5vw,18px)}
.journey-header{padding:14px 16px;border:0;box-shadow:none}.journey-header h2{font-size:clamp(1.3rem,2.3vw,1.75rem)}
.journey-summary{position:static;padding:7px 10px;box-shadow:none}
.journey-steps{display:flex;gap:6px;overflow-x:auto;padding:2px}.journey-steps li{flex:0 0 auto;padding:0;border:0}.journey-step-button{min-height:36px;padding:7px 11px;border:1px solid var(--fk-color-border-default);border-radius:999px;background:var(--fk-color-surface-secondary);color:var(--fk-color-text-secondary);font:inherit;font-size:.78rem;font-weight:750;white-space:nowrap;cursor:pointer}.journey-step-button[aria-current=step]{border-color:var(--fk-color-primary-action);background:var(--fk-color-primary-subtle);color:var(--fk-color-text-primary)}.journey-steps .is-complete .journey-step-button{color:var(--fk-color-success);border-color:var(--fk-color-success)}
.journey-panel{gap:10px;padding:clamp(12px,1.7vw,18px);box-shadow:none}.journey-step-title{font-size:1.05rem}
.journey-choice,.journey-stage,.journey-asset{padding:10px;border-radius:12px}.journey-choice p{display:-webkit-box;margin:6px 0 0;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;color:var(--fk-color-text-secondary)}
.journey-stage-list{grid-template-columns:repeat(5,minmax(135px,1fr));overflow-x:auto}.journey-stage{position:relative;display:grid;grid-template-columns:1fr;gap:5px}.journey-stage:not(:last-child)::after{content:'→';position:absolute;right:-9px;top:50%;z-index:1;color:var(--fk-color-text-muted)}
.journey-assets-stage{padding-top:5px;border-top:1px solid var(--fk-color-divider)}.journey-stage-heading{margin:5px 0}.journey-preview{display:-webkit-box;max-height:none;margin:0;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.journey-readiness{justify-self:start;padding:3px 7px;border:1px solid currentColor;border-radius:999px;font-size:.7rem;font-weight:800}.journey-readiness.is-ready{color:var(--fk-color-success)}.journey-readiness.is-attention{color:var(--fk-color-warning)}.journey-readiness.is-incomplete{color:var(--fk-color-danger)}.journey-asset.readiness-attention{border-color:var(--fk-color-warning)}.journey-asset.readiness-incomplete{border-color:var(--fk-color-danger);background:var(--fk-color-danger-subtle)}.journey-issues{margin:0;padding-left:18px;color:var(--fk-color-text-secondary);font-size:.8rem}
.journey-review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.journey-review-card{min-width:0;padding:11px;border-radius:12px;background:var(--fk-color-surface-secondary)}.journey-review-card h4{margin:0 0 7px}.journey-review-card small{display:block;margin-top:6px;color:var(--fk-color-text-muted)}.journey-mini-rail{display:flex;flex-wrap:wrap;gap:4px}.journey-mini-rail span{padding:3px 6px;border-radius:999px;background:var(--fk-color-success-subtle);font-size:.72rem}.journey-mini-rail .is-gap{background:var(--fk-color-warning-subtle);color:var(--fk-color-warning)}.journey-review-assets{margin:4px 0;font-size:.78rem;overflow-wrap:anywhere}.journey-preflight{padding:8px 10px;border-radius:9px;background:var(--fk-color-surface-secondary);font-size:.8rem;font-weight:700}.journey-details{font-size:.8rem;color:var(--fk-color-text-secondary)}.journey-details summary{cursor:pointer;font-weight:750}.journey-run-footer{position:sticky;bottom:6px;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:9px 10px;border:1px solid var(--fk-color-border-default);border-radius:12px;background:var(--fk-color-surface-elevated);box-shadow:var(--fk-shadow-card)}.journey-run-footer span{font-size:.78rem;color:var(--fk-color-text-secondary)}.journey-run{width:auto}.journey-loading{padding:12px}.journey-error{padding:10px}
html[data-theme=dark] :is(.journey-review-card,.journey-preflight,.journey-step-button,.journey-run-footer){background:var(--fk-color-surface-panel);color:var(--fk-color-text-primary)}
@media(max-width:768px){.journey-steps{display:flex}.journey-stage-list{grid-template-columns:repeat(5,minmax(135px,1fr))}.journey-review-grid{grid-template-columns:1fr}.journey-run-footer{align-items:stretch;flex-direction:column}.journey-run-footer .journey-run{width:100%}}

/* BW-29.3.3: Persona-first, compact and readable simulation journey. */
.journey-simulator-shell{max-width:980px}.journey-readiness-explanation{margin:0;color:var(--fk-color-text-secondary);font-size:.82rem}.journey-review-grid{align-items:start}.journey-review-card{display:grid;gap:5px}.journey-review-assets{padding-left:8px;border-left:2px solid var(--fk-color-divider)}
.journey-error{margin-top:4px}.journey-personas{gap:16px}.journey-persona{padding:16px}.persona-header{display:flex;align-items:center;gap:12px;padding-bottom:10px;border-bottom:1px solid var(--fk-color-divider);font-weight:750;white-space:pre-line}.persona-context{color:var(--fk-color-text-secondary)}.persona-timeline{display:grid;margin-top:14px}.persona-timeline-row{position:relative;margin-left:20px;padding:12px 14px 16px 20px;border-left:3px solid var(--fk-color-primary-action)}.persona-timeline-row:not(:last-child)::after{content:'↓';position:absolute;left:-10px;bottom:-10px;z-index:1;padding:1px;background:var(--fk-color-surface-card);color:var(--fk-color-primary-action)}.persona-timeline-row h4{margin:0 0 4px}.asset-encounter{display:block;margin-bottom:7px;color:var(--fk-color-text-primary)}.reaction-copy{font-weight:650}.journey-result-badges{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.outcome-badge,.decision-badge{padding:4px 8px;border:1px solid currentColor;border-radius:999px;font-size:.75rem;font-weight:800}.outcome-badge.is-lands,.decision-badge.is-continues{color:var(--fk-color-success)}.outcome-badge.is-uncertain,.decision-badge.is-hesitates{color:var(--fk-color-warning)}.outcome-badge.is-misses,.decision-badge.is-drops_off{color:var(--fk-color-danger)}.journey-aggregate-heading{margin-top:22px}.journey-insight{padding:12px}.journey-insight h3{margin-top:0;font-size:1rem}
html[data-theme=dark] :is(.persona-timeline-row:not(:last-child)::after){background:var(--fk-color-surface-panel)}
@media(max-width:768px){.journey-persona{padding:12px}.persona-timeline-row{margin-left:8px;padding-right:4px}.journey-run-footer{position:static}.journey-run-footer .journey-run{width:auto;align-self:flex-end}.journey-review-assets{overflow-wrap:anywhere}}

.journey-error-support{display:block;margin-top:6px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;opacity:.82}
.journey-copy-diagnostics{display:inline-flex;margin-top:7px;padding:4px 8px;border:1px solid currentColor;border-radius:7px;background:transparent;color:inherit;font:inherit;font-size:.72rem;cursor:pointer}
.journey-copy-diagnostics:focus-visible{outline:2px solid var(--fk-color-focus-ring);outline-offset:2px}
html[data-theme=dark] .journey-copy-diagnostics{color:var(--fk-color-text-primary)}

/* BW-27.6 — Campaign Canvas controls and overlays.  The legacy declarations
   above use light literals for focused editable node bodies, floating filter
   surfaces/chips, and the node picker.  These component-scoped rules follow
   those declarations so Dark Mode wins without altering their Light Mode map. */
html[data-theme="dark"] .node:is(.selected,.content-expanded) :is(.title,.content)[contenteditable],
html[data-theme="dark"] .node :is(.title,.content)[contenteditable="true"] {
  background:var(--fk-color-surface-input);
  border:1px solid var(--fk-color-border-control);
  color:var(--fk-color-text-primary);
  caret-color:var(--fk-color-text-primary);
}
html[data-theme="dark"] .node :is(.title,.content)[contenteditable="true"]:hover { background:var(--fk-color-surface-elevated); }
html[data-theme="dark"] .node :is(.title,.content)[contenteditable="true"]:focus {
  background:var(--fk-color-surface-input);border-color:var(--fk-color-primary-action);color:var(--fk-color-text-primary);outline:0;box-shadow:var(--fk-focus-shadow);
}
html[data-theme="dark"] .node :is(.title,.content)[contenteditable="true"]:empty:not(:focus)::before { color:var(--fk-color-text-muted);opacity:1; }
html[data-theme="dark"] .node :is(.title,.content)[contenteditable="false"] { background:var(--fk-color-surface-secondary);color:var(--fk-color-text-disabled); }
html[data-theme="dark"] .node :is(.title,.content)[contenteditable]::selection {
  background:rgba(124,92,255,.42);color:#fdfdff;
}

html[data-theme="dark"] .postit:not(.ai-review-postit).is-resolved { opacity:1;filter:saturate(.82); }
html[data-theme="dark"] .postit:not(.ai-review-postit) { --postit-text-muted:#625526; }
html[data-theme="dark"] .postit:not(.ai-review-postit) .postit-replies {
  background:color-mix(in srgb,var(--postit-body) 72%,var(--postit-surface));border:1px solid var(--postit-border);border-radius:7px;padding:7px;
}
html[data-theme="dark"] .postit:not(.ai-review-postit) .postit-user,
html[data-theme="dark"] .postit:not(.ai-review-postit) .postit-reply-meta strong { color:var(--postit-text);font-weight:800; }
html[data-theme="dark"] .postit:not(.ai-review-postit) .postit-reply-body p { color:var(--postit-text-secondary); }
html[data-theme="dark"] .postit:not(.ai-review-postit) .postit-reply-editor { border-color:var(--postit-border); }
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-resolve,.postit-reply-button,.postit-delete) { min-width:44px;min-height:44px; }
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-resolve,.postit-reply-button,.postit-delete):active { background:var(--postit-surface); }
html[data-theme="dark"] .postit:not(.ai-review-postit) :is(.postit-resolve,.postit-reply-button,.postit-delete):disabled { background:var(--postit-secondary);color:var(--postit-text-muted);cursor:not-allowed; }

html[data-theme="dark"] :is(#floating-filters-popover,#floating-utilities-popover).floating-filter-popover {
  background:var(--fk-color-surface-panel);border-color:var(--fk-color-border-default);color:var(--fk-color-text-primary);box-shadow:var(--fk-shadow-modal);
}
html[data-theme="dark"] :is(#floating-filters-popover,#floating-utilities-popover) .filter-group + .filter-group { border-top:1px solid var(--fk-color-divider);padding-top:8px; }
html[data-theme="dark"] :is(#floating-filters-popover,#floating-utilities-popover) .filter-group > strong { color:var(--fk-color-text-secondary); }
html[data-theme="dark"] :is(#floating-filters-popover,#floating-utilities-popover) .node-filter-chips button {
  min-height:44px;background:var(--fk-color-surface-input);border-color:var(--fk-color-border-control);color:var(--fk-color-text-primary);overflow-wrap:anywhere;
}
html[data-theme="dark"] :is(#floating-filters-popover,#floating-utilities-popover) .node-filter-chips button:hover { background:var(--fk-color-surface-hover); }
html[data-theme="dark"] :is(#floating-filters-popover,#floating-utilities-popover) .node-filter-chips button:focus-visible { border-color:var(--fk-color-primary-action);outline:0;box-shadow:var(--fk-focus-shadow); }
html[data-theme="dark"] #floating-filters-popover .node-filter-chips button.active {
  background:var(--fk-color-primary-subtle);border-color:var(--fk-color-primary-action);color:#ddd6ff;font-weight:800;
}
html[data-theme="dark"] #floating-filters-popover .node-filter-chips button.active::before { content:"✓ "; }
html[data-theme="dark"] :is(#floating-filters-popover,#floating-utilities-popover) .node-filter-chips button:disabled { background:var(--fk-color-surface-disabled);color:var(--fk-color-text-disabled); }
html[data-theme="dark"] :is(#floating-filters-popover,#floating-utilities-popover) :is(.owner-filter-option,.board-row-meta) { color:var(--fk-color-text-muted);overflow-wrap:anywhere; }
html[data-theme="dark"] :is(#floating-filters-popover,#floating-utilities-popover) .node-filter-owner-avatar { background:var(--fk-color-primary-subtle); }

html[data-theme="dark"] #node-type-picker.node-type-picker { background:var(--fk-color-overlay-backdrop); }
html[data-theme="dark"] #node-type-picker .picker-panel {
  background:var(--fk-color-surface-elevated);border:1px solid var(--fk-color-border-default);color:var(--fk-color-text-primary);box-shadow:var(--fk-shadow-modal);
}
html[data-theme="dark"] #node-type-picker .picker-panel h3 { color:var(--fk-color-text-primary); }
html[data-theme="dark"] #node-type-picker .picker-option {
  min-height:44px;background:var(--fk-color-surface-input);color:var(--fk-color-text-primary);font-weight:750;box-shadow:inset 3px 0 0 currentColor;
}
html[data-theme="dark"] #node-type-picker .picker-option:hover { background:color-mix(in srgb,var(--fk-color-primary-action) 10%,var(--fk-color-surface-input)); }
html[data-theme="dark"] #node-type-picker .picker-option:active { background:var(--fk-color-primary-subtle); }
html[data-theme="dark"] #node-type-picker .picker-option:focus-visible { outline:0;box-shadow:inset 3px 0 0 currentColor,var(--fk-focus-shadow); }
html[data-theme="dark"] #node-type-picker .picker-option:disabled { background:var(--fk-color-surface-disabled);color:var(--fk-color-text-disabled); }
@media(max-width:480px) {
  html[data-theme="dark"] #node-type-picker .picker-panel { width:min(92vw,580px);max-height:88vh;overflow:auto;padding:12px; }
  html[data-theme="dark"] #node-type-picker .picker-options { grid-template-columns:1fr; }
}
/* BW-31.1 read-only Content Workspace */
.cw-workspace-tabs{display:flex;gap:4px;border-bottom:1px solid var(--border-color,#d8dee8);margin:0 0 16px;padding:0 4px}.cw-workspace-tabs [role="tab"]{min-height:44px;padding:8px 14px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--text-secondary,#53606f);font-weight:700}.cw-workspace-tabs [aria-selected="true"]{border-color:var(--primary-color,#635bff);color:var(--text-primary,#172033)}
.cw-calendar{display:grid;gap:14px}.cw-calendar>header h2{margin-bottom:4px}.cw-calendar>header p{max-width:760px;color:var(--text-secondary,#53606f)}.cw-calendar-controls{display:grid;gap:10px}.cw-period-nav,.cw-calendar-controls [role="tablist"],.cw-calendar-filters{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.cw-calendar button,.cw-calendar select,.cw-calendar input{min-height:44px}.cw-calendar button{border:1px solid var(--border-color,#d8dee8);border-radius:9px;background:var(--surface-primary,#fff);color:var(--text-primary,#172033);padding:7px 11px}.cw-calendar-controls [role="tab"][aria-selected="true"]{background:var(--primary-color,#635bff);color:#fff}.cw-calendar-filters label{font-size:.75rem;font-weight:700;display:grid;gap:3px}.cw-calendar-filters select{max-width:150px;background:var(--surface-primary,#fff);color:var(--text-primary,#172033);border:1px solid var(--border-color,#d8dee8);border-radius:8px}.cw-planning-overview{display:flex;gap:8px;flex-wrap:wrap}.cw-planning-overview span{padding:6px 10px;border-radius:999px;background:var(--surface-secondary,#f4f6fa);font-size:.82rem}.cw-calendar-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,300px);gap:14px}.cw-calendar-layout>main,.cw-calendar-layout>aside{min-width:0}.cw-calendar-layout>aside{border:1px solid var(--border-color,#d8dee8);border-radius:12px;padding:12px;align-self:start}.cw-weekdays,.cw-month-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.cw-weekdays span{text-align:center;font-size:.75rem;font-weight:800;padding:7px}.cw-calendar-day{min-height:128px;border:1px solid var(--border-color,#d8dee8);padding:4px;overflow:hidden;background:var(--surface-primary,#fff)}.cw-calendar-day.is-outside{opacity:.55}.cw-calendar-day.is-today{box-shadow:inset 0 0 0 2px var(--primary-color,#635bff)}.cw-day-number{min-width:44px}.cw-calendar-event{width:100%;min-height:0!important;margin:2px 0;padding:4px 5px!important;display:grid!important;grid-template-columns:auto 1fr auto;gap:4px;text-align:left;font-size:.72rem}.cw-calendar-event span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cw-calendar-event small{grid-column:2;color:inherit;opacity:.75}.cw-calendar-event.is-warning{border-left:4px solid var(--warning-color,#b76e00)}.cw-overflow{font-size:.75rem;font-weight:700}.cw-agenda{display:grid;gap:12px}.cw-agenda section{border-bottom:1px solid var(--border-color,#d8dee8)}.cw-agenda-item{display:grid;grid-template-columns:minmax(180px,1fr) 1fr;gap:10px;padding:8px 0}.cw-agenda-item>div{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:.8rem}.cw-unscheduled{display:grid;gap:6px;padding:9px 0;border-bottom:1px solid var(--border-color,#d8dee8);overflow-wrap:anywhere}.cw-unscheduled>span{font-size:.78rem;color:var(--text-secondary,#53606f)}.cw-schedule-dialog label{display:grid;gap:4px;margin:10px 0}.cw-schedule-dialog input:not([type="checkbox"]):not([type="radio"]){width:100%;min-height:44px;background:var(--surface-primary,#fff);color:var(--text-primary,#172033);border:1px solid var(--border-color,#d8dee8);border-radius:8px;padding:8px}.cw-dialog-warning{overflow-wrap:anywhere}
@media(max-width:900px){.cw-calendar-layout{grid-template-columns:1fr}.cw-calendar-day{min-height:105px}.cw-calendar-event small{display:none}}
@media(max-width:640px){.cw-month{display:none}.cw-calendar-layout{display:block}.cw-calendar-layout>aside{margin-top:12px}.cw-calendar-filters label{width:calc(50% - 6px)}.cw-calendar-filters select{max-width:none;width:100%}.cw-agenda-item{grid-template-columns:1fr}.cw-schedule-dialog{width:min(100vw,100%);max-height:100vh;border-radius:14px 14px 0 0;position:absolute;bottom:0}.cw-dialog-backdrop{align-items:flex-end}}
@media(prefers-reduced-motion:reduce){.cw-calendar *{scroll-behavior:auto!important;transition:none!important}}
.content-workspace-view{width:100%;min-width:0;overflow:auto;background:var(--fk-bg,#f6f7fb);color:var(--fk-text,#172033)}
.cw-page{max-width:1600px;margin:0 auto;padding:clamp(16px,2.4vw,36px);display:grid;gap:18px}
.cw-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.cw-header h1{margin:0 0 6px;font-size:clamp(1.65rem,3vw,2.35rem)}.cw-header p{margin:4px 0;color:var(--fk-text-muted,#657084)}.cw-context{font-size:.86rem}.cw-readonly{display:inline-flex;margin-top:8px;font-size:.8rem;font-weight:700}
.cw-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));background:var(--fk-surface,#fff);border:1px solid var(--fk-border,#dce1eb);border-radius:14px;overflow:hidden}.cw-metric{min-height:76px;padding:13px 16px;border:0;border-right:1px solid var(--fk-border,#dce1eb);background:transparent;color:inherit;text-align:left;display:flex;flex-direction:column;justify-content:center;gap:4px}.cw-metric strong{font-size:1.35rem}.cw-metric[aria-pressed=true]{box-shadow:inset 0 -3px var(--fk-accent,#6757d9);background:var(--fk-surface-selected,#eeecff)}button.cw-metric{cursor:pointer}
.cw-controls{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:14px;background:var(--fk-surface,#fff);border:1px solid var(--fk-border,#dce1eb);border-radius:14px}.cw-controls label{display:grid;gap:5px;font-size:.78rem;font-weight:700}.cw-controls input,.cw-controls select{min-height:44px;border:1px solid var(--fk-border,#cbd2df);border-radius:9px;padding:0 10px;background:var(--fk-input-bg,var(--fk-surface,#fff));color:inherit;max-width:100%}.cw-search{flex:1 1 280px}.cw-search input{width:100%}.cw-filter-disclosure{flex:3 1 580px}.cw-filter-disclosure summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:700}.cw-filter-grid{display:flex;flex-wrap:wrap;gap:9px}.cw-results{font-size:.85rem;color:var(--fk-text-muted,#657084)}.cw-page>h2{margin:0}
.cw-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr));gap:16px}.cw-card{min-width:0;display:flex;flex-direction:column;gap:10px;padding:16px;background:var(--fk-surface,#fff);border:1px solid var(--fk-border,#dce1eb);border-radius:14px;box-shadow:var(--fk-shadow-sm,0 4px 14px #18203a0a)}.cw-card:hover{border-color:var(--fk-border-strong,#aeb8ca)}.cw-card-head,.cw-actions,.cw-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.cw-card-head{justify-content:space-between}.cw-role{font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;overflow-wrap:anywhere}.cw-readiness{font-size:.76rem;font-weight:800}.cw-ready{color:var(--fk-success,#16704b)}.cw-needs-attention{color:var(--fk-warning,#8a5b00)}.cw-incomplete{color:var(--fk-danger,#a52b35)}.cw-card h3{margin:0;font-size:1.08rem;overflow-wrap:anywhere}.cw-preview{margin:0;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45;min-height:4.3em;overflow-wrap:anywhere}.cw-meta{font-size:.75rem;color:var(--fk-text-muted,#657084)}.cw-meta span{overflow-wrap:anywhere}.cw-issues,.cw-next{margin:0;font-size:.78rem}.cw-next{color:var(--fk-text-muted,#657084)}.cw-actions{margin-top:auto}.cw-actions .fk-btn{min-height:44px}.cw-media{width:100%;height:132px;object-fit:cover;border-radius:10px;background:var(--fk-surface-muted,#e9edf4)}.cw-media-fallback{display:grid;place-items:center;color:var(--fk-text-muted,#657084)}.cw-method,.cw-empty{padding:16px;background:var(--fk-surface,#fff);border:1px solid var(--fk-border,#dce1eb);border-radius:12px}.cw-method summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center}.cw-feedback{position:fixed;z-index:30;right:20px;bottom:20px;background:var(--fk-inverse-bg,#202535);color:var(--fk-inverse-text,#fff);padding:10px 14px;border-radius:9px}.cw-feedback:empty{display:none}
.cw-page :focus-visible{outline:3px solid var(--fk-focus,#7767e8);outline-offset:2px}
@media(max-width:720px){.cw-page{padding:12px}.cw-header{align-items:stretch;flex-direction:column}.cw-header>.fk-btn{width:100%}.cw-overview{grid-template-columns:repeat(2,1fr)}.cw-controls{align-items:stretch}.cw-search,.cw-filter-disclosure{flex-basis:100%}.cw-filter-grid{display:grid;grid-template-columns:1fr}.cw-filter-grid label,.cw-filter-grid select{width:100%}.cw-grid{grid-template-columns:1fr}.cw-actions .fk-btn{flex:1 1 100%}}
@media(prefers-reduced-motion:reduce){.content-workspace-view *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
[data-theme="dark"] .content-workspace-view,.dark .content-workspace-view{--fk-bg:#11131a;--fk-surface:#1a1e28;--fk-input-bg:#141821;--fk-border:#343b4b;--fk-border-strong:#586176;--fk-text:#edf0f7;--fk-text-muted:#aab2c3;--fk-surface-selected:#29264a;--fk-surface-muted:#252a36;--fk-inverse-bg:#f0f2f8;--fk-inverse-text:#151823}
/* BW-31.2 human review workflow */
.cw-overview{display:grid;grid-template-columns:1.25fr 1fr;gap:1px}.cw-metric-group{display:grid;grid-template-columns:repeat(4,minmax(88px,1fr));background:var(--fk-surface,#fff)}.cw-metric-group:last-child{grid-template-columns:repeat(3,minmax(88px,1fr))}.cw-metric-group h2{grid-column:1/-1;margin:0;padding:10px 16px 0;font-size:.78rem;color:var(--fk-text-muted,#657084);text-transform:uppercase;letter-spacing:.04em}
.cw-review-queue{display:grid;gap:12px;padding:16px;background:var(--fk-surface,#fff);border:1px solid var(--fk-border,#dce1eb);border-radius:14px}.cw-review-queue h2,.cw-review-queue p{margin:0}.cw-review-queue>div:first-child p{margin-top:4px;color:var(--fk-text-muted,#657084);font-size:.85rem}.cw-queue-filters{display:flex;gap:7px;flex-wrap:wrap}.cw-queue-filters button{min-height:44px;padding:7px 12px;border:1px solid var(--fk-border,#cbd2df);border-radius:999px;background:var(--fk-input-bg,var(--fk-surface,#fff));color:inherit;font-weight:700}.cw-queue-filters button[aria-pressed="true"]{background:var(--fk-surface-selected,#eeecff);border-color:var(--fk-border-strong,#8e82e8)}.cw-queue-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:10px}.cw-queue-card{box-shadow:none}.cw-badges{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.cw-status,.cw-readiness{display:inline-flex;align-items:center;min-height:26px;padding:3px 8px;border-radius:999px;border:1px solid var(--fk-border,#dce1eb);font-size:.74rem;font-weight:800}.cw-status-in-review{background:var(--fk-surface-selected,#eeecff)}.cw-status-needs-changes{background:color-mix(in srgb,var(--fk-warning,#8a5b00) 12%,transparent)}.cw-status-approved{background:color-mix(in srgb,var(--fk-success,#16704b) 12%,transparent)}.cw-review-note{margin:0;padding:9px;border-left:3px solid var(--fk-warning,#8a5b00);background:var(--fk-surface-muted,#f2f4f8);font-size:.78rem;overflow-wrap:anywhere}
.cw-action-menu{position:relative}.cw-action-menu summary{list-style:none;display:flex;align-items:center;cursor:pointer}.cw-action-menu summary::-webkit-details-marker{display:none}.cw-action-menu>div{position:absolute;z-index:5;right:0;bottom:calc(100% + 5px);min-width:190px;padding:6px;display:grid;background:var(--fk-surface,#fff);border:1px solid var(--fk-border,#dce1eb);border-radius:10px;box-shadow:var(--fk-shadow-md,0 12px 30px #10162933)}.cw-action-menu button{min-height:44px;border:0;background:transparent;color:inherit;text-align:left;padding:8px;border-radius:7px}.cw-action-menu button:hover{background:var(--fk-surface-muted,#f2f4f8)}
.cw-dialog-backdrop{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:20px;background:#080b12a8}.cw-dialog{width:min(540px,100%);max-height:min(760px,calc(100vh - 40px));overflow:auto;display:grid;gap:14px;padding:22px;background:var(--fk-surface,#fff);color:var(--fk-text,#172033);border:1px solid var(--fk-border,#dce1eb);border-radius:16px;box-shadow:0 24px 80px #0006}.cw-dialog h2,.cw-dialog h3,.cw-dialog p{margin:0}.cw-dialog label{display:grid;gap:6px;font-weight:700}.cw-dialog textarea{min-height:120px;resize:vertical;padding:10px;border:1px solid var(--fk-border,#cbd2df);border-radius:9px;background:var(--fk-input-bg,var(--fk-surface,#fff));color:inherit}.cw-dialog-warning{padding:10px;border-left:4px solid var(--fk-warning,#8a5b00);background:var(--fk-surface-muted,#f2f4f8)}.cw-confirm{grid-template-columns:auto 1fr!important;align-items:start}.cw-confirm input{width:20px;height:20px}.cw-dialog-actions{display:flex;justify-content:flex-end;gap:9px}.cw-inline-error{color:var(--fk-danger,#a52b35);font-size:.82rem;min-height:1em}
[data-theme="dark"] .cw-dialog,.dark .cw-dialog{--fk-surface:#1a1e28;--fk-input-bg:#141821;--fk-border:#343b4b;--fk-text:#edf0f7;--fk-surface-muted:#252a36}
@media(max-width:900px){.cw-overview{grid-template-columns:1fr}.cw-metric-group{grid-template-columns:repeat(4,1fr)}}
@media(max-width:720px){.cw-metric-group,.cw-metric-group:last-child{grid-template-columns:repeat(2,1fr)}.cw-queue-list{grid-template-columns:1fr}.cw-dialog-backdrop{align-items:end;padding:0}.cw-dialog{width:100%;max-height:92vh;border-radius:18px 18px 0 0}.cw-dialog-actions .fk-btn{flex:1;min-height:48px}}

/* BW-31.5.1 source-local operational feedback; no workspace geometry changes. */
.content-operations-source-feedback{margin:8px 0 0;padding:8px 10px;max-width:36rem;border-radius:8px;border:1px solid var(--fk-warning,#8a5b00);background:var(--fk-surface,#fff);color:var(--fk-text,#202535);font-size:.8rem;line-height:1.4}
[data-theme="dark"] .content-operations-source-feedback{background:var(--fk-surface,#202535);color:var(--fk-text,#f5f7ff)}

/* BW-31.5.2 compact operational Content Workspace */
.cw-content{display:grid;gap:12px}.cw-attention{display:flex;gap:8px;flex-wrap:wrap;padding:8px;border:1px solid var(--fk-border,#dce1eb);border-radius:12px;background:var(--fk-surface,#fff)}.cw-attention button{min-height:44px;display:flex;gap:9px;align-items:center;padding:7px 12px;border:1px solid transparent;border-radius:9px;background:transparent;color:inherit}.cw-attention button strong{min-width:1.6rem;padding:2px 6px;border-radius:999px;background:var(--fk-surface-muted,#e9edf4)}.cw-attention button[aria-pressed="true"]{border-color:var(--fk-border-strong,#7767e8);background:var(--fk-surface-selected,#eeecff)}
.cw-filter-disclosure{position:relative;flex:0 1 auto}.cw-filter-disclosure>summary{padding:0 12px;border:1px solid var(--fk-border,#cbd2df);border-radius:9px}.cw-filter-grid{position:absolute;z-index:20;right:0;top:calc(100% + 6px);width:min(680px,calc(100vw - 32px));padding:12px;border:1px solid var(--fk-border,#dce1eb);border-radius:12px;background:var(--fk-surface,#fff);box-shadow:var(--fk-shadow-md,0 12px 30px #10162933)}.cw-filter-count{margin-left:6px;padding:2px 7px;border-radius:999px;background:var(--fk-surface-selected,#eeecff);font-size:.75rem}.cw-viewer-note{margin:0;padding:9px 12px;border-radius:9px;background:var(--fk-surface-muted,#e9edf4)}.cw-missing-details{font-size:.78rem}.cw-missing-details summary{min-height:44px;display:flex;align-items:center;font-weight:700}.cw-missing-details span{display:block;color:var(--fk-text-muted,#657084)}
.cw-page{max-width:none;padding:clamp(14px,2vw,28px);gap:12px}.cw-header h1{font-size:clamp(1.45rem,2.3vw,2rem)}.cw-header p{max-width:680px}.cw-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:12px}.cw-card{padding:14px;gap:8px}.cw-preview{min-height:0;-webkit-line-clamp:3}.cw-actions{justify-content:space-between}.cw-actions>.fk-btn{flex:1}.cw-action-menu summary{min-width:44px;justify-content:center}.cw-planning-overview{padding:8px;border:1px solid var(--fk-border,#dce1eb);border-radius:12px;background:var(--fk-surface,#fff)}
@media(max-width:640px){.cw-filter-disclosure{position:static;width:100%}.cw-filter-grid{position:fixed;inset:auto 0 0;width:100%;max-height:80vh;overflow:auto;display:grid;grid-template-columns:1fr;padding:16px;border-radius:16px 16px 0 0}.cw-attention{display:grid;grid-template-columns:1fr 1fr}.cw-attention button{justify-content:space-between}.cw-header>.fk-btn{width:auto;align-self:flex-start}.cw-card{border-radius:11px}.cw-action-menu>div{position:fixed;left:12px;right:12px;bottom:12px}.cw-calendar-controls [role="tab"][data-calendar-view="month"]{display:none}}
.cw-legacy-hooks{display:none!important}
/* BW-32.2.2: keep LinkedIn identity, metadata, and actions visually distinct. */
#linkedin-connection-card { grid-template-columns:minmax(90px,.6fr) minmax(180px,1.4fr) auto auto; }
#linkedin-connection-card > div { display:flex; min-width:0; flex-direction:column; gap:var(--fk-space-1); }
#linkedin-connection-status { display:block; font-weight:600; overflow-wrap:anywhere; }
#linkedin-connection-detail { display:block; color:var(--fk-color-muted); line-height:1.45; overflow-wrap:anywhere; }
#linkedin-connection-card button { min-height:44px; }
#linkedin-connection-result[data-state="success"] { color:var(--fk-color-success,#16794b); }
#linkedin-connection-result[data-state="warning"] { color:var(--fk-color-warning,#9a6700); }
#linkedin-connection-result[data-state="error"] { color:var(--fk-color-danger,#c9372c); }
@media (max-width:700px){#linkedin-connection-card{grid-template-columns:1fr 1fr}#linkedin-connection-card>strong,#linkedin-connection-card>div{grid-column:1/-1}#linkedin-connection-card button{width:100%}}
.linkedin-disconnect-dialog{width:min(520px,calc(100vw - 32px));border:1px solid var(--fk-color-border-default);border-radius:var(--fk-radius-lg,16px);background:var(--fk-color-surface-elevated);color:var(--fk-color-text-primary);padding:var(--fk-space-6);box-shadow:var(--fk-shadow-lg)}
.linkedin-disconnect-dialog::backdrop{background:rgba(20,26,52,.55)}.linkedin-disconnect-dialog h2{margin-top:0}.linkedin-disconnect-actions{display:flex;justify-content:flex-end;gap:var(--fk-space-3);margin-top:var(--fk-space-5)}.linkedin-disconnect-actions button{min-height:44px}@media(max-width:560px){.linkedin-disconnect-actions{flex-direction:column-reverse}.linkedin-disconnect-actions button{width:100%}}

.cw-publish-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto;margin:0;padding:12px;border:1px solid var(--fk-border,#dce1eb);border-radius:9px;background:var(--fk-surface-muted,#f2f4f8);font:inherit}.cw-publish-result:not(:empty){padding:10px;border-radius:8px;background:var(--fk-surface-muted,#f2f4f8)}@media(prefers-reduced-motion:reduce){.cw-dialog-backdrop,.cw-dialog{animation:none!important;transition:none!important}}

/* BW-32.3.5 node-bound approval diagnostics */
.cw-stale-approval [data-copy-approval-diagnostics] { margin-inline-start: .5rem; }
@media(max-width:720px) { .cw-stale-approval [data-copy-approval-diagnostics] { margin: .5rem 0 0; width: 100%; } }

.cw-approval-failure{display:grid;gap:8px;padding:10px;border-left:4px solid var(--fk-danger,#a52b35);border-radius:8px;background:color-mix(in srgb,var(--fk-danger,#a52b35) 9%,var(--fk-surface,#fff));font-size:.82rem}.cw-approval-failure>div{display:flex;gap:8px;flex-wrap:wrap}
