/* ============================================================
   Workflow Blueprint Builder — TitanTech360 design system
   Dark is default; [data-theme="light"] overrides mirror the
   live site's light palette (app/globals.css on titantech360.com).
   ============================================================ */

:root {
  --background: #020307;
  --surface: #05070d;
  --foreground: #ffffff;
  --muted: #999eaf;
  --primary: #0077ff;
  --primary-soft: #3388ff;
  --gold: #ffb900;
  --bg-blue: #013169;
  --border-blue: #0077ff4a;
  --glass-1: #3388ff12;
  --glass-2: #006aff21;
  --edge: #4a6a9e;
  --text-soft: #d6dae4;
  --danger-text: #ff8fa3;

  /* Raw "R, G, B" channel triples (no # / rgba() wrapper) for spots that
     need a variable alpha the hex custom properties above can't give —
     same technique the main site uses for its --color-* tokens. */
  --overlay: 255, 255, 255; /* generic surface highlight/hover tint */
  --chrome-rgb: 5, 7, 13; /* translucent panel backgrounds (topbar, palette, inspector) */
  --canvas-fill-rgb: 2, 3, 7; /* canvas working-area base fill */
  --node-a-rgb: 12, 16, 26; /* node card gradient, top */
  --node-b-rgb: 6, 9, 16; /* node card gradient, bottom */

  --n-trigger: #ffb900;
  --n-action: #0077ff;
  --n-decision: #a855f7;
  --n-system: #22d3ee;
  --n-human: #34d399;
  --n-agent: #818cf8;
  --n-handoff: #fb923c;
  --n-outcome: #f43f5e;

  --radius-card: 20px;
  --radius-node: 14px;
  --font: "Rethink Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --sev-high: #f43f5e;
  --sev-medium: #ffb900;
  --sev-low: #22d3ee;
  --sev-keep: #34d399;

  color-scheme: dark;
}

[data-theme="light"] {
  --background: #ffffff;
  --surface: #ffffff;
  --foreground: #0b0f19;
  --muted: #5b6472;
  --bg-blue: #d6eaff;
  --border-blue: #0077ff3d;
  --glass-1: #0077ff0a;
  --glass-2: #0077ff14;
  --edge: #7d93b3;
  --text-soft: #33384a;
  --danger-text: #c81e46;

  --overlay: 2, 3, 7;
  --chrome-rgb: 255, 255, 255;
  --canvas-fill-rgb: 255, 255, 255;
  --node-a-rgb: 255, 255, 255;
  --node-b-rgb: 246, 248, 251;

  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* radial navy glow behind everything, matching the live site hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, var(--bg-blue) 0%, rgba(2, 3, 7, 0) 72%);
  opacity: 0.9;
}
[data-theme="light"] body::before { opacity: 0.6; }

button { font-family: inherit; cursor: pointer; }
kbd {
  font-family: inherit;
  font-size: 0.72rem;
  background: var(--foreground);
  color: var(--background);
  border-radius: 5px;
  padding: 1px 5px;
  font-weight: 600;
}

/* ---------------- top bar ---------------- */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-blue);
  background: rgba(var(--chrome-rgb), 0.72);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}
/* Embedded (iframe on /workflow-blueprint): no brand/logo, so there's
   nothing to space-between — this is just the tool's own working
   toolbar, not a second site header, so it stays borderless/transparent
   rather than reading as a duplicate nav bar under the real one. Moved
   to embed.css, which is loaded only by the embedded copy, so this file
   can stay a clean 1:1 sync target with the standalone dev tool. */

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { color: var(--primary); display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 0.98rem; letter-spacing: 0.2px; }
.brand-text span { font-size: 0.76rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.4px; }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 9px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.25s ease;
  color: var(--foreground);
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn-ghost { border-color: rgba(var(--overlay), 0.16); background: rgba(var(--overlay), 0.04); }
.btn-ghost:hover { border-color: var(--border-blue); background: rgba(var(--overlay), 0.09); }
.btn-primary {
  border-color: rgba(0, 119, 255, 0.6);
  background: var(--background);
  box-shadow: 0 3px 20px rgba(0, 119, 255, 0.35);
}
.btn-primary:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 30px rgba(0, 119, 255, 0.6);
}
.btn-block { width: 100%; }

