/* Business Model First — paleta z landingu (blue #3479c2 · purple #8548a4 · orange #e97c5a) */

/* Bazowy CSS React Flow (@xyflow/react) — WYMAGANY do pan/zoom/drag na kanwach
   diagramu (@bmf/diagram, @bmf/graph). Import `dist/style.css` w .tsx jest
   pomijany przez bundler arc, a @import pakietowy nie jest resolvowany w trybie
   dev — dlatego CSS jest wklejony wprost (inline). Aktualizować przy bumpie @xyflow. */
/* --- @xyflow/react/dist/style.css (inline) --- */
/* this gets exported as style.css and can be used for the default theming */
/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */
.react-flow {
  direction: ltr;

  --xy-edge-stroke-default: #b1b1b7;
  --xy-edge-stroke-width-default: 1;
  --xy-edge-stroke-selected-default: #555;

  --xy-connectionline-stroke-default: #b1b1b7;
  --xy-connectionline-stroke-width-default: 1;

  --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);

  --xy-minimap-background-color-default: #fff;
  --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);
  --xy-minimap-mask-stroke-color-default: transparent;
  --xy-minimap-mask-stroke-width-default: 1;
  --xy-minimap-node-background-color-default: #e2e2e2;
  --xy-minimap-node-stroke-color-default: transparent;
  --xy-minimap-node-stroke-width-default: 2;

  --xy-background-color-default: transparent;
  --xy-background-pattern-dots-color-default: #91919a;
  --xy-background-pattern-lines-color-default: #eee;
  --xy-background-pattern-cross-color-default: #e2e2e2;
  background-color: var(--xy-background-color, var(--xy-background-color-default));
  --xy-node-color-default: inherit;
  --xy-node-border-default: 1px solid #1a192b;
  --xy-node-background-color-default: #fff;
  --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
  --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
  --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;
  --xy-node-border-radius-default: 3px;

  --xy-handle-background-color-default: #1a192b;
  --xy-handle-border-color-default: #fff;

  --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);
  --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);

  --xy-controls-button-background-color-default: #fefefe;
  --xy-controls-button-background-color-hover-default: #f4f4f4;
  --xy-controls-button-color-default: inherit;
  --xy-controls-button-color-hover-default: inherit;
  --xy-controls-button-border-color-default: #eee;
  --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);

  --xy-edge-label-background-color-default: #ffffff;
  --xy-edge-label-color-default: inherit;
  --xy-resize-background-color-default: #3367d9;
}
.react-flow.dark {
  --xy-edge-stroke-default: #3e3e3e;
  --xy-edge-stroke-width-default: 1;
  --xy-edge-stroke-selected-default: #727272;

  --xy-connectionline-stroke-default: #b1b1b7;
  --xy-connectionline-stroke-width-default: 1;

  --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);

  --xy-minimap-background-color-default: #141414;
  --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);
  --xy-minimap-mask-stroke-color-default: transparent;
  --xy-minimap-mask-stroke-width-default: 1;
  --xy-minimap-node-background-color-default: #2b2b2b;
  --xy-minimap-node-stroke-color-default: transparent;
  --xy-minimap-node-stroke-width-default: 2;

  --xy-background-color-default: #141414;
  --xy-background-pattern-dots-color-default: #777;
  --xy-background-pattern-lines-color-default: #777;
  --xy-background-pattern-cross-color-default: #777;
  --xy-node-color-default: #f8f8f8;
  --xy-node-border-default: 1px solid #3c3c3c;
  --xy-node-background-color-default: #1e1e1e;
  --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
  --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);
  --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;

  --xy-handle-background-color-default: #bebebe;
  --xy-handle-border-color-default: #1e1e1e;

  --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);
  --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);

  --xy-controls-button-background-color-default: #2b2b2b;
  --xy-controls-button-background-color-hover-default: #3e3e3e;
  --xy-controls-button-color-default: #f8f8f8;
  --xy-controls-button-color-hover-default: #fff;
  --xy-controls-button-border-color-default: #5b5b5b;
  --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);

  --xy-edge-label-background-color-default: #141414;
  --xy-edge-label-color-default: #f8f8f8;
}
.react-flow__background {
  background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));
  pointer-events: none;
  z-index: -1;
}
.react-flow__container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.react-flow__pane {
  z-index: 1;
  touch-action: none;
}
.react-flow__pane.draggable {
    cursor: grab;
  }
.react-flow__pane.dragging {
    cursor: grabbing;
  }
.react-flow__pane.selection {
    cursor: pointer;
  }
.react-flow__viewport {
  transform-origin: 0 0;
  z-index: 2;
  pointer-events: none;
}
.react-flow__renderer {
  z-index: 4;
}
.react-flow__selection {
  z-index: 6;
}
.react-flow__nodesselection-rect:focus,
.react-flow__nodesselection-rect:focus-visible {
  outline: none;
}
.react-flow__edge-path {
  stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
  stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));
  fill: none;
}
.react-flow__connection-path {
  stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));
  stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));
  fill: none;
}
.react-flow .react-flow__edges {
  position: absolute;
}
.react-flow .react-flow__edges svg {
    overflow: visible;
    position: absolute;
    pointer-events: none;
  }
.react-flow__edge {
  pointer-events: visibleStroke;
}
.react-flow__edge.selectable {
    cursor: pointer;
  }
.react-flow__edge.animated path {
    stroke-dasharray: 5;
    animation: dashdraw 0.5s linear infinite;
  }
.react-flow__edge.animated path.react-flow__edge-interaction {
    stroke-dasharray: none;
    animation: none;
  }
.react-flow__edge.inactive {
    pointer-events: none;
  }
.react-flow__edge.selected,
  .react-flow__edge:focus,
  .react-flow__edge:focus-visible {
    outline: none;
  }
.react-flow__edge.selected .react-flow__edge-path,
  .react-flow__edge.selectable:focus .react-flow__edge-path,
  .react-flow__edge.selectable:focus-visible .react-flow__edge-path {
    stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));
  }
.react-flow__edge-textwrapper {
    pointer-events: all;
  }
.react-flow__edge .react-flow__edge-text {
    pointer-events: none;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }
/* Arrowhead marker styles - use CSS custom properties as default */
.react-flow__arrowhead polyline {
  stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
}
.react-flow__arrowhead polyline.arrowclosed {
  fill: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
}
.react-flow__connection {
  pointer-events: none;
}
.react-flow__connection .animated {
    stroke-dasharray: 5;
    animation: dashdraw 0.5s linear infinite;
  }
svg.react-flow__connectionline {
  z-index: 1001;
  overflow: visible;
  position: absolute;
}
.react-flow__nodes {
  pointer-events: none;
  transform-origin: 0 0;
}
.react-flow__node {
  position: absolute;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: all;
  transform-origin: 0 0;
  box-sizing: border-box;
  cursor: default;
}
.react-flow__node.selectable {
    cursor: pointer;
  }
.react-flow__node.draggable {
    cursor: grab;
    pointer-events: all;
  }
.react-flow__node.draggable.dragging {
      cursor: grabbing;
    }
.react-flow__nodesselection {
  z-index: 3;
  transform-origin: left top;
  pointer-events: none;
}
.react-flow__nodesselection-rect {
    position: absolute;
    pointer-events: all;
    cursor: grab;
  }
.react-flow__handle {
  position: absolute;
  pointer-events: none;
  min-width: 5px;
  min-height: 5px;
  width: 6px;
  height: 6px;
  background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));
  border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));
  border-radius: 100%;
}
.react-flow__handle.connectingfrom {
    pointer-events: all;
  }
.react-flow__handle.connectionindicator {
    pointer-events: all;
    cursor: crosshair;
  }
.react-flow__handle-bottom {
    top: auto;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
  }
.react-flow__handle-top {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
  }
.react-flow__handle-left {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
  }
.react-flow__handle-right {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
  }
.react-flow__edgeupdater {
  cursor: move;
  pointer-events: all;
}
.react-flow__pane.selection .react-flow__panel {
  pointer-events: none;
}
.react-flow__panel {
  position: absolute;
  z-index: 5;
  margin: 15px;
}
.react-flow__panel.top {
    top: 0;
  }