/* ---------------- workspace ---------------- */
.workspace {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 0;
}

/* ---------------- palette ---------------- */
.palette {
  border-right: 1px solid var(--border-blue);
  background: rgba(var(--chrome-rgb), 0.55);
  backdrop-filter: blur(8px);
  padding: 20px 18px;
  overflow-y: auto;
}
.palette-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
}
.palette-hint { font-size: 0.78rem; color: var(--muted); line-height: 1.5; margin-bottom: 16px; }
.palette-list { display: flex; flex-direction: column; gap: 8px; }

.palette-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--overlay), 0.09);
  background: rgba(var(--overlay), 0.03);
  text-align: left;
  transition: all 0.18s ease;
  width: 100%;
}
.palette-item:hover { border-color: var(--dot); background: rgba(var(--overlay), 0.06); transform: translateX(2px); }
.palette-item .swatch {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--dot) 18%, transparent);
  color: var(--dot);
}
.palette-item .pi-text { display: flex; flex-direction: column; gap: 2px; }
.palette-item .pi-text b { font-size: 0.82rem; font-weight: 600; color: var(--foreground); }
.palette-item .pi-text span { font-size: 0.72rem; color: var(--muted); line-height: 1.4; }

.palette-legend { margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(var(--overlay), 0.08); }
.palette-legend ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.palette-legend li { font-size: 0.76rem; color: var(--muted); line-height: 1.5; padding-left: 14px; position: relative; }
.palette-legend li::before { content: "›"; position: absolute; left: 0; color: var(--primary); }

/* ---------------- canvas ---------------- */
.canvas-wrap {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(var(--overlay), 0.06) 1px, transparent 0),
    linear-gradient(rgba(var(--canvas-fill-rgb), 0.74), rgba(var(--canvas-fill-rgb), 0.74));
  background-size: 26px 26px, 100% 100%;
  cursor: grab;
}
.canvas-wrap.panning { cursor: grabbing; }
.canvas-wrap.linking { cursor: crosshair; }

.canvas-viewport { position: absolute; inset: 0; transform-origin: 0 0; }

.edge-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.edge-path {
  fill: none;
  stroke: var(--edge);
  stroke-width: 2;
  marker-end: url(#arrow);
  pointer-events: stroke;
  cursor: pointer;
  transition: stroke 0.15s ease;
}
.edge-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.edge-path.selected { stroke: var(--primary); stroke-width: 2.6; marker-end: url(#arrow-active); }
.edge-path:hover { stroke: var(--primary-soft); }
.temp-edge { fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-dasharray: 5 5; pointer-events: none; }

.edge-label {
  font-size: 11px;
  fill: var(--foreground);
  paint-order: stroke;
  stroke: var(--background);
  stroke-width: 4px;
  cursor: pointer;
  user-select: none;
}

.node-layer { position: absolute; inset: 0; }

.node {
  position: absolute;
  width: 210px;
  background: linear-gradient(180deg, rgba(var(--node-a-rgb), 0.96), rgba(var(--node-b-rgb), 0.96));
  border: 1px solid var(--dot);
  border-radius: var(--radius-node);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3);
  color: var(--foreground);
  user-select: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.node.selected { box-shadow: 0 0 0 2px var(--primary), 0 14px 40px rgba(0, 119, 255, 0.4); }
.node.link-target { box-shadow: 0 0 0 2px var(--n-human), 0 14px 40px rgba(52, 211, 153, 0.4); }
.node.incomplete .node-head::after {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  margin-left: auto;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--gold);
}

.node-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(var(--overlay), 0.08);
  background: color-mix(in srgb, var(--dot) 14%, transparent);
  border-radius: var(--radius-node) var(--radius-node) 0 0;
  cursor: grab;
}
.node-head:active { cursor: grabbing; }
.node-head .n-icon { color: var(--dot); display: grid; place-items: center; flex-shrink: 0; }
.node-head .n-type { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 1.3px; color: var(--dot); font-weight: 700; }

.node-body { padding: 10px 12px 12px; }
.node-title {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}
.node-title.placeholder { color: var(--muted); font-weight: 400; font-style: italic; }
.node-meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.node-chip {
  font-size: 0.66rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(var(--overlay), 0.07);
  color: var(--muted);
  white-space: nowrap;
}
.node-chip.warn { background: rgba(255, 185, 0, 0.14); color: var(--gold); }

.port {
  position: absolute;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--background);
  border: 2px solid var(--dot);
  top: 50%;
  transform: translateY(-50%);
  cursor: crosshair;
  transition: transform 0.12s ease, background 0.12s ease;
  z-index: 3;
}
.port:hover { transform: translateY(-50%) scale(1.35); background: var(--dot); }
.port.port-in { left: -9px; }
.port.port-out { right: -9px; }

/* ---------------- canvas overlays ---------------- */
.canvas-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  pointer-events: none;
}
.canvas-empty svg { color: var(--primary); opacity: 0.7; }
.canvas-empty h2 { color: var(--foreground); font-size: 1.3rem; font-weight: 700; }
.canvas-empty p { max-width: 380px; font-size: 0.86rem; line-height: 1.6; }
.canvas-empty .btn { pointer-events: auto; margin-top: 4px; }
.canvas-empty[hidden] { display: none; }

.canvas-toolbar {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 6px;
  background: rgba(var(--chrome-rgb), 0.8);
  border: 1px solid var(--border-blue);
  border-radius: 999px;
  padding: 5px;
  backdrop-filter: blur(8px);
}
.mini {
  min-width: 34px; height: 30px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--foreground);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 10px;
}
.mini:hover { background: rgba(var(--overlay), 0.1); }

.canvas-stats {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  gap: 14px;
  font-size: 0.74rem;
  color: var(--muted);
  background: rgba(var(--chrome-rgb), 0.7);
  border: 1px solid rgba(var(--overlay), 0.08);
  border-radius: 10px;
  padding: 7px 12px;
  backdrop-filter: blur(8px);
}
.canvas-stats b { color: var(--foreground); }
.canvas-stats:empty { display: none; }

/* ---------------- inspector ---------------- */
.inspector {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 366px;
  border-left: 1px solid var(--border-blue);
  background: rgba(var(--chrome-rgb), 0.92);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.25);
  z-index: 6;
}
.inspector[data-open="true"] { transform: translateX(0); }
.inspector[data-open="false"] { pointer-events: none; }
.inspector-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(var(--overlay), 0.14);
  background: rgba(var(--overlay), 0.05);
  color: var(--foreground);
  font-size: 1.1rem;
  line-height: 1;
}
.inspector-close:hover { background: rgba(var(--overlay), 0.12); }
.inspector-inner { height: 100%; overflow-y: auto; padding: 20px 20px 60px; opacity: 0; transition: opacity 0.2s ease; }
.inspector[data-open="true"] .inspector-inner { opacity: 1; }

.insp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; padding-right: 34px; }
.insp-head .swatch { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--dot) 18%, transparent); color: var(--dot); flex-shrink: 0; }
.insp-head .it-type { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 1.4px; color: var(--dot); font-weight: 700; }
.insp-head .it-name { font-size: 0.95rem; font-weight: 600; }
.insp-desc { font-size: 0.76rem; color: var(--muted); line-height: 1.5; margin: 10px 0 18px; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.3px; margin-bottom: 6px; color: var(--foreground); }
.field .hint { font-weight: 400; color: var(--muted); }
.field input[type="text"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  background: rgba(var(--overlay), 0.04);
  border: 1px solid rgba(var(--overlay), 0.14);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--foreground);
  font-size: 0.82rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 62px; line-height: 1.5; }