.react-flow__panel.bottom {
    bottom: 0;
  }
.react-flow__panel.top.center, .react-flow__panel.bottom.center {
      left: 50%;
      transform: translateX(-15px) translateX(-50%);
    }
.react-flow__panel.left {
    left: 0;
  }
.react-flow__panel.right {
    right: 0;
  }
.react-flow__panel.left.center, .react-flow__panel.right.center {
      top: 50%;
      transform: translateY(-15px) translateY(-50%);
    }
.react-flow__attribution {
  font-size: 10px;
  background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));
  padding: 2px 3px;
  margin: 0;
}
.react-flow__attribution a {
    text-decoration: none;
    color: #999;
  }
@keyframes dashdraw {
  from {
    stroke-dashoffset: 10;
  }
}
.react-flow__edgelabel-renderer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  left: 0;
  top: 0;
}
.react-flow__viewport-portal {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.react-flow__minimap {
  background: var(
    --xy-minimap-background-color-props,
    var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))
  );
}
.react-flow__minimap-svg {
    display: block;
  }
.react-flow__minimap-mask {
    fill: var(
      --xy-minimap-mask-background-color-props,
      var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))
    );
    stroke: var(
      --xy-minimap-mask-stroke-color-props,
      var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))
    );
    stroke-width: var(
      --xy-minimap-mask-stroke-width-props,
      var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))
    );
  }
.react-flow__minimap-node {
    fill: var(
      --xy-minimap-node-background-color-props,
      var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))
    );
    stroke: var(
      --xy-minimap-node-stroke-color-props,
      var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))
    );
    stroke-width: var(
      --xy-minimap-node-stroke-width-props,
      var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))
    );
  }
.react-flow__background-pattern.dots {
    fill: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))
    );
  }
.react-flow__background-pattern.lines {
    stroke: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))
    );
  }
.react-flow__background-pattern.cross {
    stroke: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))
    );
  }
.react-flow__controls {
  display: flex;
  flex-direction: column;
  box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));
}
.react-flow__controls.horizontal {
    flex-direction: row;
  }
.react-flow__controls-button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 26px;
    width: 26px;
    padding: 4px;
    border: none;
    background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));
    border-bottom: 1px solid
      var(
        --xy-controls-button-border-color-props,
        var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
      );
    color: var(
      --xy-controls-button-color-props,
      var(--xy-controls-button-color, var(--xy-controls-button-color-default))
    );
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }
.react-flow__controls-button svg {
      width: 100%;
      max-width: 12px;
      max-height: 12px;
      fill: currentColor;
    }
.react-flow__edge.updating .react-flow__edge-path {
      stroke: #777;
    }
.react-flow__edge-text {
    font-size: 10px;
  }
.react-flow__node.selectable:focus,
  .react-flow__node.selectable:focus-visible {
    outline: none;
  }
.react-flow__node-input,
.react-flow__node-default,
.react-flow__node-output,
.react-flow__node-group {
  padding: 10px;
  border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));
  width: 150px;
  font-size: 12px;
  color: var(--xy-node-color, var(--xy-node-color-default));
  text-align: center;
  border: var(--xy-node-border, var(--xy-node-border-default));
  background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));
}
.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {
      box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));
    }
.react-flow__node-input.selectable.selected,
    .react-flow__node-input.selectable:focus,
    .react-flow__node-input.selectable:focus-visible,
    .react-flow__node-default.selectable.selected,
    .react-flow__node-default.selectable:focus,
    .react-flow__node-default.selectable:focus-visible,
    .react-flow__node-output.selectable.selected,
    .react-flow__node-output.selectable:focus,
    .react-flow__node-output.selectable:focus-visible,
    .react-flow__node-group.selectable.selected,
    .react-flow__node-group.selectable:focus,
    .react-flow__node-group.selectable:focus-visible {
      box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));
    }
.react-flow__node-group {
  background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));
}
.react-flow__nodesselection-rect,
.react-flow__selection {
  background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));
  border: var(--xy-selection-border, var(--xy-selection-border-default));
}
.react-flow__nodesselection-rect:focus,
  .react-flow__nodesselection-rect:focus-visible,
  .react-flow__selection:focus,
  .react-flow__selection:focus-visible {
    outline: none;
  }
.react-flow__controls-button:hover {
      background: var(
        --xy-controls-button-background-color-hover-props,
        var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))
      );
      color: var(
        --xy-controls-button-color-hover-props,
        var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))
      );
    }
.react-flow__controls-button:disabled {
      pointer-events: none;
    }
.react-flow__controls-button:disabled svg {
        fill-opacity: 0.4;
      }
.react-flow__controls-button:last-child {
    border-bottom: none;
  }
.react-flow__controls.horizontal .react-flow__controls-button {
    border-bottom: none;
    border-right: 1px solid
      var(
        --xy-controls-button-border-color-props,
        var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
      );
  }
.react-flow__controls.horizontal .react-flow__controls-button:last-child {
    border-right: none;
  }
.react-flow__resize-control {
  position: absolute;
}
.react-flow__resize-control.left,
.react-flow__resize-control.right {
  cursor: ew-resize;
}
.react-flow__resize-control.top,
.react-flow__resize-control.bottom {
  cursor: ns-resize;
}
.react-flow__resize-control.top.left,
.react-flow__resize-control.bottom.right {
  cursor: nwse-resize;
}
.react-flow__resize-control.bottom.left,
.react-flow__resize-control.top.right {
  cursor: nesw-resize;
}
/* handle styles */
.react-flow__resize-control.handle {
  width: 5px;
  height: 5px;
  border: 1px solid #fff;
  border-radius: 1px;
  background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
  translate: -50% -50%;
}
.react-flow__resize-control.handle.left {
  left: 0;
  top: 50%;
}
.react-flow__resize-control.handle.right {
  left: 100%;
  top: 50%;
}
.react-flow__resize-control.handle.top {
  left: 50%;
  top: 0;
}
.react-flow__resize-control.handle.bottom {
  left: 50%;
  top: 100%;
}
.react-flow__resize-control.handle.top.left {
  left: 0;
}
.react-flow__resize-control.handle.bottom.left {
  left: 0;
}
.react-flow__resize-control.handle.top.right {
  left: 100%;
}
.react-flow__resize-control.handle.bottom.right {
  left: 100%;
}
/* line styles */
.react-flow__resize-control.line {
  border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
  border-width: 0;
  border-style: solid;
}
.react-flow__resize-control.line.left,
.react-flow__resize-control.line.right {
  width: 1px;
  transform: translate(-50%, 0);
  top: 0;
  height: 100%;
}
.react-flow__resize-control.line.left {
  left: 0;
  border-left-width: 1px;
}
.react-flow__resize-control.line.right {
  left: 100%;
  border-right-width: 1px;
}
.react-flow__resize-control.line.top,
.react-flow__resize-control.line.bottom {
  height: 1px;
  transform: translate(0, -50%);
  left: 0;
  width: 100%;
}
.react-flow__resize-control.line.top {
  top: 0;
  border-top-width: 1px;
}
.react-flow__resize-control.line.bottom {
  border-bottom-width: 1px;
  top: 100%;
}
.react-flow__edge-textbg {
  fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));
}
.react-flow__edge-text {
  fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));
}
/* --- /xyflow --- */