.field select option { background: var(--surface); color: var(--foreground); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.segmented { display: flex; gap: 6px; }
.segmented button {
  flex: 1;
  padding: 8px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 9px;
  border: 1px solid rgba(var(--overlay), 0.14);
  background: rgba(var(--overlay), 0.03);
  color: var(--muted);
}
.segmented button.active { border-color: var(--primary); background: rgba(0, 119, 255, 0.16); color: var(--foreground); }

.pain-scale { display: flex; gap: 6px; }
.pain-scale button {
  flex: 1; height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(var(--overlay), 0.14);
  background: rgba(var(--overlay), 0.03);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.pain-scale button.active { border-color: var(--gold); background: rgba(255, 185, 0, 0.16); color: var(--gold); }

.insp-actions { display: flex; gap: 8px; margin-top: 20px; }
.btn-danger {
  border: 1px solid rgba(244, 63, 94, 0.5);
  background: rgba(244, 63, 94, 0.1);
  color: var(--danger-text);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  flex: 1;
}
.btn-danger:hover { background: rgba(244, 63, 94, 0.2); }

.insp-live {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--border-blue);
  border-radius: 12px;
  background: var(--glass-1);
}
.insp-live h4 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.3px; color: var(--primary); margin-bottom: 8px; }
.insp-live .live-row { display: flex; justify-content: space-between; font-size: 0.78rem; padding: 3px 0; color: var(--muted); }
.insp-live .live-row b { color: var(--foreground); }
.insp-live .live-note { font-size: 0.76rem; line-height: 1.5; margin-top: 8px; color: var(--muted); }
.insp-live .flag { color: var(--gold); }

/* ---------------- modals ---------------- */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(1, 4, 12, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal-scrim[hidden] { display: none; }
.modal {
  position: relative;
  width: 100%;
  max-width: 920px;
  background: var(--surface);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-card);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  padding: 40px;
}
.modal-sm { max-width: 560px; }
.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(var(--overlay), 0.14);
  background: rgba(var(--overlay), 0.04);
  color: var(--foreground);
  font-size: 1.2rem;
  line-height: 1;
}
.modal-close:hover { background: rgba(var(--overlay), 0.1); }
.modal-h { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.modal-sub { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin-bottom: 22px; }

.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.template-card {
  text-align: left;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(var(--overlay), 0.1);
  background: rgba(var(--overlay), 0.03);
  color: var(--foreground);
  transition: all 0.18s ease;
}
.template-card:hover { border-color: var(--primary); background: var(--glass-2); transform: translateY(-2px); }
.template-card b { display: block; font-size: 0.9rem; margin-bottom: 5px; }
.template-card span { font-size: 0.76rem; color: var(--muted); line-height: 1.5; }

/* ---------------- blueprint report ---------------- */
.blueprint { color: var(--foreground); }
.bp-eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px; color: var(--primary); font-weight: 700; }
.bp-title { font-size: 1.9rem; font-weight: 800; line-height: 1.15; margin: 8px 0 6px; }
.bp-sub { font-size: 0.86rem; color: var(--muted); }
.bp-meta { display: flex; gap: 18px; margin-top: 14px; font-size: 0.78rem; color: var(--muted); flex-wrap: wrap; }
.bp-meta b { color: var(--foreground); }

.bp-scorecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 26px 0; }
.bp-score {
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-blue);
  background: var(--glass-1);
}
.bp-score .big { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.bp-score .lbl { font-size: 0.72rem; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.bp-score.accent .big { color: var(--gold); }

.bp-section { margin-top: 30px; }
.bp-section h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.bp-section .sec-lead { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.bp-narrative { font-size: 0.9rem; line-height: 1.7; color: var(--text-soft); }
.bp-narrative strong { color: var(--foreground); }

.finding {
  border: 1px solid rgba(var(--overlay), 0.1);
  border-left: 3px solid var(--fc);
  border-radius: 12px;
  padding: 15px 16px;
  margin-bottom: 10px;
  background: rgba(var(--overlay), 0.02);
}
.finding-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.finding-head .f-title { font-size: 0.92rem; font-weight: 700; }
.sev-chip {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fc) 20%, transparent);
  color: var(--fc);
}
.finding .f-where { font-size: 0.75rem; color: var(--muted); margin-bottom: 8px; }
.finding .f-where span { color: var(--fc); font-weight: 600; }
.finding .f-body { font-size: 0.84rem; line-height: 1.6; color: var(--text-soft); }
.finding .f-body strong { color: var(--foreground); }
.finding .f-impact { margin-top: 8px; font-size: 0.78rem; color: var(--gold); font-weight: 600; }

.bp-phase { margin-bottom: 16px; }
.bp-phase .ph-label { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.bp-phase .ph-label b { font-size: 0.92rem; }
.bp-phase .ph-label span { font-size: 0.74rem; color: var(--muted); }
.bp-phase ol { margin-left: 18px; }
.bp-phase li { font-size: 0.84rem; line-height: 1.65; color: var(--text-soft); margin-bottom: 4px; }

.keep-human-list { display: flex; flex-direction: column; gap: 8px; }
.keep-item {
  display: flex;
  gap: 10px;
  font-size: 0.84rem;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.keep-item .kh-dot { color: var(--n-human); flex-shrink: 0; font-weight: 800; }
.keep-item b { color: var(--foreground); }

.bp-cta {
  margin-top: 34px;
  padding: 26px;
  border-radius: 16px;
  border: 1px solid var(--border-blue);
  background: radial-gradient(ellipse 90% 120% at 0% 0%, rgba(0, 119, 255, 0.22), transparent 60%), var(--glass-1);
  text-align: center;
}
.bp-cta h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; }
.bp-cta p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; max-width: 460px; margin: 0 auto 16px; }
.bp-cta .bp-book { font-size: 0.9rem; padding: 12px 26px; }

.bp-or {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 300px;
  margin: 20px auto 16px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.bp-or::before, .bp-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(var(--overlay), 0.14);
}

.bp-email-form {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto 10px;
  flex-wrap: wrap;
}
.bp-email-form input {
  flex: 1 1 200px;
  background: rgba(var(--overlay), 0.06);
  border: 1px solid rgba(var(--overlay), 0.18);
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.85rem;
}
.bp-email-form input:focus { outline: none; border-color: var(--primary); }
.bp-email-form button {
  flex: 0 0 auto;
  border-color: rgba(var(--overlay), 0.22);
  background: rgba(var(--overlay), 0.06);
  box-shadow: none;
}
.bp-email-form button:hover { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: none; }
.bp-cta-fine { font-size: 0.72rem; color: var(--muted); margin: 0; }

.empty-note { font-size: 0.86rem; color: var(--muted); line-height: 1.6; padding: 20px; border: 1px dashed rgba(var(--overlay), 0.16); border-radius: 12px; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 80;
  background: var(--surface);
  border: 1px solid var(--border-blue);
  color: var(--foreground);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: all 0.25s ease;
}
.toast[hidden] { display: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .bp-scorecards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .workspace:has(.inspector[data-open="true"]) { grid-template-columns: 1fr; }
  .palette { display: none; }
  .inspector { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 90vw); z-index: 40; transform: translateX(100%); transition: transform 0.28s ease; border: none; }
  .inspector[data-open="true"] { transform: translateX(0); }
  .template-grid { grid-template-columns: 1fr; }
  .modal { padding: 26px; }
  .mobile-warn { display: block; }
}
.mobile-warn {
  display: none;
  padding: 10px 16px;
  background: rgba(255, 185, 0, 0.12);
  color: var(--gold);
  font-size: 0.78rem;
  text-align: center;
}

@media print {
  body { overflow: visible; background: #fff; }
  .topbar, .palette, .inspector, .canvas-wrap, .modal-close, .bp-actions, #bg-canvas, .toast { display: none !important; }
  .modal-scrim { position: static; background: none; padding: 0; backdrop-filter: none; }
  .modal { box-shadow: none; border: none; max-width: 100%; padding: 0; color: #111; }
  .blueprint, .bp-title, .finding .f-body, .bp-narrative, .bp-phase li { color: #111 !important; }
  .bp-score, .finding, .bp-cta { break-inside: avoid; }
}