:root {
  --radius: 0.5rem;
  --background: hsl(0 0% 100%);
  --foreground: hsl(222 47% 14%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(222 47% 14%);
  --popover: hsl(0 0% 100%);
  --popover-foreground: hsl(222 47% 14%);
  --primary: hsl(211 58% 48%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(210 55% 96%);
  --secondary-foreground: hsl(211 50% 30%);
  --muted: hsl(214 32% 95%);
  --muted-foreground: hsl(215 16% 47%);
  --accent: hsl(276 50% 96%);
  --accent-foreground: hsl(280 39% 36%);
  --destructive: hsl(0 84% 60%);
  --destructive-foreground: hsl(0 0% 100%);
  --border: hsl(214 32% 89%);
  --input: hsl(214 32% 89%);
  --ring: hsl(211 58% 52%);
  --chart-1: hsl(211 58% 48%);
  --chart-2: hsl(280 39% 50%);
  --chart-3: hsl(14 76% 63%);
  --chart-4: hsl(199 65% 52%);
  --chart-5: hsl(320 45% 55%);
  --sidebar: hsl(210 55% 97%);
  --sidebar-foreground: hsl(222 47% 14%);
  --sidebar-primary: hsl(211 58% 48%);
  --sidebar-primary-foreground: hsl(0 0% 100%);
  --sidebar-accent: hsl(276 50% 96%);
  --sidebar-accent-foreground: hsl(280 39% 36%);
  --sidebar-border: hsl(214 32% 89%);
  --sidebar-ring: hsl(211 58% 52%);

  /* ── Tokeny BMF design system (lustro packages/ui/src/palette.ts) ── */
  --bmf-blue: #3479c2;
  --bmf-purple: #8548a4;
  --bmf-orange: #e97c5a;
  --bmf-gradient: linear-gradient(135deg, #3479c2 0%, #8548a4 100%);

  /* Akcenty per-typ node'a grafu wiedzy.
     LUSTRO `NODE_ACCENTS` z packages/ui/src/palette.ts — zmiana tam wymaga
     zmiany tu (inline style nie umieją var() z alpha). Komplet typów pilnuje
     packages/domain/src/__tests__/palette-coverage.test.ts. */
  --node-venture: #3479c2;
  --node-product: #8548a4;
  --node-offer: #e97c5a;
  --node-segment: #0ea5e9;
  --node-channel: #14b8a6;
  --node-action: #f59e0b;
  /* ES-pomarańcz (domain event), nie róż — patrz komentarz przy `event`
     w palette.ts; ta sama barwa co KIND_COLORS.event w profilu wiedzy. */
  --node-event: #f76707;
  --node-objective: #ef4444;
  --node-hypothesis: #a855f7;
  --node-metric-def: #6366f1;
  --node-metric-value: #06b6d4;
  --node-revenue: #16a34a;
  --node-cost: #dc2626;
  --node-resource: #64748b;
  --node-document: #7c3aed;
  --node-person: #db2777;
  --node-task: #0891b2;
  --node-department: #65a30d;
  --node-skill: #c026d3;
  --node-konsultant: #0e7490;
  --node-agent: #1e40af;

  /* Akcenty per-typ dokumentu */
  --doc-plan: #7c3aed;
  --doc-roadmap: #0ea5e9;
  --doc-sop: #0d9488;
  --doc-analysis: #d97706;
  --doc-strategy: #db2777;
  --doc-experiment: #65a30d;
  --doc-process: #4f46e5;
  --doc-funnel: #ea580c;
  --doc-fallback: #6b7280;
}

/*
 * Paleta kart grafu wiedzy (`GLASS` z @bmf/graph). Karty rysują się stylem
 * INLINE, więc nie da się ich przemalować regułą CSS — pakiet czyta te zmienne
 * przez `var()` z fallbackiem na wartości jasne. Definicja jest tutaj, bo to
 * aplikacja wie, co znaczy „ciemny motyw"; biblioteka bez tych zmiennych
 * wygląda tak jak przedtem.
 */
:root {
  --bmf-graph-card: rgba(255, 255, 255, 0.72);
  --bmf-graph-card-strong: rgba(255, 255, 255, 0.92);
  --bmf-graph-border: rgba(133, 72, 164, 0.3);
  --bmf-graph-shadow:
    0 8px 28px -8px rgba(52, 121, 194, 0.22), 0 2px 8px -2px rgba(52, 121, 194, 0.12);
  --bmf-graph-text: #2a173f;
  --bmf-graph-text-muted: #6b5b86;
  --bmf-graph-text-faint: #7d6d9c;
  /* Powierzchnie pomocnicze: etykieta krawędzi, pole edycji nazwy w karcie. */
  --bmf-graph-surface: hsl(0 0% 100% / 0.9);
  --bmf-graph-input: #ffffff;
}

.dark {
  /*
   * Powierzchnie zestrojone z `.dark .glass` niżej, żeby karta na kanwie i
   * karta w panelu bocznym były tym samym materiałem. Obrys zachowuje fioletowy
   * charakter marki, tylko rozjaśniony — na ciemnym tle granatowa krawędź
   * znikała.
   */
  --bmf-graph-card: hsl(222 35% 13% / 0.72);
  --bmf-graph-card-strong: hsl(222 35% 13% / 0.94);
  --bmf-graph-border: hsl(276 35% 60% / 0.32);
  --bmf-graph-shadow:
    0 8px 28px -8px rgba(0, 0, 0, 0.5), 0 2px 8px -2px rgba(0, 0, 0, 0.35);
  --bmf-graph-text: hsl(210 40% 96%);
  --bmf-graph-text-muted: hsl(215 20% 68%);
  /* „Cichszy" niż muted, ale nadal czytelny na ciemnym — jak w trybie jasnym. */
  --bmf-graph-text-faint: hsl(215 16% 56%);
  --bmf-graph-surface: hsl(222 35% 15% / 0.94);
  --bmf-graph-input: hsl(222 35% 16%);

  --background: hsl(222 40% 9%);
  --foreground: hsl(210 40% 96%);
  --card: hsl(222 35% 13%);
  --card-foreground: hsl(210 40% 96%);
  --popover: hsl(222 35% 13%);
  --popover-foreground: hsl(210 40% 96%);
  --primary: hsl(211 60% 58%);
  --primary-foreground: hsl(222 47% 11%);
  --secondary: hsl(222 30% 18%);
  --secondary-foreground: hsl(210 40% 96%);
  --muted: hsl(222 25% 18%);
  --muted-foreground: hsl(215 20% 65%);
  --accent: hsl(280 30% 22%);
  --accent-foreground: hsl(276 50% 88%);
  --destructive: hsl(0 62% 50%);
  --destructive-foreground: hsl(0 0% 100%);
  --border: hsl(222 25% 24%);
  --input: hsl(222 25% 24%);
  --ring: hsl(211 60% 56%);
  --chart-1: hsl(211 60% 60%);
  --chart-2: hsl(280 45% 62%);
  --chart-3: hsl(14 76% 66%);
  --chart-4: hsl(199 65% 60%);
  --chart-5: hsl(320 50% 64%);
  --sidebar: hsl(222 35% 11%);
  --sidebar-foreground: hsl(210 40% 96%);
  --sidebar-primary: hsl(211 60% 60%);
  --sidebar-primary-foreground: hsl(222 47% 11%);
  --sidebar-accent: hsl(280 30% 22%);
  --sidebar-accent-foreground: hsl(276 50% 88%);
  --sidebar-border: hsl(222 25% 24%);
  --sidebar-ring: hsl(211 60% 56%);
}

/* Tło z landingu: blue → white → purple, + delikatny overlay bmfbg */
body {
  background-color: #ffffff;
  background-image:
    url("/bmfbg.svg"),
    linear-gradient(135deg, #dbeafe 0%, #ffffff 50%, #f3e8ff 100%);
  /* Siatka rośnie z dłuższym bokiem, więc wysoki ekran telefonu jest pokryty od góry do dołu. */
  background-size: max(140vw, 150vh) auto, cover;
  background-position:
    30% 30%,
    center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed;
  font-family: "Inter", sans-serif;
}

.dark body {
  background-color: hsl(222 40% 9%);
  background-image:
    url("/bmfbg.svg"),
    linear-gradient(
      135deg,
      hsl(222 40% 7%) 0%,
      hsl(222 40% 9%) 50%,
      hsl(280 30% 12%) 100%
    );
}

/* Glassmorphism z landingu (białe szkło, niebiesko-fioletowy cień) */
/* Kolumna sidebara layoutu Arc (`.arc-column--sidebar`) to ten sam materiał co
   karty — layout nie maluje powierzchni kolumn, dokłada je aplikacja. Bez
   `:hover`: poświata na całej kolumnie przy każdym najechaniu byłaby szumem. */
.glass,
.arc-column--sidebar {
  background: hsl(0 0% 100% / 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid hsl(0 0% 100% / 0.5);
  box-shadow: 0 8px 32px rgba(52, 121, 194, 0.12);
}
.glass:hover {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 64px rgba(133, 72, 164, 0.18);
}
.dark .glass,
.dark .arc-column--sidebar {
  background: hsl(222 35% 13% / 0.65);
  border-color: hsl(222 25% 24% / 0.5);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.28),
    0 24px 64px rgba(0, 0, 0, 0.22);
}

.glass:has([data-expanded]) {
  background: hsl(0 0% 100% / 1);
  backdrop-filter: none;
  border-color: hsl(214 32% 89% / 0.6);
  box-shadow: 0 8px 32px rgba(52, 121, 194, 0.16);
}
.dark .glass:has([data-expanded]) {
  background: hsl(222 35% 13% / 1);
  border-color: hsl(222 25% 24% / 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.arc-column--sidebar {
  border-radius: 1rem;
  padding: 0.5rem;
}

/* ── Karta kolumny po prawej ────────────────────────────────────────────────
   Kolumna, w której otwierają się lead, firma, element modelu czy podgląd
   źródła, stoi na karcie — razem z paskiem tytułu i „✕", więc czyta się jak
   jedno wydzielone okno obok treści strony.

   Styl siedzi tutaj, a nie w Reakcie, bo pasek tytułu rysuje ramka kolumny
   z `@arc/ds`, ponad tym, co renderuje strona. Ramka celowo nie maluje ani
   tła, ani obramowania i wystawia klasę `arc-column--column` właśnie do
   stylowania przez aplikację (tak jak `--sidebar` wyżej).

   Szkło, a nie zwykła karta: w BMF `Box` ma nadpisany wariant na `.glass`
   (`packages/bmf/src/index.ts`), więc taki jest też pasek górny i kafle treści.
   Bez `:hover` z `.glass` — podnoszenie cienia pod kursorem ma sens na klikalnym
   kaflu, nie na całej kolumnie.

   Arkusz pełnoekranowy na wąskim ekranie (`.arc-column-sheet`) zostaje płaski:
   ma własne tło i przykrywa całą treść, więc ramka i zaokrąglenie nie mają tam
   czego odcinać.
   ───────────────────────────────────────────────────────────────────────── */
.arc-column--column:not(.arc-column-sheet) {
  border-radius: 1rem;
  overflow: hidden;
  background: hsl(0 0% 100% / 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid hsl(0 0% 100% / 0.5);
  box-shadow: 0 8px 32px rgba(52, 121, 194, 0.12);
}
.dark .arc-column--column:not(.arc-column-sheet) {
  background: hsl(222 35% 13% / 0.65);
  border-color: hsl(222 25% 24% / 0.5);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.28),
    0 24px 64px rgba(0, 0, 0, 0.22);
}
/* Pasek tytułu stoi teraz przy zaokrąglonej krawędzi — trochę oddechu z lewej
   i pod spodem, żeby tytuł nie kleił się do rogu ani do treści. */
.arc-column--column:not(.arc-column-sheet) .arc-column-header {
  height: 2.25rem;
  padding-left: 0.75rem;
}

/* Karty glass z landingu (mocniejsze szkło pod formularze/kroki prospekta) */
.glass-card {
  background: hsl(0 0% 100% / 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid hsl(0 0% 100% / 0.5);
  box-shadow: 0 8px 32px rgba(52, 121, 194, 0.12);
}
.glass-card-strong {
  background: hsl(0 0% 100% / 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid hsl(0 0% 100% / 0.6);
  box-shadow: 0 24px 64px rgba(133, 72, 164, 0.18);
}
.dark .glass-card,
.dark .glass-card-strong {
  background: hsl(222 35% 13% / 0.7);
  border-color: hsl(222 25% 24% / 0.5);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.28),
    0 24px 64px rgba(0, 0, 0, 0.22);
}

/* Gradient marki (blue #3479c2 → purple #8548a4) — nagłówki i CTA */
.gradient-text {
  background: linear-gradient(135deg, #3479c2 0%, #8548a4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.gradient-bg {
  background: linear-gradient(135deg, #3479c2 0%, #8548a4 100%);
  color: #fff;
}
.gradient-bg:hover {
  box-shadow: 0 12px 32px rgba(133, 72, 164, 0.28);
}
.text-brand-orange {
  color: #e97c5a;
}

/* ── Problem A: QuestionTabs footer — mobile layout (≤640px) ─────────────────
   QuestionTabs z @arcote.tech/arc-ds renderuje footer jako flex-row, co nie
   mieści się na 390px. Nadpisujemy na flex-col z wyśrodkowaniem.
   ─────────────────────────────────────────────────────────────────────────── */
@media (max-width: 639px) {
  .flex.items-center.justify-between.border-t.px-3.py-2.gap-2 {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
  }
  .flex.items-center.justify-between.border-t.px-3.py-2.gap-2 > .flex {
    width: 100%;
    justify-content: center;
  }
  .flex.items-center.justify-between.border-t.px-3.py-2.gap-2 > button {
    width: 100%;
    justify-content: center;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   BUSINESS THEME — OPT-IN

   Everything above is the classic BMF look (gradient, glass) and stays the
   default. Everything below applies only when <html> carries
   data-bmf-theme="business" — the person's choice in Ustawienia konta →
   Język i motyw → Wygląd (stored on the account, field `appearance`; mirrored
   to localStorage only so the attribute is set before the first render).

   The block is the business theme written for :root, scoped mechanically: each
   selector got :root[data-bmf-theme="business"] in front (or merged into
   :root / .dark), so the rules keep their order and relative specificity and
   all beat the classic rules. Organization brand styles (data-brand-style,
   data-brand-accent) sit on top of the business theme and need it too.

   Global on purpose: the @font-face declarations (lazy, cost nothing until
   used) and the helper classes .bmf-caps / .bmf-title / .bmf-figure / .bmf-tag,
   which screens use in both themes (they read only semantic tokens).
   ══════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════════
   BMF — business theme ("narzędzie biznesowe")

   Source of the look: the v2 landing (landing@redesign/strona-glowna,
   src/components/v2/ui.ts). A greyscale — ink / graphite / line / wash — and ONE
   accent, `signal`. Geist type, hairline borders, almost no shadow; no glass,
   no gradients, no glow. The app and the funnel read as one brand.

   How it reaches the screens: this file is copied as /theme.css and loaded
   AFTER styles.css, outside any cascade layer. Unlayered rules beat every
   Tailwind layer, so redefining a token here re-colours every component that
   uses it, and a rule here beats any utility class without !important.

   Contract for screen authors (also in the shared notes, 11-motyw-tokeny.md):
   use the semantic classes — bg-background / bg-card / text-foreground /
   text-muted-foreground / border-border / bg-muted / bg-primary / text-brand-1 /
   tone-* / chart-* / category-* — or var(--token) in inline styles. Never hex.
   ══════════════════════════════════════════════════════════════════════════ */

/* Geist, the landing's typeface. Two subsets: latin + latin-ext (Polish
   diacritics). Files in public/fonts (SIL OFL, licence next to them). */
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root[data-bmf-theme="business"] {
  /* ── Brand primitives (the landing's names) ─────────────────────────────── */
  --bmf-ink: #15171c;
  --bmf-graphite: #5a606b;
  --bmf-line: #e4e6eb;
  --bmf-wash: #f5f6f8;
  --bmf-signal: #2b66b1;
  --bmf-signal-soft: #eaf1fa;
  --bmf-signal-strong: #22548f;

  /* ── Type, radius, shadow (Tailwind's own theme variables) ──────────────── */
  --font-sans: "Geist Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --default-font-family: var(--font-sans);
  --radius: 0.5rem; /* sm 4 · md 6 · lg 8 · xl 12 */
  --radius-2xl: 0.75rem; /* DS Box/Card use rounded-2xl: 16px read as a toy */
  --radius-3xl: 1rem;
  --bmf-shadow-hairline: 0 1px 2px rgb(16 24 40 / 0.05);
  --bmf-shadow-card: 0 1px 2px rgb(16 24 40 / 0.05), 0 8px 24px -12px rgb(16 24 40 / 0.14);
  /* Card edge of the landing's app mock-ups (a notch stronger than the line). */
  --bmf-card-border: #dde2ea;
  --bmf-nav-active: #ffffff;
  --bmf-shadow-float: 0 1px 2px rgb(16 24 40 / 0.06), 0 16px 32px -16px rgb(21 23 28 / 0.25);

  /* ── Semantic colours (shadcn names, mapped to utilities by arc) ────────── */
  /* White canvas like the landing; panels and bands in wash. */
  --background: #ffffff;
  --foreground: var(--bmf-ink);
  --card: #ffffff;
  --card-foreground: var(--bmf-ink);
  --popover: #ffffff;
  --popover-foreground: var(--bmf-ink);
  /* Primary = ink: the landing's main button is black, the accent is reserved
     for links and "needs you" marks. */
  --primary: var(--bmf-ink);
  --primary-foreground: #ffffff;
  --secondary: #f1f2f5;
  --secondary-foreground: var(--bmf-ink);
  --muted: #f1f2f5;
  --muted-foreground: var(--bmf-graphite); /* 6.3:1 on white */
  --accent: #eef0f3;
  --accent-foreground: var(--bmf-ink);
  --destructive: #c4372f;
  --destructive-foreground: #ffffff;
  --border: var(--bmf-line);
  --input: #d8dbe1;
  --ring: var(--bmf-signal);

  --chart-1: var(--bmf-signal);
  --chart-2: #8a919c;
  --chart-3: #2f8f83;
  --chart-4: #b7791f;
  --chart-5: #6d5aa3;
  --chart-6: #c0603f;
  --chart-7: #4b8fd6;
  --chart-8: #c3c8d0;
  --chart-positive: #13795b;
  --chart-negative: #c4372f;

  --sidebar: #f8f9fb;
  --sidebar-foreground: var(--bmf-ink);
  --sidebar-primary: var(--bmf-ink);
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #eef0f3;
  --sidebar-accent-foreground: var(--bmf-ink);
  --sidebar-border: var(--bmf-line);
  --sidebar-ring: var(--bmf-signal);

  /* ── DS meaning colours: one accent, calmer tones ───────────────────────── */
  --brand-1: var(--bmf-signal);
  --brand-2: var(--bmf-signal-strong);
  /* Flat: Eyebrow and Button "gradient" become the single accent. */
  --brand-gradient: linear-gradient(var(--brand-1), var(--brand-1));
  --tone-info: var(--bmf-signal);
  --tone-info-bg: var(--bmf-signal-soft);
  --tone-info-border: color-mix(in srgb, var(--bmf-signal) 28%, transparent);
  --tone-ok: #13795b;
  --tone-ok-bg: color-mix(in srgb, #13795b 10%, transparent);
  --tone-ok-border: color-mix(in srgb, #13795b 28%, transparent);
  --tone-warn: #9a5b0b;
  --tone-warn-bg: color-mix(in srgb, #b7791f 12%, transparent);
  --tone-warn-border: color-mix(in srgb, #b7791f 32%, transparent);
  --tone-danger: #b83a32;
  --tone-danger-bg: color-mix(in srgb, #c4372f 9%, transparent);
  --tone-danger-border: color-mix(in srgb, #c4372f 28%, transparent);
  --tone-muted: var(--bmf-graphite);
  --tone-muted-bg: var(--bmf-wash);
  --tone-muted-border: var(--bmf-line);
  --hue-blue: var(--bmf-signal);
  --hue-blue-fill: color-mix(in srgb, var(--bmf-signal) 11%, transparent);
  --hue-violet: #6d5aa3;
  --hue-violet-fill: color-mix(in srgb, #6d5aa3 11%, transparent);
  --hue-orange: #c0603f;
  --hue-orange-fill: color-mix(in srgb, #c0603f 11%, transparent);
  --evidence-analysis: var(--bmf-signal);
  --evidence-ai: #6d5aa3;
  --row-hover: color-mix(in srgb, var(--bmf-ink) 4%, transparent);
  --row-selected: color-mix(in srgb, var(--bmf-signal) 9%, transparent);

  /* ── Legacy BMF tokens: kept for old code, re-pointed at the new palette ── */
  --bmf-blue: var(--bmf-signal);
  --bmf-purple: var(--bmf-signal-strong);
  --bmf-orange: #c0603f;
  --bmf-gradient: linear-gradient(var(--bmf-signal), var(--bmf-signal));

  /* Per-type accents of the knowledge graph. MIRROR of `NODE_ACCENTS` in
     packages/ui/src/palette.ts — a change there needs a change here (inline
     styles cannot use var() with alpha). Coverage: palette-coverage.test.ts. */
  --node-venture: #3479c2;
  --node-product: #8548a4;
  --node-offer: #e97c5a;
  --node-segment: #0ea5e9;
  --node-channel: #14b8a6;
  --node-action: #f59e0b;
  /* Domain-event orange (not pink) — same hue as KIND_COLORS.event. */
  --node-event: #f76707;
  --node-objective: #ef4444;
  --node-hypothesis: #a855f7;
  --node-metric-def: #6366f1;
  --node-metric-value: #06b6d4;
  --node-revenue: #16a34a;
  --node-cost: #dc2626;
  --node-resource: #64748b;
  --node-document: #7c3aed;
  --node-person: #db2777;
  --node-task: #0891b2;
  --node-department: #65a30d;
  --node-skill: #c026d3;
  --node-konsultant: #0e7490;
  --node-agent: #1e40af;

  /* Per-document-type accents */
  --doc-plan: #7c3aed;
  --doc-roadmap: #0ea5e9;
  --doc-sop: #0d9488;
  --doc-analysis: #d97706;
  --doc-strategy: #db2777;
  --doc-experiment: #65a30d;
  --doc-process: #4f46e5;
  --doc-funnel: #ea580c;
  --doc-fallback: #6b7280;

  /* Knowledge-graph cards (`GLASS` in @bmf/graph draw INLINE and read these
     through var() with light fallbacks). Flat cards, hairline, no glass. */
  --bmf-graph-card: #ffffff;
  --bmf-graph-card-strong: #ffffff;
  --bmf-graph-border: var(--bmf-line);
  --bmf-graph-shadow: var(--bmf-shadow-card);
  --bmf-graph-text: var(--bmf-ink);
  --bmf-graph-text-muted: var(--bmf-graphite);
  --bmf-graph-text-faint: #7b818c;
  --bmf-graph-surface: #ffffff;
  --bmf-graph-input: #ffffff;
}

:root[data-bmf-theme="business"].dark {
  --bmf-ink: #ecedf0;
  --bmf-graphite: #9aa0ab;
  --bmf-line: #262930;
  --bmf-wash: #1b1d22;
  --bmf-signal: #6f9fdc;
  --bmf-signal-soft: color-mix(in srgb, #6f9fdc 16%, transparent);
  --bmf-signal-strong: #8fb4e6;
  --bmf-shadow-hairline: 0 0 0 transparent;
  --bmf-shadow-card: 0 1px 2px rgb(0 0 0 / 0.3);
  --bmf-card-border: #2a2d35;
  --bmf-nav-active: #22252c;
  --bmf-shadow-float: 0 1px 2px rgb(0 0 0 / 0.4), 0 16px 32px -16px rgb(0 0 0 / 0.6);

  --background: #0e0f12;
  --foreground: var(--bmf-ink);
  --card: #15171c;
  --card-foreground: var(--bmf-ink);
  --popover: #1a1c21;
  --popover-foreground: var(--bmf-ink);
  /* Inverted like the landing's buttons on the ink band. */
  --primary: #ecedf0;
  --primary-foreground: #15171c;
  --secondary: #1d2026;
  --secondary-foreground: var(--bmf-ink);
  --muted: #1d2026;
  --muted-foreground: var(--bmf-graphite); /* 6.9:1 on the card */
  --accent: #22252c;
  --accent-foreground: var(--bmf-ink);
  --destructive: #e5534b;
  --destructive-foreground: #ffffff;
  --border: var(--bmf-line);
  --input: #30343c;
  --ring: var(--bmf-signal);

  --chart-1: var(--bmf-signal);
  --chart-2: #8a919c;
  --chart-3: #5fbfb2;
  --chart-4: #d9a54a;
  --chart-5: #a58fd0;
  --chart-6: #e08a6a;
  --chart-7: #9cc0ec;
  --chart-8: #4a4f59;
  --chart-positive: #4cc38a;
  --chart-negative: #f07167;

  --sidebar: #15171c;
  --sidebar-foreground: var(--bmf-ink);
  --sidebar-primary: #ecedf0;
  --sidebar-primary-foreground: #15171c;
  --sidebar-accent: #22252c;
  --sidebar-accent-foreground: var(--bmf-ink);
  --sidebar-border: var(--bmf-line);
  --sidebar-ring: var(--bmf-signal);

  --tone-info: var(--bmf-signal);
  --tone-info-bg: var(--bmf-signal-soft);
  --tone-info-border: color-mix(in srgb, var(--bmf-signal) 34%, transparent);
  --tone-ok: #4cc38a;
  --tone-ok-bg: color-mix(in srgb, #4cc38a 14%, transparent);
  --tone-ok-border: color-mix(in srgb, #4cc38a 34%, transparent);
  --tone-warn: #e0b25c;
  --tone-warn-bg: color-mix(in srgb, #e0b25c 14%, transparent);
  --tone-warn-border: color-mix(in srgb, #e0b25c 34%, transparent);
  --tone-danger: #f07167;
  --tone-danger-bg: color-mix(in srgb, #f07167 13%, transparent);
  --tone-danger-border: color-mix(in srgb, #f07167 34%, transparent);
  --tone-muted: var(--bmf-graphite);
  --tone-muted-bg: var(--bmf-wash);
  --tone-muted-border: var(--bmf-line);
  --hue-blue: var(--bmf-signal);
  --hue-blue-fill: color-mix(in srgb, var(--bmf-signal) 16%, transparent);
  --hue-violet: #a58fd0;
  --hue-violet-fill: color-mix(in srgb, #a58fd0 16%, transparent);
  --hue-orange: #e08a6a;
  --hue-orange-fill: color-mix(in srgb, #e08a6a 16%, transparent);
  --evidence-analysis: var(--bmf-signal);
  --evidence-ai: #a58fd0;
  --row-hover: color-mix(in srgb, #ffffff 4%, transparent);
  --row-selected: color-mix(in srgb, var(--bmf-signal) 14%, transparent);

  --bmf-graph-card: #15171c;
  --bmf-graph-card-strong: #15171c;
  --bmf-graph-border: #2c3038;
  --bmf-graph-shadow: var(--bmf-shadow-card);
  --bmf-graph-text: var(--bmf-ink);
  --bmf-graph-text-muted: var(--bmf-graphite);
  --bmf-graph-text-faint: #7b818c;
  --bmf-graph-surface: #1a1c21;
  --bmf-graph-input: #1d2026;
}

/* ── Page ─────────────────────────────────────────────────────────────────
   Flat canvas: no pastel gradient, no grid overlay. */
:root[data-bmf-theme="business"] {
  font-family: var(--font-sans);
}
:root[data-bmf-theme="business"] body {
  background: var(--background);
  font-family: var(--font-sans);
  font-feature-settings: "ss01" off;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Shadows: Tailwind inlines its shadow values into the utilities, so the
   utilities themselves are redefined (hairline-quiet, landing's mock cards). */
:root[data-bmf-theme="business"] .shadow-xs,
:root[data-bmf-theme="business"] .shadow-sm {
  --tw-shadow: var(--bmf-shadow-hairline);
}
:root[data-bmf-theme="business"] .shadow,
:root[data-bmf-theme="business"] .shadow-md {
  --tw-shadow: var(--bmf-shadow-card);
}
:root[data-bmf-theme="business"] .shadow-lg,
:root[data-bmf-theme="business"] .shadow-xl,
:root[data-bmf-theme="business"] .shadow-2xl {
  --tw-shadow: var(--bmf-shadow-float);
}

/* ── Surfaces ─────────────────────────────────────────────────────────────
   `.glass` is what BMF's Box carries (packages/bmf/src/index.ts) and what the
   layout's sidebar/record columns are styled with. In the business theme it is
   a plain card: white, hairline border, a breath of shadow. Old class names
   stay valid, so no screen has to change to drop the glass. */
:root[data-bmf-theme="business"] .glass,
:root[data-bmf-theme="business"] .glass-card,
:root[data-bmf-theme="business"] .glass-card-strong,
:root[data-bmf-theme="business"] .arc-column--column:not(.arc-column-sheet) {
  background: var(--card);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--bmf-card-border);
  box-shadow: var(--bmf-shadow-card);
}
:root[data-bmf-theme="business"] .glass:hover,
:root[data-bmf-theme="business"] .glass:has([data-expanded]) {
  background: var(--card);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: var(--bmf-card-border);
  box-shadow: var(--bmf-shadow-card);
}
/* The navigation panel is a wash band with a hairline — the rail column of the
   landing's app mock-up — not a raised card. */
:root[data-bmf-theme="business"] .arc-column--sidebar {
  background: var(--sidebar);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  box-shadow: none;
}

/* The sidebar column is a panel, not a floating tile. */
:root[data-bmf-theme="business"] .arc-column--sidebar {
  border-radius: 0.75rem;
  padding: 0.375rem;
}

/* Record column on the right — one window next to the page content
   (title bar drawn by @arc/ds's column frame, which paints no surface). */
:root[data-bmf-theme="business"] .arc-column--column:not(.arc-column-sheet) {
  border-radius: 0.75rem;
  overflow: hidden;
}
:root[data-bmf-theme="business"] .arc-column--column:not(.arc-column-sheet) .arc-column-header {
  height: 2.25rem;
  padding-left: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Brand gradient helpers → the calm equivalents. */
:root[data-bmf-theme="business"] .gradient-text {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: var(--foreground);
}
:root[data-bmf-theme="business"] .gradient-bg {
  background: var(--primary);
  color: var(--primary-foreground);
}
:root[data-bmf-theme="business"] .gradient-bg:hover {
  box-shadow: none;
  background: color-mix(in srgb, var(--primary) 86%, transparent);
}
:root[data-bmf-theme="business"] .text-brand-orange {
  color: var(--brand-1);
}

/* ── Navigation: monochrome icons ─────────────────────────────────────────
   Sidebar items with an `accent` (document types, model fragments) paint the
   icon, the active tint and the active marker INLINE from hex constants
   (DOC_ACCENTS / NODE_ACCENTS in packages/ui/src/palette.ts). A rainbow of
   icons is what made the menu read as a toy, so the theme mutes them; the
   colours stay where they carry meaning (graph, document headers). Inline
   styles only yield to !important — scoped to the sidebar item, nothing else.
   Checkbox marks (layer toggles) are spans, not direct svg children: they keep
   their colour. */
:root[data-bmf-theme="business"] .arc-sidebar-item > svg {
  color: var(--muted-foreground) !important;
}
:root[data-bmf-theme="business"] .arc-sidebar-item[data-active] > svg {
  color: var(--foreground) !important;
}
:root[data-bmf-theme="business"] .arc-sidebar-item[data-active] {
  /* A white tile with a hairline on the wash panel (landing's app mock-up). */
  background: var(--bmf-nav-active) !important;
  box-shadow: inset 0 0 0 1px var(--bmf-card-border);
}
:root[data-bmf-theme="business"] .arc-sidebar-item[data-active] > span.absolute {
  /* The one place navigation shows the brand: the selected-row bar. */
  background: var(--brand-1) !important;
}

/* ── Type details ─────────────────────────────────────────────────────────── */
/* DS SectionTitle: graphite caps, not the accent — the accent is for "act". */
:root[data-bmf-theme="business"] [data-slot="section-title"] {
  letter-spacing: 0.06em;
}
/* Tight tracking on headings, like the landing's section titles. */
:root[data-bmf-theme="business"] h1,
:root[data-bmf-theme="business"] h2 {
  letter-spacing: -0.025em;
}
/* Status marks are square-ish tags on the landing, not pills. */
:root[data-bmf-theme="business"] [data-slot="status-pill"],
:root[data-bmf-theme="business"] [data-slot="chip"] {
  border-radius: 6px;
}
/* Numbers in data line up. */
:root[data-bmf-theme="business"] [data-slot="stat-tile"],
:root[data-bmf-theme="business"] [data-slot="data-list"],
:root[data-bmf-theme="business"] table {
  font-variant-numeric: tabular-nums;
}

/* ── Density: data rows a notch tighter on desktop (48 → 44px). ────────── */
@media (min-width: 768px) {
  :root[data-bmf-theme="business"] [data-slot="list-row"] {
    min-height: 2.75rem;
  }
}

/* ── Helper classes for new screens (model view etc.) ───────────────────── */
/* Section caps: 11px, tracked, graphite (landing's mockCaps). */
.bmf-caps {
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
/* Page title. */
.bmf-title {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foreground);
}
/* Big KPI number. */
.bmf-figure {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}
/* Quiet tag (landing's tagNeutral / tagSignal). */
.bmf-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background: var(--muted);
  color: var(--muted-foreground);
  box-shadow: inset 0 0 0 1px var(--border);
}
.bmf-tag--signal {
  background: var(--tone-info-bg);
  color: var(--tone-info);
  box-shadow: none;
}


/* ══════════════════════════════════════════════════════════════════════════
   ORGANIZATION BRAND STYLES

   An organization picks a preset and, optionally, its brand colour
   (Ustawienia organizacji → Logo → „Styl marki”; stored on the branding row,
   `packages/workspace/src/branding/brand-style.ts`). The app puts them on
   <html> as `data-brand-style="…"` and `data-brand-accent` + `--brand-accent`.

   A preset overrides the same tokens as the base theme above. Selector shape
   matters — <html> carries the preset attribute AND, in dark mode, `.dark`:
     - mode-independent (type, radius):  :root[data-brand-style="x"]
     - light colours:                    :root[data-brand-style="x"]:not(.dark)
     - dark colours:                     :root.dark[data-brand-style="x"]
   Without `:not(.dark)` a light preset colour (0,2,0) would beat the base
   `.dark` block (0,1,0) and paint a light page in dark mode.

   Presets derive everything accent-coloured from `--bmf-signal`, so a custom
   brand colour (the last block of the file) flows through all of them.
   ══════════════════════════════════════════════════════════════════════════ */


/* Preset typefaces — files in public/fonts/presets (SIL OFL, licences next to
   them). A browser downloads a face only when a preset actually uses it, so an
   organization on the default look pays nothing for them. */
@font-face {
  font-family: "BMF Serif";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("/fonts/presets/source-serif-4-variable.woff2") format("woff2");
}
@font-face {
  font-family: "BMF Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/presets/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "BMF Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500 700;
  src: url("/fonts/presets/ibm-plex-mono-700.woff2") format("woff2");
}
@font-face {
  font-family: "BMF Geometric";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/presets/jost-variable.woff2") format("woff2");
}
@font-face {
  font-family: "BMF Rounded";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/presets/plus-jakarta-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "BMF Rounded";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/presets/plus-jakarta-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "BMF Rounded";
  font-style: normal;
  font-display: swap;
  font-weight: 500 600;
  src: url("/fonts/presets/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "BMF Rounded";
  font-style: normal;
  font-display: swap;
  font-weight: 500 600;
  src: url("/fonts/presets/plus-jakarta-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "BMF Rounded";
  font-style: normal;
  font-display: swap;
  font-weight: 700 900;
  src: url("/fonts/presets/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "BMF Rounded";
  font-style: normal;
  font-display: swap;
  font-weight: 700 900;
  src: url("/fonts/presets/plus-jakarta-sans-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root[data-bmf-theme="business"] {
  /* Headings' typeface; presets swap it, screens use it via h1–h3 / .bmf-title. */
  --bmf-font-display: var(--font-sans);
}
:root[data-bmf-theme="business"] h1,
:root[data-bmf-theme="business"] h2,
:root[data-bmf-theme="business"] h3,
:root[data-bmf-theme="business"] .bmf-title,
:root[data-bmf-theme="business"] .bmf-figure {
  font-family: var(--bmf-font-display);
}

/* ── Redakcyjny (editorial): serif headings, warm paper, sharp corners ───── */
:root[data-bmf-theme="business"][data-brand-style="editorial"] {
  --font-sans: "BMF Serif", Georgia, serif;
  --bmf-font-display: "BMF Serif", Georgia, serif;
  --radius: 0.1875rem;
  --radius-2xl: 0.25rem;
  --radius-3xl: 0.375rem;
}
:root[data-bmf-theme="business"][data-brand-style="editorial"]:not(.dark) {
  --bmf-ink: #1f1b16;
  --bmf-graphite: #6b6358;
  --bmf-line: #e7e0d3;
  --bmf-wash: #f4efe6;
  --bmf-signal: #1f5c4a;
  --bmf-signal-strong: #174538;
  --bmf-signal-soft: #e3eee9;
  --bmf-card-border: #ded5c5;
  --bmf-shadow-card: none;
  --bmf-shadow-hairline: none;
  --background: #fbf9f4;
  --card: #fffdf9;
  --popover: #fffdf9;
  --muted: #f4efe6;
  --secondary: #f4efe6;
  --accent: #efe8dc;
  --sidebar: #f6f1e8;
  --bmf-nav-active: #fffdf9;
  --input: #d9cfbd;
}
:root[data-bmf-theme="business"].dark[data-brand-style="editorial"] {
  --bmf-ink: #ece5d8;
  --bmf-graphite: #a89f90;
  --bmf-line: #2f2a23;
  --bmf-wash: #221e19;
  --bmf-signal: #6fb39c;
  --bmf-signal-soft: color-mix(in srgb, #6fb39c 16%, transparent);
  --bmf-card-border: #3a342b;
  --background: #15120e;
  --card: #1c1814;
  --popover: #221d18;
  --muted: #221e19;
  --secondary: #221e19;
  --accent: #2a251f;
  --sidebar: #1a1612;
  --bmf-nav-active: #2a251f;
  --primary: #ece5d8;
  --primary-foreground: #15120e;
}
:root[data-bmf-theme="business"][data-brand-style="editorial"] h1,
:root[data-bmf-theme="business"][data-brand-style="editorial"] h2,
:root[data-bmf-theme="business"][data-brand-style="editorial"] .bmf-title {
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ── Techniczny (tech): monospace headings and figures, colour in buttons ── */
:root[data-bmf-theme="business"][data-brand-style="tech"] {
  --font-sans: "BMF Mono", ui-monospace, Menlo, Consolas, monospace;
  --bmf-font-display: var(--font-sans);
  --radius: 0.125rem;
  --radius-2xl: 0.125rem;
  --radius-3xl: 0.25rem;
}
:root[data-bmf-theme="business"][data-brand-style="tech"]:not(.dark) {
  --bmf-ink: #0b0d12;
  --bmf-graphite: #555b66;
  --bmf-line: #e3e5ea;
  --bmf-signal: #5b3df5;
  --bmf-signal-strong: #4329d6;
  --bmf-signal-soft: #efebff;
  --bmf-card-border: #d7dae0;
  --bmf-shadow-card: 0 0 0 transparent;
  --background: #fafafa;
  --card: #ffffff;
  --sidebar: #f3f4f6;
  --primary: var(--bmf-signal);
  --primary-foreground: #ffffff;
}
:root[data-bmf-theme="business"].dark[data-brand-style="tech"] {
  --bmf-ink: #e6e8ee;
  --bmf-graphite: #8b93a3;
  --bmf-line: #222632;
  --bmf-signal: #9d8cff;
  --bmf-signal-soft: color-mix(in srgb, #9d8cff 16%, transparent);
  --bmf-card-border: #2a2f3c;
  --background: #07080c;
  --card: #0e1017;
  --popover: #12141c;
  --sidebar: #0b0d13;
  --muted: #151823;
  --secondary: #151823;
  --accent: #1a1e2b;
  --bmf-nav-active: #1a1e2b;
  --primary: var(--bmf-signal);
  --primary-foreground: #07080c;
}
:root[data-bmf-theme="business"][data-brand-style="tech"] body {
  font-size: 0.95em;
  letter-spacing: -0.01em;
}
:root[data-bmf-theme="business"][data-brand-style="tech"] h1,
:root[data-bmf-theme="business"][data-brand-style="tech"] h2,
:root[data-bmf-theme="business"][data-brand-style="tech"] .bmf-title {
  font-weight: 600;
  letter-spacing: -0.02em;
}
:root[data-bmf-theme="business"][data-brand-style="tech"] [data-slot="section-title"],
:root[data-bmf-theme="business"][data-brand-style="tech"] .bmf-caps,
:root[data-bmf-theme="business"][data-brand-style="tech"] table,
:root[data-bmf-theme="business"][data-brand-style="tech"] [data-slot="stat-tile"] {
  font-family: var(--bmf-font-display);
}

/* ── Przyjazny (warm): rounded type, soft corners, warm surfaces ────────── */
:root[data-bmf-theme="business"][data-brand-style="warm"] {
  --font-sans: "BMF Rounded", "Segoe UI", system-ui, sans-serif;
  --bmf-font-display: var(--font-sans);
  --radius: 0.75rem;
  --radius-2xl: 1.25rem;
  --radius-3xl: 1.5rem;
}
:root[data-bmf-theme="business"][data-brand-style="warm"]:not(.dark) {
  --bmf-ink: #2b2420;
  --bmf-graphite: #75695f;
  --bmf-line: #f0e6dc;
  --bmf-wash: #fdf3ea;
  --bmf-signal: #d4572e;
  --bmf-signal-strong: #b4431f;
  --bmf-signal-soft: #fdebe2;
  --bmf-card-border: #f0e2d4;
  --bmf-shadow-card: 0 2px 6px rgb(120 70 30 / 0.06), 0 14px 30px -18px rgb(120 70 30 / 0.25);
  --background: #fffaf5;
  --card: #ffffff;
  --muted: #fbf1e7;
  --secondary: #fbf1e7;
  --accent: #fcece0;
  --sidebar: #fdf3ea;
  --primary: var(--bmf-signal);
  --primary-foreground: #ffffff;
}
:root[data-bmf-theme="business"].dark[data-brand-style="warm"] {
  --bmf-ink: #f3e9e1;
  --bmf-graphite: #b5a598;
  --bmf-line: #33281f;
  --bmf-signal: #f08a63;
  --bmf-signal-soft: color-mix(in srgb, #f08a63 16%, transparent);
  --bmf-card-border: #3d3027;
  --background: #17110d;
  --card: #211913;
  --popover: #261d16;
  --sidebar: #1c1510;
  --muted: #2a2018;
  --secondary: #2a2018;
  --accent: #30251c;
  --bmf-nav-active: #30251c;
  --primary: var(--bmf-signal);
  --primary-foreground: #17110d;
}

/* ── Premium (luxe): black and gold, didone headings, small caps ────────── */
:root[data-bmf-theme="business"][data-brand-style="luxe"] {
  --font-sans: "BMF Geometric", "Segoe UI", sans-serif;
  /* Didot where the system has it (macOS), the bundled serif at a light weight elsewhere. */
  --bmf-font-display: "Didot", "Bodoni 72", "BMF Serif", Georgia, serif;
  --radius: 0rem;
  --radius-2xl: 0rem;
  --radius-3xl: 0rem;
}
:root[data-bmf-theme="business"][data-brand-style="luxe"]:not(.dark) {
  --bmf-ink: #111111;
  --bmf-graphite: #6a6660;
  --bmf-line: #e6e1d8;
  --bmf-wash: #f6f3ee;
  --bmf-signal: #9a7124;
  --bmf-signal-strong: #7d5b1b;
  --bmf-signal-soft: #f5eddc;
  --bmf-card-border: #e0d9cc;
  --bmf-shadow-card: none;
  --bmf-shadow-hairline: none;
  --background: #fbfaf7;
  --card: #ffffff;
  --sidebar: #111111;
  --sidebar-foreground: #f4efe6;
  --bmf-nav-active: #1f1f1f;
}
:root[data-bmf-theme="business"].dark[data-brand-style="luxe"] {
  --bmf-ink: #f4efe6;
  --bmf-graphite: #a39d92;
  --bmf-line: #2a2825;
  --bmf-signal: #d4ad5c;
  --bmf-signal-soft: color-mix(in srgb, #d4ad5c 15%, transparent);
  --bmf-card-border: #34312c;
  --background: #0a0a0a;
  --card: #121212;
  --popover: #171717;
  --sidebar: #0f0f0f;
  --muted: #1b1b1b;
  --secondary: #1b1b1b;
  --accent: #222222;
  --bmf-nav-active: #222222;
}
:root[data-bmf-theme="business"][data-brand-style="luxe"] h1,
:root[data-bmf-theme="business"][data-brand-style="luxe"] h2,
:root[data-bmf-theme="business"][data-brand-style="luxe"] .bmf-title {
  font-weight: 400;
  letter-spacing: 0.01em;
}
:root[data-bmf-theme="business"][data-brand-style="luxe"] [data-slot="section-title"],
:root[data-bmf-theme="business"][data-brand-style="luxe"] .bmf-caps {
  letter-spacing: 0.14em;
}
/* The navigation panel — and the rail next to it — is the black band of the
   brand, in both modes. The rail has no class of its own: it is the parent of
   the `data-arc-rail-top` zone. */
:root[data-bmf-theme="business"][data-brand-style="luxe"] :has(> [data-arc-rail-top]) {
  background: #111111;
  color: #d8d2c6;
}
:root[data-bmf-theme="business"][data-brand-style="luxe"] :has(> [data-arc-rail-top]) button {
  color: #d8d2c6;
}
/* The navigation panel is the black band of the brand, in both modes. */
:root[data-bmf-theme="business"][data-brand-style="luxe"] .arc-column--sidebar {
  color: var(--sidebar-foreground);
  border-color: transparent;
}
:root[data-bmf-theme="business"][data-brand-style="luxe"]:not(.dark) .arc-column--sidebar .arc-sidebar-item {
  color: #d8d2c6;
}
:root[data-bmf-theme="business"][data-brand-style="luxe"]:not(.dark) .arc-column--sidebar .arc-sidebar-item > svg {
  color: #a39d92 !important;
}
:root[data-bmf-theme="business"][data-brand-style="luxe"]:not(.dark) .arc-column--sidebar .arc-sidebar-item[data-active],
:root[data-bmf-theme="business"][data-brand-style="luxe"]:not(.dark) .arc-column--sidebar .arc-sidebar-item[data-active] > svg {
  color: #ffffff !important;
}

/* ── Preset fixes in the rail ───────────────────────────────────────────── */
/* Premium: the active rail item stays dark-on-black, white text. */
:root[data-bmf-theme="business"][data-brand-style="luxe"] :has(> [data-arc-rail-top]) button[data-active],
:root[data-bmf-theme="business"][data-brand-style="luxe"] :has(> [data-arc-rail-top]) [aria-current="page"] {
  background: #262626 !important;
  color: #ffffff !important;
}
/* Techniczny: the 88px rail cannot fit mono captions ("Konsultacje" broke in
   two) — the rail keeps the base sans. */
:root[data-bmf-theme="business"][data-brand-style="tech"] :has(> [data-arc-rail-top]) {
  font-family: "Geist Variable", system-ui, sans-serif;
}

/* ── Custom brand colour — LAST, so it beats every preset's accent ─────── */
:root[data-bmf-theme="business"][data-brand-accent]:not(.dark) {
  --bmf-signal: var(--brand-accent);
  --bmf-signal-strong: color-mix(in oklab, var(--brand-accent) 80%, black);
  --bmf-signal-soft: color-mix(in srgb, var(--brand-accent) 10%, white);
}
:root[data-bmf-theme="business"].dark[data-brand-accent] {
  --bmf-signal: color-mix(in oklab, var(--brand-accent) 62%, white);
  --bmf-signal-strong: color-mix(in oklab, var(--brand-accent) 45%, white);
  --bmf-signal-soft: color-mix(in srgb, var(--brand-accent) 18%, transparent);
}
