:root {
  --bg: #ffffff;
  --ink: #0b0b0c;
  --muted: #5f666a;
  --line: #dfe3e5;
  --surface: #ffffff;
  --soft: rgba(7, 59, 76, 0.08);
  --teal: #073b4c;
  --coral: #d02631;
  --amber: #d88a28;
  --indigo: #6d3e7f;
  --blue: #4b7bae;
  --emerald: #2e7d6a;
  --primary: #073b4c;
  --danger: #d02631;
  --shadow: 0 18px 50px rgba(31, 46, 38, 0.12);
  --shadow-soft: 0 10px 28px rgba(31, 46, 38, 0.06);
  --shadow-card: 0 14px 30px rgba(31, 46, 38, 0.07);
  --shadow-card-hover: 0 18px 34px rgba(31, 46, 38, 0.09);
  --shadow-inline: 0 8px 18px rgba(31, 46, 38, 0.05);
  --transition-fast: 120ms ease;
  --transition-base: 160ms ease;
  --transition-slow: 220ms ease;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Tech Diagram (React Flow) - canvas first */
.tech-diagram-panel {
  padding: 0;
}

.td-shell {
  height: min(78vh, 860px);
  min-height: 640px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(7, 59, 76, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.td-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(7, 59, 76, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

.td-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.td-topbar-right {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
}

.td-diagram-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 190px;
  max-width: 260px;
}

.td-topbar-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}

.td-diagram-select {
  min-width: 0;
  width: 100%;
}

.td-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  padding: 2px;
  border: 1px solid rgba(7, 59, 76, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-inline);
}

.td-rail-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(7, 59, 76, 0.14);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.td-title {
  min-width: 160px;
  max-width: 520px;
  width: 100%;
  border: 1px solid rgba(7, 59, 76, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 650;
  background: #fff;
}

.td-template {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(7, 59, 76, 0.14);
  padding: 0 10px;
  background: #fff;
  font-weight: 600;
  flex: 0 0 auto;
}

.td-iconbtn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(7, 59, 76, 0.14);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  flex: 0 0 auto;
  box-shadow: var(--shadow-inline);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-fast), background-color var(--transition-base);
}

.td-iconbtn:hover,
.td-rail-toggle:hover {
  border-color: rgba(7, 59, 76, 0.22);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.td-iconbtn.primary {
  border-color: rgba(7, 59, 76, 0.28);
  background: rgba(7, 59, 76, 0.08);
}

.td-iconbtn .inline-icon,
.td-rail-toggle .inline-icon {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.td-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 260px;
  align-items: stretch;
  position: relative;
}

.td-body.right-collapsed {
  grid-template-columns: 1fr 0;
}

.td-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(255, 255, 255, 0.92);
}

.td-rail-right {
  border-left: 1px solid rgba(7, 59, 76, 0.12);
}

.td-rail-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  right: calc(var(--td-rail-width, 320px) - 4px);
  width: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  z-index: 3;
}

.td-rail-resizer::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(7, 59, 76, 0.08);
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.td-rail-resizer:hover::before,
.td-rail-resizer:focus-visible::before {
  background: rgba(7, 59, 76, 0.22);
  box-shadow: 0 0 0 4px rgba(7, 59, 76, 0.08);
}

.td-rail.collapsed {
  display: none;
}

.td-rail-head {
  padding: 10px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(7, 59, 76, 0.1);
}

.td-rail-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.td-diagram-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(7, 59, 76, 0.08);
  background: transparent;
  cursor: pointer;
}

.td-diagram-item:hover {
  background: rgba(7, 59, 76, 0.05);
}

.td-diagram-item.active {
  background: rgba(7, 59, 76, 0.08);
}

.td-diagram-item-title {
  font-weight: 650;
  line-height: 1.2;
}

.td-diagram-delete {
  border: 0;
  background: transparent;
  color: var(--danger);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 10px;
}

.td-diagram-delete:hover {
  background: rgba(208, 38, 49, 0.12);
}

.td-canvas {
  position: relative;
  min-height: 0;
}

.td-canvas .react-flow__renderer {
  background: #ffffff;
}

.td-insert-hint {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(7, 59, 76, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(7, 59, 76, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-insert-cancel {
  border: 1px solid rgba(7, 59, 76, 0.14);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 650;
}

.td-palette {
  padding: 10px 12px;
  display: grid;
  gap: 12px;
}

.td-palette-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.td-palette-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(7, 59, 76, 0.12);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: grab;
  font-weight: 650;
}

.td-palette-item:active {
  cursor: grabbing;
}

.td-palette-swatch {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(7, 59, 76, 0.12);
}

.td-palette-swatch-inner {
  width: 14px;
  height: 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
}

.td-palette-swatch-inner.hex {
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
}

.td-palette-swatch-inner.trap {
  clip-path: polygon(12% 0%, 100% 0%, 88% 100%, 0% 100%);
}

.td-palette-swatch-inner.diamond {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.td-palette-swatch-inner.cyl {
  border-radius: 999px;
  width: 16px;
  height: 10px;
}

.td-palette-swatch-inner.circle {
  border-radius: 999px;
  width: 12px;
  height: 12px;
}

.td-palette-swatch-inner.notch {
  clip-path: polygon(0% 0%, 88% 0%, 100% 50%, 88% 100%, 0% 100%, 10% 50%);
}

.td-palette-swatch-inner.dashed {
  background: transparent;
  border: 2px dashed rgba(255, 255, 255, 0.9);
}

.td-palette-swatch-inner.pill,
.td-palette-swatch-inner.capsule {
  border-radius: 999px;
  width: 16px;
  height: 10px;
}

.td-palette-swatch-inner.band {
  width: 16px;
  height: 10px;
  border-radius: 6px;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.55);
}

.td-palette-swatch.teal { background: rgba(7, 59, 76, 0.14); }
.td-palette-swatch.blue { background: rgba(75, 123, 174, 0.16); }
.td-palette-swatch.indigo { background: rgba(109, 62, 127, 0.16); }
.td-palette-swatch.coral { background: rgba(208, 38, 49, 0.14); }
.td-palette-swatch.amber { background: rgba(216, 138, 40, 0.18); }
.td-palette-swatch.emerald { background: rgba(46, 125, 106, 0.14); }
.td-palette-swatch.neutral { background: rgba(11, 11, 12, 0.06); }
.td-palette-swatch.note { background: rgba(216, 138, 40, 0.16); }
.td-palette-swatch-inner.note { width: 14px; height: 14px; border-radius: 5px; background: rgba(255, 255, 255, 0.9); }

.td-palette-footer {
  display: grid;
  gap: 10px;
}

.td-props {
  padding: 10px 12px;
  display: grid;
  gap: 10px;
}

.td-prop {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.td-prop input,
.td-prop select {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(7, 59, 76, 0.14);
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.td-prop textarea {
  min-height: 78px;
  border-radius: 10px;
  border: 1px solid rgba(7, 59, 76, 0.14);
  padding: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
  resize: vertical;
  font-family: inherit;
}

.td-prop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.td-pick {
  border: 1px solid rgba(7, 59, 76, 0.14);
  background: #fff;
  border-radius: 10px;
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.td-pick.active {
  box-shadow: 0 0 0 2px rgba(7, 59, 76, 0.25);
  border-color: rgba(7, 59, 76, 0.35);
}

.td-swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(11, 11, 12, 0.08);
}

.td-icon-auto {
  font-weight: 900;
  font-size: 11px;
  color: rgba(7, 59, 76, 0.9);
}

.td-shape-preview {
  width: 18px;
  height: 14px;
  border: 2px solid rgba(7, 59, 76, 0.65);
  border-radius: 5px;
}

.td-shape-preview.shape-auto {
  border-radius: 6px;
  border-style: dashed;
}

.td-shape-preview.shape-rect { border-radius: 6px; }
.td-shape-preview.shape-notch { clip-path: polygon(0% 0%, 88% 0%, 100% 50%, 88% 100%, 0% 100%, 10% 50%); border-radius: 8px; }
.td-shape-preview.shape-pill { border-radius: 999px; }
.td-shape-preview.shape-hex { clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%); border-radius: 6px; }
.td-shape-preview.shape-diamond { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); border-radius: 6px; }
.td-shape-preview.shape-trap { clip-path: polygon(12% 0%, 100% 0%, 88% 100%, 0% 100%); border-radius: 6px; }
.td-shape-preview.shape-cyl { border-radius: 999px; height: 12px; }
.td-shape-preview.shape-circle { border-radius: 999px; width: 14px; height: 14px; }
.td-shape-preview.shape-dashed { border-style: dashed; }
.td-shape-preview.shape-band { border-radius: 6px; box-shadow: inset 0 -3px 0 rgba(208, 38, 49, 0.25); }

.td-tags {
  border-top: 1px solid rgba(7, 59, 76, 0.12);
  padding-top: 10px;
  display: grid;
  gap: 10px;
}

.td-disclosure {
  border-top: 1px solid rgba(7, 59, 76, 0.12);
  padding-top: 10px;
  display: grid;
  gap: 10px;
}

.td-disclosure summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: rgba(7, 59, 76, 0.92);
  list-style: none;
}

.td-disclosure summary::-webkit-details-marker {
  display: none;
}

.td-props-compact {
  padding: 0;
}

.td-tags-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.td-tech-insight-grid {
  display: grid;
  gap: 10px;
}

.td-tech-insight {
  border: 1px solid rgba(7, 59, 76, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.86);
}

.td-tech-insight strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
  color: rgba(7, 59, 76, 0.96);
}

.td-tech-insight p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.td-tech-insight.good {
  border-color: rgba(46, 125, 106, 0.22);
  background: rgba(46, 125, 106, 0.06);
}

.td-tech-insight.warn {
  border-color: rgba(216, 138, 40, 0.22);
  background: rgba(216, 138, 40, 0.08);
}

.diagram-node {
  border-radius: 10px;
  border: 1px solid rgba(7, 59, 76, 0.25);
  background: #fff;
  padding: 10px 12px;
  min-width: 160px;
  box-shadow: 0 12px 24px rgba(7, 59, 76, 0.12);
}

.diagram-node.selected {
  outline: 2px solid rgba(7, 59, 76, 0.45);
  outline-offset: 2px;
}

.diagram-node.note {
  background: linear-gradient(180deg, rgba(248, 235, 216, 0.95), rgba(255, 255, 255, 0.95));
  border-color: rgba(216, 138, 40, 0.35);
}

.diagram-node-label {
  font-weight: 750;
  color: var(--ink);
}

/* Rich tech nodes */
.td-handle {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(7, 59, 76, 0.75);
  opacity: 0;
  transition: opacity 120ms ease;
  z-index: 20;
}
.td-handle-input { background: #4b7bae; }
.td-handle-output { background: #2e7d6a; }
.td-handle-bidirectional { background: #6d3e7f; }
.td-handle-power { background: #d02631; }
.td-handle-ground { background: #0b0b0c; }
.td-handle-passive { background: #d88a28; }

.tech-node {
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  position: relative;
}

.tech-node:hover .td-handle,
.tech-node.selected .td-handle {
  opacity: 1;
}

.tech-node.selected {
  outline: 2px solid rgba(7, 59, 76, 0.45);
  outline-offset: 2px;
}

.td-port-list {
  display: grid;
  gap: 8px;
}

.td-port-row {
  display: grid;
  grid-template-columns: 1fr 120px 100px 28px;
  gap: 8px;
  align-items: center;
}

.tech-node-inner {
  padding: 10px 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.tech-node-inner.align-left { text-align: left; }
.tech-node-inner.align-center { text-align: center; }
.tech-node-inner.align-right { text-align: right; }

.tech-node-shape {
  border: 1px solid rgba(7, 59, 76, 0.24);
  box-shadow: 0 14px 30px rgba(7, 59, 76, 0.12);
  background: #fff;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.tech-node-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.tech-node-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(7, 59, 76, 0.12);
  background: rgba(7, 59, 76, 0.06);
  flex: 0 0 auto;
}

.tech-node-icon-text {
  font-weight: 900;
  font-size: 12px;
  color: rgba(7, 59, 76, 0.95);
  letter-spacing: 0;
}

.tech-node-title {
  font-weight: 800;
  line-height: 1.15;
}

.tech-node-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.tech-node-titles {
  min-width: 0;
}

.tech-node-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  margin-top: auto;
}

.tech-node-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(7, 59, 76, 0.12);
  background: rgba(7, 59, 76, 0.06);
  color: rgba(7, 59, 76, 0.95);
  font-weight: 650;
}

/* Color accents */
.tech-node.teal .tech-node-shape { border-color: rgba(7, 59, 76, 0.28); background: linear-gradient(180deg, rgba(7, 59, 76, 0.08), #fff); }
.tech-node.blue .tech-node-shape { border-color: rgba(75, 123, 174, 0.28); background: linear-gradient(180deg, rgba(75, 123, 174, 0.12), #fff); }
.tech-node.indigo .tech-node-shape { border-color: rgba(109, 62, 127, 0.28); background: linear-gradient(180deg, rgba(109, 62, 127, 0.12), #fff); }
.tech-node.coral .tech-node-shape { border-color: rgba(208, 38, 49, 0.26); background: linear-gradient(180deg, rgba(208, 38, 49, 0.10), #fff); }
.tech-node.amber .tech-node-shape { border-color: rgba(216, 138, 40, 0.28); background: linear-gradient(180deg, rgba(216, 138, 40, 0.14), #fff); }
.tech-node.emerald .tech-node-shape { border-color: rgba(46, 125, 106, 0.28); background: linear-gradient(180deg, rgba(46, 125, 106, 0.12), #fff); }
.tech-node.neutral .tech-node-shape { border-color: rgba(11, 11, 12, 0.18); background: linear-gradient(180deg, rgba(11, 11, 12, 0.06), #fff); }

/* Shapes */
.tech-node-shape.shape-rect { border-radius: 14px; }
.tech-node-shape.shape-hex { border-radius: 10px; clip-path: polygon(4% 0%, 96% 0%, 100% 20%, 100% 80%, 96% 100%, 4% 100%, 0% 80%, 0% 20%); }
.tech-node-shape.shape-trap { border-radius: 12px; clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%); }
.tech-node-shape.shape-diamond { border-radius: 12px; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.tech-node-shape.shape-pill { border-radius: 999px; }
.tech-node-shape.shape-capsule { border-radius: 999px; }
.tech-node-shape.shape-circle { border-radius: 999px; }
.tech-node-shape.shape-notch { border-radius: 16px; clip-path: polygon(0% 0%, 92% 0%, 100% 18%, 100% 82%, 92% 100%, 0% 100%, 6% 50%); }
.tech-node-shape.shape-dashed { border-style: dashed; border-width: 2px; border-color: rgba(11, 11, 12, 0.3); border-radius: 14px; background: rgba(255, 255, 255, 0.92); }
.tech-node-shape.shape-band { border-radius: 14px; box-shadow: inset 0 -8px 0 rgba(208, 38, 49, 0.18), 0 14px 30px rgba(7, 59, 76, 0.12); }
.tech-node-shape.shape-cyl { border-radius: 16px; position: relative; }
.tech-node-shape.shape-cyl::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 7px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(7, 59, 76, 0.18);
  background: rgba(255, 255, 255, 0.65);
}

.tech-node-shape.shape-hex .tech-node-inner,
.tech-node-shape.shape-trap .tech-node-inner,
.tech-node-shape.shape-diamond .tech-node-inner,
.tech-node-shape.shape-pill .tech-node-inner,
.tech-node-shape.shape-capsule .tech-node-inner,
.tech-node-shape.shape-circle .tech-node-inner,
.tech-node-shape.shape-notch .tech-node-inner,
.tech-node-shape.shape-band .tech-node-inner,
.tech-node-shape.shape-cyl .tech-node-inner {
  justify-content: center;
  align-items: center;
  padding: 16px 20px;
}

.tech-node-shape.shape-hex .tech-node-head,
.tech-node-shape.shape-trap .tech-node-head,
.tech-node-shape.shape-diamond .tech-node-head,
.tech-node-shape.shape-pill .tech-node-head,
.tech-node-shape.shape-capsule .tech-node-head,
.tech-node-shape.shape-circle .tech-node-head,
.tech-node-shape.shape-notch .tech-node-head,
.tech-node-shape.shape-band .tech-node-head,
.tech-node-shape.shape-cyl .tech-node-head {
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tech-node-shape.shape-hex .tech-node-titles,
.tech-node-shape.shape-trap .tech-node-titles,
.tech-node-shape.shape-diamond .tech-node-titles,
.tech-node-shape.shape-pill .tech-node-titles,
.tech-node-shape.shape-capsule .tech-node-titles,
.tech-node-shape.shape-circle .tech-node-titles,
.tech-node-shape.shape-notch .tech-node-titles,
.tech-node-shape.shape-band .tech-node-titles,
.tech-node-shape.shape-cyl .tech-node-titles {
  max-width: 100%;
  text-align: center;
}

.tech-node-shape.shape-hex .tech-node-title,
.tech-node-shape.shape-trap .tech-node-title,
.tech-node-shape.shape-diamond .tech-node-title,
.tech-node-shape.shape-pill .tech-node-title,
.tech-node-shape.shape-capsule .tech-node-title,
.tech-node-shape.shape-circle .tech-node-title,
.tech-node-shape.shape-notch .tech-node-title,
.tech-node-shape.shape-band .tech-node-title,
.tech-node-shape.shape-cyl .tech-node-title {
  font-size: 0.92rem;
  line-height: 1.08;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tech-node-shape.shape-hex .tech-node-subtitle,
.tech-node-shape.shape-trap .tech-node-subtitle,
.tech-node-shape.shape-diamond .tech-node-subtitle,
.tech-node-shape.shape-pill .tech-node-subtitle,
.tech-node-shape.shape-capsule .tech-node-subtitle,
.tech-node-shape.shape-circle .tech-node-subtitle,
.tech-node-shape.shape-notch .tech-node-subtitle,
.tech-node-shape.shape-band .tech-node-subtitle,
.tech-node-shape.shape-cyl .tech-node-subtitle {
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tech-node-shape.shape-hex .tech-node-icon,
.tech-node-shape.shape-trap .tech-node-icon,
.tech-node-shape.shape-diamond .tech-node-icon,
.tech-node-shape.shape-pill .tech-node-icon,
.tech-node-shape.shape-capsule .tech-node-icon,
.tech-node-shape.shape-circle .tech-node-icon,
.tech-node-shape.shape-notch .tech-node-icon,
.tech-node-shape.shape-band .tech-node-icon,
.tech-node-shape.shape-cyl .tech-node-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.tech-node-shape.shape-diamond .tech-node-inner {
  padding: 22px 34px;
}

.tech-node-shape.shape-circle .tech-node-inner {
  padding: 18px;
}

.tech-node-shape.shape-circle .tech-node-title {
  font-size: 0.82rem;
}

.tech-node-shape.shape-circle .tech-node-subtitle {
  font-size: 10px;
}

@media (max-width: 1100px) {
  .td-body {
    grid-template-columns: 0 1fr 260px;
  }
  .td-rail-left {
    display: none;
  }
}

.td-ai-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 12, 0.45);
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
}

.td-ai-modal {
  width: min(980px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(7, 59, 76, 0.16);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(11, 11, 12, 0.25);
}

.td-ai-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.td-ai-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.td-ai-modal-grid textarea {
  min-height: 88px;
}

.td-ai-checkgrid {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
}

.td-ai-checkgroup {
  display: grid;
  gap: 10px;
}

.td-ai-checkgroup > span {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(7, 59, 76, 0.92);
}

.td-ai-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
}

.td-ai-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  color: rgba(7, 59, 76, 0.9);
}

.td-ai-check input {
  margin-top: 2px;
}

.td-ai-preview-summary {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

* {
  box-sizing: border-box;
}

.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;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
}

.material-symbols-rounded,
.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" 0,
    "opsz" 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell,
.app-shell {
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.panel,
.card,
.fact-card,
.date-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.auth-card {
  width: min(460px, 100%);
  padding: 28px;
}

.auth-card label {
  margin-bottom: 6px;
}

.auth-card .button-row {
  margin-top: 26px;
}

.onboarding-card {
  width: min(560px, 100%);
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 18px;
}

.onboarding-step {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  display: grid;
  gap: 3px;
}

.brand-logo {
    width: 192px;
    max-width: 100%;
    height: auto;
    display: block;
  }

.sidebar .brand-logo {
    width: 160px;
  }

.auth-card .brand-logo,
.onboarding-card .brand-logo {
    width: 220px;
  }

.reset-link {
  margin-top: 8px;
  word-break: break-all;
}

.security-grid {
  align-items: start;
}

.security-card,
.security-form {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.security-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.security-reset {
  margin-top: 12px;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 22px;
  }

.brand h3 {
    margin: 0;
    line-height: 1.02;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--ink);
  }

.sidebar .brand h3 {
    color: #f8fbf8;
  }

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #9ee4da;
  color: #0c2019;
  font-weight: 850;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 18px;
  padding: 24px 18px 20px;
  color: #0b0b0c;
  background: #ffffff;
  border-right: 1px solid rgba(7, 59, 76, 0.08);
}

.sidebar .muted {
  color: rgba(7, 59, 76, 0.62);
  margin: 0;
}

.workspace-list {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.module-button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: rgba(248, 251, 248, 0.78);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  text-align: left;
  font-weight: 520;
  white-space: normal;
  line-height: 1.25;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.module-button strong,
.module-button span {
  display: block;
  overflow-wrap: anywhere;
}

.module-button:hover,
.module-button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-primary-nav {
  display: grid;
  gap: 8px;
  padding: 0;
}

.command-button {
  margin-top: auto;
}

.workspace-button {
  width: 100%;
  padding: 11px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  text-align: left;
}

.workspace-button strong,
.workspace-button span {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

.workspace-button small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.58);
}

.workspace-button.active,
.workspace-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.home-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 9px;
}

.home-button span {
  display: inline;
}

.home-button .dashboard-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4faf7;
}

.home-button .dashboard-icon svg {
  width: 18px;
  height: 18px;
}

.home-button .dashboard-icon.material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.workspace-hub {
  max-width: none;
  margin: 0;
  padding: 0;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
  background: #fbfdff;
  border: 1px solid rgba(7, 59, 76, 0.08);
  box-shadow: 0 28px 56px rgba(11, 11, 12, 0.06);
  overflow: hidden;
}

.workspace-shell.sidebar-collapsed {
  grid-template-columns: 96px minmax(0, 1fr);
}

.workspace-sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  min-height: 100%;
  padding: 24px 18px 20px;
  background: #ffffff;
  border-right: 1px solid rgba(7, 59, 76, 0.08);
}

.sidebar-burger,
.sidebar-close {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(7, 59, 76, 0.1);
  border-radius: 14px;
  background: #ffffff;
  color: #1f4fd5;
  box-shadow: 0 12px 24px rgba(75, 123, 174, 0.08);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(11, 11, 12, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 70;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.workspace-sidebar.collapsed {
  gap: 16px;
  padding: 24px 12px 18px;
}

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

.workspace-brand {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.workspace-brand .brand {
  justify-content: flex-start;
}

.workspace-brand .brand-logo {
  width: 160px;
  max-width: 100%;
}

.workspace-sidebar.collapsed .workspace-brand .brand-logo {
  width: 48px;
}

.workspace-sidebar-nav {
  display: grid;
  align-content: start;
  gap: 8px;
  flex: 0 0 auto;
}

.workspace-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 8px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #0b0b0c;
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    color var(--transition-base),
    transform var(--transition-fast);
}

.workspace-nav-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.workspace-nav-copy strong {
  font-size: 0.95rem;
  font-weight: 640;
  line-height: 1.15;
}

.workspace-nav-copy small {
  color: rgba(7, 59, 76, 0.56);
  font-size: 0.76rem;
  line-height: 1.3;
}

.workspace-nav-item:hover {
  background: #f5f9ff;
  border-color: rgba(75, 123, 174, 0.12);
  box-shadow: 0 12px 20px rgba(75, 123, 174, 0.07);
  transform: translateY(-1px);
}

.workspace-nav-item.active,
.workspace-nav-item.active-soft {
  background: linear-gradient(180deg, #eef4ff, #f6f9ff);
  border-color: rgba(75, 123, 174, 0.16);
  box-shadow: 0 12px 20px rgba(75, 123, 174, 0.09);
  color: #2859d4;
}

.workspace-nav-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  color: #365ef7;
  box-shadow: 0 12px 24px rgba(54, 94, 247, 0.12);
}

.workspace-nav-item svg,
.workspace-pop-icon svg,
.workspace-metric-icon svg,
.workspace-feed-icon svg,
.workspace-list-badge svg,
.workspace-action svg,
.workspace-mini-action svg {
  stroke-width: 2.15;
}

.workspace-nav-item.active .workspace-nav-icon,
.workspace-nav-item.active-soft .workspace-nav-icon {
  background: linear-gradient(135deg, #ffffff, #e6efff);
  color: #2751d8;
  box-shadow: 0 14px 28px rgba(54, 94, 247, 0.18);
}

.workspace-sidebar.collapsed .sidebar-primary-nav,
.workspace-sidebar.collapsed .workflow-nav,
.workspace-sidebar.collapsed .workspace-sidebar-footer {
  justify-items: center;
}

.workspace-sidebar.collapsed .workspace-nav-item {
  width: 56px;
  min-height: 56px;
  justify-content: center;
  padding: 0;
  gap: 0;
}

.workspace-sidebar.collapsed .workspace-nav-copy {
  display: none;
}

.workspace-sidebar.collapsed .workspace-nav-icon {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

.workspace-sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.workspace-sidebar-support {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 18px 36px rgba(75, 123, 174, 0.08);
}

.workspace-sidebar.collapsed .workspace-sidebar-support {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  justify-items: center;
}

.workspace-nav-compact-action {
  justify-self: center;
}

.workspace-sidebar-support strong {
  font-size: 1rem;
}

.workspace-sidebar-support p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(7, 59, 76, 0.68);
  line-height: 1.55;
}

.workspace-main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(75, 123, 174, 0.08), transparent 18%),
    linear-gradient(180deg, #fbfdff, #f7faff);
}

.workspace-topbar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(7, 59, 76, 0.08);
  backdrop-filter: blur(18px);
}

.workspace-topbar-leading,
.topbar-leading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.workspace-topbar-leading .topbar-main,
.topbar-leading .topbar-main {
  min-width: 0;
  flex: 1 1 auto;
}

.workspace-org-pill,
.workspace-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: #ffffff;
  color: #0b0b0c;
  box-shadow: 0 16px 32px rgba(75, 123, 174, 0.08);
}

.workspace-org-pill {
  min-width: 0;
  max-width: min(100%, 360px);
  justify-content: flex-start;
}

.workspace-org-pill span {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-weight: 480;
}

.workspace-org-pill span,
.workspace-profile-pill span,
.workspace-profile-pill strong,
.workspace-profile-pill small {
  display: block;
}

.workspace-profile-pill {
  justify-self: end;
}

.workspace-profile-pill strong {
  font-size: 0.98rem;
  line-height: 1.15;
  font-weight: 600;
}

.workspace-profile-pill small {
  margin-top: 2px;
  font-size: 0.76rem;
  color: rgba(7, 59, 76, 0.54);
}

.workspace-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 20px;
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(75, 123, 174, 0.08);
}

.workspace-search input {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.98rem;
}

.workspace-search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 34px;
  padding: 0 10px;
  border-radius: 11px;
  background: #f2f6fd;
  color: rgba(7, 59, 76, 0.6);
  font-size: 0.76rem;
  font-weight: 650;
}

.workspace-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.workspace-mini-action {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  background: #ffffff;
  color: #1d2f55;
  box-shadow: 0 12px 24px rgba(75, 123, 174, 0.08);
}

.workspace-mini-badge {
  position: absolute;
  top: -3px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #365ef7;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 680;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(54, 94, 247, 0.28);
}

.workspace-pop-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 28px rgba(75, 123, 174, 0.14);
}

.workspace-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(75, 123, 174, 0.14);
  box-shadow: 0 10px 18px rgba(75, 123, 174, 0.12);
}

.workspace-avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #4b7bae, #073b4c);
  color: #ffffff;
  font-weight: 680;
}

.workspace-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 24px;
  padding: 30px 28px 32px;
  align-items: start;
}

.workspace-dashboard-main,
.workspace-dashboard-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 22px;
  min-width: 0;
}

.workspace-hero,
.workspace-table-card,
.workspace-side-card,
.workspace-list-row {
  min-width: 0;
}

.workspace-dashboard-side {
  position: sticky;
  top: 20px;
}

.workspace-hero,
.workspace-table-card,
.workspace-side-card {
  border-radius: 24px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition:
    box-shadow var(--transition-slow),
    border-color var(--transition-base),
    transform var(--transition-fast);
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  padding: 30px 28px 28px;
}

.workspace-hero-copy {
  display: grid;
  gap: 10px;
}

.workspace-hero-copy .muted {
  margin-bottom: 0;
}

.workspace-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 660;
}

.workspace-hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.workspace-cta {
  min-height: 52px;
  padding-inline: 22px;
  border-radius: 16px;
  font-weight: 700;
}

.workspace-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.workspace-metric-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 150px;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition:
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-fast);
}

.workspace-metric-card:hover,
.workspace-table-card:hover,
.workspace-side-card:hover,
.workspace-hero:hover {
  border-color: rgba(7, 59, 76, 0.11);
  box-shadow: var(--shadow-card-hover);
}

.workspace-metric-icon,
.workspace-feed-icon,
.workspace-list-badge {
  display: grid;
  place-items: center;
}

.workspace-metric-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  box-shadow: 0 16px 28px rgba(75, 123, 174, 0.16);
}

.workspace-feed-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  box-shadow: 0 12px 20px rgba(75, 123, 174, 0.12);
}

.workspace-list-badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(75, 123, 174, 0.14);
}

.tone-violet {
  background: linear-gradient(135deg, #6f67ff, #8b7bff);
  color: #ffffff;
}

.tone-teal {
  background: linear-gradient(135deg, #32c5c7, #1eb1bd);
  color: #ffffff;
}

.tone-emerald {
  background: linear-gradient(135deg, #37c79e, #24a77f);
  color: #ffffff;
}

.tone-blue {
  background: linear-gradient(135deg, #5a98ff, #3c72ff);
  color: #ffffff;
}

.tone-red {
  background: linear-gradient(135deg, #ff9b84, #ff6f61);
  color: #ffffff;
}

.tone-ochre {
  background: linear-gradient(135deg, #ffcf7a, #ffac4d);
  color: #ffffff;
}

.tone-slate {
  background: linear-gradient(135deg, #194d75, #0d395c);
  color: #ffffff;
}

.workspace-metric-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2.65rem;
  line-height: 1;
  color: #0b0b0c;
}

.workspace-metric-card span {
  display: block;
  font-size: 1rem;
  font-weight: 570;
  color: #1d2f55;
}

.workspace-metric-card small {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  color: rgba(7, 59, 76, 0.62);
}

.workspace-table-card,
.workspace-side-card {
  padding: 24px;
}

.workspace-table-head,
.workspace-side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.workspace-table-head h2,
.workspace-side-head h3 {
  margin-bottom: 6px;
  font-weight: 620;
}

.workspace-table-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-table-filters select {
  min-width: 210px;
  min-height: 46px;
  border-radius: 14px;
  border-color: rgba(7, 59, 76, 0.12);
  background: #ffffff;
}

.workspace-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.workspace-list-columns {
  display: grid;
  grid-template-columns: minmax(270px, 1.8fr) 138px 122px 100px minmax(132px, 1fr) minmax(92px, 0.7fr) auto;
  gap: 18px;
  padding: 0 12px 6px;
  color: rgba(7, 59, 76, 0.56);
  font-size: 0.8rem;
  font-weight: 560;
  letter-spacing: 0.01em;
}

.workspace-list-row {
  display: grid;
  grid-template-columns: minmax(270px, 1.8fr) 138px 122px 100px minmax(132px, 1fr) minmax(92px, 0.7fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 18px 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  background: linear-gradient(180deg, #ffffff, #fcfdff);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.workspace-list-row:hover,
.workspace-list-row.expanded {
  transform: translateY(-1px);
  border-color: rgba(75, 123, 174, 0.18);
  box-shadow: 0 18px 30px rgba(75, 123, 174, 0.08);
}

.workspace-list-row.archived {
  opacity: 0.82;
}

.workspace-list-primary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.workspace-list-copy {
  min-width: 0;
}

.workspace-list-copy small,
.workspace-list-deadline small,
.workspace-list-progress small,
.workspace-list-team small {
  display: block;
  margin-top: 4px;
  color: rgba(7, 59, 76, 0.62);
  line-height: 1.35;
}

.workspace-title-field {
  width: 100%;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.04rem;
  font-weight: 610;
  line-height: 1.2;
  color: #0b0b0c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-title-field:focus {
  outline: none;
  box-shadow: inset 0 -1px 0 rgba(54, 94, 247, 0.44);
}

.workspace-stage-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 540;
  border: 1px solid transparent;
}

.workspace-stage-chip.tone-violet {
  background: rgba(111, 103, 255, 0.14);
  color: #5d59ff;
}

.workspace-stage-chip.tone-teal {
  background: rgba(50, 197, 199, 0.14);
  color: #159ba6;
}

.workspace-stage-chip.tone-emerald {
  background: rgba(55, 199, 158, 0.14);
  color: #198468;
}

.workspace-stage-chip.tone-blue {
  background: rgba(60, 114, 255, 0.12);
  color: #365ef7;
}

.workspace-stage-chip.tone-red {
  background: rgba(255, 111, 97, 0.14);
  color: #df5447;
}

.workspace-stage-chip.tone-ochre {
  background: rgba(255, 172, 77, 0.18);
  color: #dd8b28;
}

.workspace-stage-chip.tone-slate {
  background: rgba(25, 77, 117, 0.14);
  color: #194d75;
}

.workspace-list-deadline strong,
.workspace-list-progress strong,
.workspace-list-team strong {
  display: block;
  color: #0b0b0c;
  font-weight: 620;
}

.workspace-list-progress .progress {
  margin-top: 8px;
}

.workspace-list-readiness .score-ring.small {
  transform: scale(0.88);
  transform-origin: left center;
}

.workspace-list-team strong {
  font-size: 1.16rem;
}

.workspace-list-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.workspace-action {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 14px;
  background: #ffffff;
  display: inline-grid;
  place-items: center;
  color: #194d75;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(75, 123, 174, 0.08);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.workspace-action:hover {
  transform: translateY(-1px);
  border-color: rgba(54, 94, 247, 0.16);
  box-shadow: 0 14px 24px rgba(75, 123, 174, 0.12);
}

.workspace-action svg,
.workspace-delete-inline svg {
  margin: auto;
}

.workspace-list-create {
  grid-template-columns: auto minmax(0, 1fr);
  justify-content: start;
  border-style: dashed;
  background: linear-gradient(180deg, #fbfdff, #f7fbff);
}

.workspace-create-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  color: #365ef7;
  background: linear-gradient(180deg, #eef4ff, #f8fbff);
  box-shadow: 0 18px 32px rgba(54, 94, 247, 0.12);
  justify-self: center;
}

.workspace-side-card {
  min-height: 0;
}

.workspace-side-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #365ef7;
  font-size: 0.9rem;
  font-weight: 600;
}

.workspace-activity-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.workspace-feed-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(7, 59, 76, 0.08);
}

.workspace-feed-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.workspace-feed-item strong,
.workspace-feed-item p,
.workspace-feed-item small {
  display: block;
}

.workspace-feed-item strong {
  font-weight: 590;
  font-size: 1rem;
  line-height: 1.28;
}

.workspace-feed-item p {
  margin: 4px 0 0;
  color: rgba(7, 59, 76, 0.68);
  font-size: 0.96rem;
  line-height: 1.48;
}

.workspace-feed-item small {
  color: rgba(7, 59, 76, 0.52);
  white-space: nowrap;
}

.workspace-date-pill {
  width: 56px;
  min-height: 66px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 8px 0;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(111, 103, 255, 0.12), rgba(111, 103, 255, 0.04));
  color: #5d59ff;
}

.workspace-date-pill span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.workspace-date-pill strong {
  font-size: 1.56rem;
  line-height: 1;
  font-weight: 630;
}

.workspace-hub-empty {
  margin-top: 0;
}

.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
}

.icon-only.danger {
  color: #af2f2f;
  border-color: rgba(175, 47, 47, 0.15);
  background: rgba(175, 47, 47, 0.04);
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
  transform: translateY(-2px);
}

.icon-only .dashboard-icon {
  width: 22px;
  height: 22px;
}

.workspace-hub-card:hover .workspace-delete,
.workspace-hub-card.expanded .workspace-delete {
  opacity: 1;
  transform: translateY(0);
}

.workspace-delete-inline {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(183, 42, 42, 0.88);
  opacity: 0.9;
  transition: opacity 160ms ease, transform 160ms ease;
}

.workspace-delete-inline .dashboard-icon {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  background: transparent;
  color: currentColor;
}

.workspace-delete-inline .dashboard-icon.material-symbols-outlined {
  font-size: 16px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
}

.workspace-hub-card:hover .workspace-delete-inline,
.workspace-hub-card.expanded .workspace-delete-inline {
  opacity: 1;
}

.workspace-hub-card.archived {
  opacity: 0.82;
}

.question-overview-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.question-overview-card {
  border: 1px solid rgba(7, 59, 76, 0.16);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.question-overview-card.active {
  border-color: rgba(7, 59, 76, 0.5);
  background: rgba(7, 59, 76, 0.04);
}

.question-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.assessor-card {
  border: 1px solid rgba(7, 59, 76, 0.14);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.assessor-rec-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.assessor-rec-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  border: 1px solid rgba(7, 59, 76, 0.12);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.segmented.compact button {
  padding: 5px 9px;
  font-size: 0.82rem;
}

@media (max-width: 1100px) {
  .question-detail-grid {
    grid-template-columns: 1fr;
  }
}

.workspace-card-progress .score-ring {
  justify-self: center;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 17, 0.48);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 40;
}

.modal-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid rgba(28, 40, 33, 0.15);
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(16, 22, 19, 0.24);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.modal-head strong {
  font-size: 1.1rem;
}

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

.ai-preflight-modal {
  width: min(760px, 100%);
  gap: 18px;
}

.ai-preflight-head p {
  margin-top: 6px;
}

.ai-preflight-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ai-preflight-summary-card {
  padding: 14px;
  border: 1px solid rgba(28, 40, 33, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfb, #ffffff);
  box-shadow: 0 8px 20px rgba(24, 42, 37, 0.04);
}

.ai-preflight-summary-card span {
  display: block;
  margin-bottom: 8px;
  color: rgba(40, 48, 44, 0.7);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ai-preflight-summary-card ul,
.ai-preflight-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-preflight-summary-card li {
  position: relative;
  padding-left: 14px;
  color: rgba(40, 48, 44, 0.88);
  line-height: 1.5;
}

.ai-preflight-summary-card li + li {
  margin-top: 6px;
}

.ai-preflight-summary-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 92, 113, 0.45);
}

.ai-preflight-issues {
  display: grid;
  gap: 10px;
}

.ai-preflight-list {
  display: grid;
  gap: 10px;
}

.ai-preflight-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(28, 40, 33, 0.1);
  background: #fff;
}

.ai-preflight-item.required {
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.9), #fff);
}

.ai-preflight-item.recommended {
  border-color: rgba(15, 118, 110, 0.16);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.95), #fff);
}

.ai-preflight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 40, 33, 0.08);
  color: #0f5c71;
}

.ai-preflight-item.required .ai-preflight-icon {
  color: #c2410c;
}

.ai-preflight-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.ai-preflight-item p {
  margin: 0 0 6px;
  color: rgba(40, 48, 44, 0.86);
  line-height: 1.5;
}

.ai-preflight-item small {
  color: rgba(40, 48, 44, 0.68);
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.workspace-launcher {
  margin-bottom: 18px;
}

.workspace-launcher .section-top {
  align-items: flex-start;
}

.workspace-launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.workspace-launcher-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  text-align: left;
  color: inherit;
  background: linear-gradient(180deg, #fbfcfb, #f5faf7);
  border: 1px solid rgba(28, 40, 33, 0.12);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(18, 24, 20, 0.05);
}

.workspace-launcher-card strong {
  font-size: 1rem;
  line-height: 1.2;
}

.workspace-launcher-card span,
.workspace-launcher-card small {
  color: rgba(40, 48, 44, 0.72);
}

.workspace-launcher-card.active {
  border-color: rgba(24, 92, 67, 0.35);
  box-shadow: 0 8px 20px rgba(24, 92, 67, 0.08);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.competition-subtitle {
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 620;
}

.panel {
  padding: 20px;
  margin-bottom: 16px;
}

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

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

.inline-action-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.settings-step .grid,
.idea-step .grid,
.partner-pipeline .grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.link-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 14px;
  align-items: end;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfb, #ffffff);
  box-shadow: 0 8px 24px rgba(24, 42, 37, 0.04);
}

.competition-step {
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.competition-import-hero {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 42%),
    linear-gradient(180deg, #ffffff, #f4faf7);
  box-shadow: 0 18px 46px rgba(24, 42, 37, 0.08);
}

.competition-import-hero h2 {
  max-width: 740px;
  margin: 7px 0 8px;
  font-size: clamp(2rem, 1.4rem + 2vw, 3.6rem);
  line-height: 1;
}

.competition-import-hero .muted {
  max-width: 760px;
  font-size: 1.02rem;
  line-height: 1.62;
}

.competition-import-hero .link-import-row {
  margin: 0;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 34px rgba(24, 42, 37, 0.07);
  /* In the hero, keep the URL field full width and place actions on their own row. */
  grid-template-columns: 1fr;
  align-items: start;
}

.competition-import-hero .link-import-row .button-row {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.competition-import-hero .link-import-row .button-row .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Some upstream styles (and/or browser defaults) can collapse button padding.
   Lock the hero CTA buttons to a predictable width/shape. */
.competition-import-hero .link-import-row .button-row .button.icon-button {
  padding: 0 16px !important;
  min-width: 170px;
}

.competition-source-drawer {
  margin-top: 12px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
}

.competition-source-drawer summary {
  min-height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  color: #385247;
  font-size: 0.9rem;
  font-weight: 560;
  cursor: pointer;
}

.link-import-row.compact {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0 0 16px 16px;
  box-shadow: none;
  background: #fbfdfb;
}

.input-with-icon {
  display: grid;
  gap: 8px;
}

.input-with-icon > span {
  display: block;
  font-size: 0.88rem;
  font-weight: 560;
  color: #12221a;
}

.hidden-file-input {
  display: none;
}

.first-step h2 {
  max-width: 880px;
  margin: 7px 0 8px;
  font-size: clamp(1.65rem, 1.2rem + 1.4vw, 2.6rem);
  line-height: 1.08;
}

.first-step .competition-import-hero h2 {
  max-width: 740px;
  font-size: clamp(2rem, 1.4rem + 2vw, 3.6rem);
  line-height: 1;
}

label {
  display: grid;
  gap: 7px;
  color: #51605a;
  font-size: 0.88rem;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  color: #111111;
  background: #fbfdfb;
  border: 1px solid #cbd5cb;
  border-radius: 8px;
  font-weight: 400;
}

:where(button, [role="button"], a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

:where(input, select, textarea):focus-visible {
  outline-offset: 0;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(7, 59, 76, 0.18);
}

input::placeholder,
textarea::placeholder {
  color: #a7b2ac;
  font-weight: 400;
  opacity: 1;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: #a7b2ac;
  font-weight: 400;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
  color: #a7b2ac;
  font-weight: 400;
  opacity: 1;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: #a7b2ac;
  font-weight: 400;
}

input,
select {
  height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  line-height: 1.45;
  resize: vertical;
}

input,
select,
textarea {
  font-size: 0.95rem;
}

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

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding-inline: 16px;
}

.icon-button .dashboard-icon {
  width: 24px;
  height: 24px;
  background: transparent;
}

.button.primary.icon-button .dashboard-icon {
  color: #fff;
}

.button.primary.icon-button .dashboard-icon.material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.icon-button .dashboard-icon.material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
}

.button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), var(--shadow-inline);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.button:hover {
  border-color: rgba(7, 59, 76, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 22px rgba(31, 46, 38, 0.07);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-inline);
}

.button.primary {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 10px 22px rgba(7, 59, 76, 0.16);
}

.button.primary:hover {
  background: #0b4559;
  border-color: #0b4559;
  box-shadow: 0 14px 24px rgba(7, 59, 76, 0.19);
}

.button.warning {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral);
  box-shadow: 0 10px 22px rgba(208, 38, 49, 0.15);
}

.button.warning:hover {
  background: #ba2430;
  border-color: #ba2430;
  box-shadow: 0 14px 24px rgba(208, 38, 49, 0.18);
}

.button.dark {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.button.dark:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.inline-title {
  height: 38px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  font-size: 1rem;
  font-weight: 850;
}

.score-input {
  width: 74px;
  height: 32px;
  text-align: center;
  font-weight: 850;
}

.compact-textarea {
  min-height: 74px;
  padding: 9px;
  font-size: 0.9rem;
}

.idea-field {
  display: grid;
  gap: 6px;
}

.idea-field > span {
  font-size: 0.84rem;
  font-weight: 820;
  color: #23322a;
}

.settings-textareas textarea {
  min-height: 260px;
}

.nested-panel {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.nested-panel + .nested-panel {
  margin-top: 18px;
}

.mini-save-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.crm-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.module-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.module-page-head h2 {
  margin: 0 0 6px;
  font-size: 2rem;
  font-weight: 620;
  color: #0f1d3a;
}

.module-page-head .muted {
  margin: 0;
}

.module-metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.module-stat-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 12px 26px rgba(75, 123, 174, 0.07);
}

.module-stat-card strong {
  display: block;
  font-size: 1.62rem;
  line-height: 1;
  font-weight: 620;
  color: #0f1d3a;
}

.module-stat-card span {
  display: block;
  margin-top: 6px;
  color: rgba(7, 59, 76, 0.66);
  font-size: 0.92rem;
  font-weight: 520;
}

.module-stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(75, 123, 174, 0.14);
}

.module-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.module-tab-pill {
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  color: rgba(7, 59, 76, 0.72);
  font-size: 0.9rem;
  font-weight: 540;
  transition: all 140ms ease;
}

.module-tab-pill.active {
  background: rgba(111, 103, 255, 0.1);
  color: #5d59ff;
  border-color: rgba(111, 103, 255, 0.16);
}

.crm-page {
  display: grid;
  gap: 16px;
}

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

.crm-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 2px;
}

.crm-toolbar input {
  min-width: 320px;
  max-width: 100%;
  flex: 1 1 480px;
}

.crm-toolbar-modern {
  padding: 12px;
  border: 1px solid #dce8e4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
}

.crm-toolbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(520px, 100%);
  flex: 1 1 520px;
  background: #fff;
  border: 1px solid #d8e7e1;
  border-radius: 10px;
  padding: 0 12px;
  min-height: 42px;
}

.crm-toolbar-search .material-symbols-rounded {
  font-size: 19px;
  color: #607a72;
}

.crm-toolbar-search input {
  border: 0;
  background: transparent;
  min-height: 40px;
  min-width: 0;
  width: 100%;
}

.crm-toolbar-search input:focus-visible {
  outline: none;
  box-shadow: none;
  border: 0;
}

.crm-toolbar-search:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 8px;
}

.crm-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-toolbar-filters select {
  min-height: 40px;
}

.crm-page-head h2 {
  margin: 0 0 4px;
}

.crm-discovery-card {
  border: 1px solid #dce8e4;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.crm-tool-card {
  display: grid;
  gap: 14px;
}

.crm-tool-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.crm-tool-card-head h3 {
  margin: 4px 0 6px;
}

.crm-tool-card-head .muted {
  margin: 0;
  max-width: 680px;
}

.crm-discovery-intent {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin: 10px 0;
}

.crm-discovery-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.crm-discovery-secondary {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.crm-inline-helper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid #dce8e4;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-inline);
}

.crm-inline-helper strong {
  display: block;
  margin: 4px 0 6px;
  font-size: 1rem;
  font-weight: 620;
}

.crm-inline-helper .muted {
  margin: 0;
  max-width: 680px;
}

.crm-company-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crm-company-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 59, 76, 0.1);
  color: #073b4c;
  font-weight: 700;
}

.crm-company-avatar.large {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 1rem;
}

.crm-company-cell small {
  display: block;
  color: #0f6f4b;
  font-weight: 700;
}

.crm-confidence-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(7, 59, 76, 0.09);
  font-weight: 700;
  color: #174741;
}

.crm-empty-state,
.crm-loading-state {
  margin-bottom: 10px;
}

.crm-research-modal {
  width: min(900px, 100%);
  padding: 24px;
  gap: 18px;
  border-radius: 20px;
}

.crm-research-modal-head p {
  margin: 8px 0 0;
  max-width: 62ch;
}

.crm-research-modal-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 14px;
}

.crm-research-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dfe9e6;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
}

.crm-research-hero strong,
.crm-research-hero small {
  display: block;
}

.crm-research-hero strong {
  font-size: 1.05rem;
  font-weight: 620;
}

.crm-research-hero small {
  margin-top: 4px;
  color: var(--muted);
}

.crm-research-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.crm-research-loading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #dfe9e6;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
}

.crm-research-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(7, 59, 76, 0.12);
  border-top-color: #0d7366;
  animation: crm-spin 0.9s linear infinite;
}

@keyframes crm-spin {
  to {
    transform: rotate(360deg);
  }
}

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

.crm-research-body {
  margin: 0;
  color: #334155;
  line-height: 1.6;
}

.crm-research-facts {
  display: grid;
  gap: 12px;
}

.crm-research-facts span,
.crm-research-facts strong {
  display: block;
}

.crm-research-facts span {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.crm-research-facts strong {
  font-size: 0.96rem;
  font-weight: 580;
  line-height: 1.45;
}

.crm-research-links,
.crm-research-checklist {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.crm-research-links a {
  overflow-wrap: anywhere;
}

.crm-data-table table {
  table-layout: fixed;
  min-width: max(100%, 1220px);
  border-collapse: separate;
  border-spacing: 0;
}

.crm-data-table {
  min-width: 0;
}

.crm-data-table th,
.crm-data-table td {
  vertical-align: top;
  position: relative;
  overflow: visible;
  text-overflow: ellipsis;
  padding: 5px 8px;
  line-height: 1.2;
  font-size: 0.82rem;
}

.crm-data-table tbody tr:nth-child(odd) td {
  background: rgba(7, 59, 76, 0.03);
}

.crm-data-table tbody tr:hover td {
  background: rgba(46, 125, 106, 0.08);
}

.crm-data-table tbody tr.is-selected td {
  background: rgba(7, 59, 76, 0.09);
}

.crm-data-table tbody tr {
  transition: background 0.16s ease;
}

.data-surface-toolbar,
.tanstack-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  position: sticky;
  left: 0;
  z-index: 2;
}

.data-surface-toolbar-primary,
.data-surface-toolbar-secondary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.data-surface-toolbar-primary {
  flex: 1;
  min-width: min(540px, 100%);
}

.data-surface-toolbar-secondary {
  justify-content: flex-end;
  margin-left: auto;
}

.crm-data-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--teal);
}

.data-surface-search,
.tanstack-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: min(360px, 100%);
  max-width: 460px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  flex: 1;
}

.data-surface-search input,
.tanstack-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  min-height: 24px;
  color: var(--ink);
}

.data-surface-filters {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.data-surface-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.data-surface-filter span {
  font-size: 0.8rem;
  color: var(--muted);
}

.data-surface-filter select {
  min-height: 38px;
  border-radius: 12px;
  min-width: 150px;
  background: #fff;
}

.data-surface-meta,
.tanstack-toolbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.data-surface-meta span,
.tanstack-toolbar-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(7, 59, 76, 0.05);
}

.data-surface-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.data-surface-actions .button,
.data-surface-bulkbar-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.data-surface-bulkbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px;
  margin-top: 12px;
  border: 1px solid rgba(7, 59, 76, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfc 0%, #f3f8f6 100%);
}

.data-surface-bulkbar-copy {
  display: grid;
  gap: 4px;
}

.data-surface-bulkbar-copy small {
  color: var(--muted);
}

.data-surface-bulkbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tanstack-menu {
  position: relative;
}

.tanstack-menu summary {
  list-style: none;
}

.tanstack-menu summary::-webkit-details-marker {
  display: none;
}

.tanstack-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(420px, 82vw);
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(7, 59, 76, 0.16);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(11, 11, 12, 0.16);
  color: var(--ink);
}

.tanstack-menu-panel > strong {
  display: block;
  margin-bottom: 8px;
}

.tanstack-column-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid rgba(7, 59, 76, 0.08);
}

.tanstack-column-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 400;
}

.tanstack-column-row label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tanstack-column-row div {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tanstack-column-row button {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(7, 59, 76, 0.14);
  border-radius: 7px;
  background: rgba(7, 59, 76, 0.04);
  color: var(--teal);
  font-weight: 700;
  cursor: pointer;
}

.tanstack-header-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: stretch;
  min-height: 34px;
}

.tanstack-select-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.tech-diagram-frame {
  height: min(74vh, 860px);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.tech-diagram-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.table-sort {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0 6px 0 0;
  font-weight: 600;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.table-sort.sortable {
  cursor: pointer;
}

.sort-indicator {
  color: var(--teal);
  min-width: 10px;
  font-size: 0.8rem;
}

.column-resizer {
  position: absolute;
  right: -6px;
  top: 4px;
  bottom: 4px;
  width: 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: col-resize;
  z-index: 3;
}

.column-resizer::after {
  content: "";
  position: absolute;
  inset: 1px 4px;
  border-radius: 999px;
  background: rgba(7, 59, 76, 0.18);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.crm-data-table th:hover .column-resizer::after,
.column-resizer.is-resizing::after {
  opacity: 1;
  background: var(--teal);
}

.tanstack-filter-row th {
  background: rgba(245, 248, 246, 0.95);
  padding-top: 6px;
  padding-bottom: 8px;
}

.tanstack-filter-row input {
  width: 100%;
  min-height: 27px;
  border: 1px solid rgba(7, 59, 76, 0.16);
  border-radius: 8px;
  background: #fff;
  padding: 4px 7px;
  font-size: 0.76rem;
  font-weight: 400;
}

.tanstack-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  position: sticky;
  left: 0;
  z-index: 2;
  color: var(--muted);
  font-size: 0.86rem;
}

.tanstack-pagination label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}

.tanstack-pagination select {
  min-height: 32px;
  border-radius: 8px;
  padding: 4px 8px;
}

.question-data-toolbar,
.risk-data-toolbar,
.output-data-toolbar,
.team-data-toolbar {
  margin: 12px 0;
}

.question-nav-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.question-nav-select input,
.team-directory-table input[type="checkbox"],
.risk-table input[type="checkbox"],
.output-summary-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--teal);
}

.question-select-all {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}

.crm-action-menu {
  position: relative;
}

.crm-action-menu summary {
  list-style: none;
}

.crm-action-menu summary::-webkit-details-marker {
  display: none;
}

.crm-action-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 220px;
  padding: 10px;
  border: 1px solid rgba(7, 59, 76, 0.14);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(11, 11, 12, 0.16);
  display: grid;
  gap: 8px;
}

.crm-action-menu-panel .button {
  justify-content: flex-start;
}

.crm-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.crm-command-centre .crm-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.crm-finder-modern {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 16px rgba(16, 42, 37, 0.05);
  display: grid;
  gap: 8px;
}

.crm-finder-modern h3 {
  margin: 2px 0 0;
  font-size: 1.06rem;
}

.crm-finder-modern .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.crm-finder-results-modal {
  width: min(940px, 100%);
  gap: 16px;
}

.crm-finder-results-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.crm-finder-results-heading .eyebrow,
.crm-finder-results-heading strong,
.crm-finder-results-heading p {
  display: block;
}

.crm-finder-results-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 0.7fr));
  gap: 10px;
}

.crm-finder-results-pill {
  padding: 12px 14px;
  border: 1px solid rgba(28, 40, 33, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfb, #ffffff);
}

.crm-finder-results-pill span,
.crm-finder-results-pill strong {
  display: block;
}

.crm-finder-results-pill span {
  margin-bottom: 4px;
  color: rgba(40, 48, 44, 0.68);
  font-size: 0.78rem;
  font-weight: 600;
}

.crm-finder-results-pill strong {
  font-size: 0.95rem;
  line-height: 1.45;
}

.crm-finder-results-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-finder-results-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 680px);
  overflow: auto;
  padding-right: 4px;
}

.crm-finder-result-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(28, 40, 33, 0.1);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
}

.crm-finder-result-card:hover,
.crm-finder-result-card.selected {
  border-color: rgba(15, 92, 113, 0.22);
  box-shadow: 0 12px 26px rgba(24, 42, 37, 0.08);
}

.crm-finder-result-card.selected {
  background: linear-gradient(180deg, rgba(240, 250, 247, 0.96), #ffffff);
}

.crm-finder-result-check {
  padding-top: 2px;
}

.crm-finder-result-check input {
  width: 18px;
  height: 18px;
}

.crm-finder-result-main {
  display: grid;
  gap: 8px;
}

.crm-finder-result-headline {
  display: grid;
  gap: 4px;
}

.crm-finder-result-headline strong {
  font-size: 1rem;
}

.crm-finder-result-headline span,
.crm-finder-result-contacts small {
  color: rgba(40, 48, 44, 0.7);
}

.crm-finder-result-main p {
  margin: 0;
  color: rgba(40, 48, 44, 0.88);
  line-height: 1.55;
}

.crm-finder-result-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.crm-company-insight-modal {
  width: min(860px, 100%);
  gap: 16px;
}

.crm-company-insight-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.7fr));
  gap: 10px;
}

.crm-company-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.crm-finder-grid textarea {
  min-height: 84px;
  resize: vertical;
}

.crm-left-nav {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf9;
  display: grid;
  gap: 8px;
  align-content: start;
}

.crm-main {
  display: grid;
  gap: 12px;
  align-content: start;
}

.crm-insight-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf9;
  display: grid;
  gap: 12px;
  align-content: start;
  grid-column: 1;
  position: sticky;
  top: 14px;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.crm-toolbar .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crm-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.crm-tabs-shell {
  display: grid;
  gap: 14px;
}

.shad-tabs-list {
  display: inline-flex;
}

.shad-tabs-trigger {
  cursor: pointer;
  border: 1px solid transparent;
}

.shad-tabs-trigger[data-state="active"] {
  background: #e4f3ee;
  border-color: #95c6b7;
  color: #0f5f56;
}

.shad-tabs-trigger[data-state="active"] small {
  background: var(--primary);
  color: #fff;
}

.shad-tabs-content {
  margin-top: 0;
}

.crm-tabs-modern {
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #dce8e4;
  background: #f8fbfa;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.crm-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5faf8;
  color: #33534c;
  font-weight: 600;
}

.crm-tab-modern {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.crm-tab-modern .material-symbols-rounded {
  font-size: 18px;
}

.crm-tab-modern small {
  margin-left: 4px;
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e7f1ed;
  color: #3f5d54;
  font-size: 0.72rem;
  font-weight: 700;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-shadow: 0 4px 10px rgba(18, 40, 35, 0.06);
}

.icon-button .material-symbols-rounded {
  font-size: 21px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transform: translateY(-0.5px);
}

.icon-button.active,
.icon-button:hover {
  border-color: #95c6b7;
  background: #eef8f4;
}

.icon-button.add {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.icon-cluster {
  gap: 8px;
}

.crm-toolbar .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.crm-toolbar .icon-button .inline-icon {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.finder-accordion {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 6px 8px;
}

.finder-accordion summary {
  cursor: pointer;
  font-weight: 650;
}

.finder-accordion-body {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
}

.finder-accordion-body select[multiple] {
  min-height: 64px;
  padding: 4px;
  font-size: 0.8rem;
}

.finder-accordion-body label {
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
}

.finder-group {
  display: grid;
  gap: 6px;
}

.finder-group-wide {
  grid-column: 1 / -1;
}

.finder-field-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 10px;
}

.finder-field-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
}

.finder-field-checks input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
}

.finder-accordion-body input,
.finder-accordion-body select {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.8rem;
}

.finder-accordion-body textarea {
  min-height: 66px;
  padding: 6px 8px;
  font-size: 0.8rem;
}

@media (max-width: 1200px) {
  .finder-accordion-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .finder-accordion-body {
    grid-template-columns: 1fr;
  }
  .finder-field-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finder-advanced-grid {
    grid-template-columns: 1fr;
  }
}

.finder-advanced {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.finder-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.finder-advanced-group {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbfb);
}

.finder-advanced-head {
  display: grid;
  gap: 4px;
}

.finder-advanced-head strong {
  font-size: 0.95rem;
  font-weight: 650;
}

.finder-advanced-head .muted {
  font-size: 0.84rem;
  line-height: 1.45;
}

.finder-checks,
.finder-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
}

.finder-checks label,
.finder-radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.finder-checks input[type="checkbox"],
.finder-radios input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
}

.crm-insight-block {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.crm-company-card.active,
.active-row {
  outline: 2px solid rgba(15, 118, 110, 0.25);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #d8e5e1;
  background: #f3f9f7;
  font-size: 0.75rem;
  color: #24574f;
}

.crm-score-reason {
  display: grid;
  gap: 3px;
}

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

.crm-hero-card,
.crm-redirect-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #d8e5e1;
  background: linear-gradient(180deg, #fff, #f6fbfa);
  box-shadow: 0 12px 24px rgba(16, 42, 37, 0.06);
}

.crm-hero-card::before,
.crm-redirect-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #0d8c7d, #88c4a7);
}

.crm-hero-card strong {
  font-size: 1.35rem;
  line-height: 1.05;
}

.crm-reference-page {
  display: grid;
  gap: 18px;
  padding: 8px 2px 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.crm-reference-head,
.crm-reference-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.crm-reference-title {
  display: grid;
  justify-content: start;
  gap: 6px;
}

.crm-reference-head h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #172554;
}

.crm-reference-head .muted {
  margin: 0;
  font-size: 0.98rem;
  color: #667085;
}

.crm-reference-primary {
  min-height: 44px;
  padding-inline: 16px;
  gap: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #103e8b 0%, #072c66 100%);
  box-shadow: 0 10px 18px rgba(13, 52, 113, 0.18);
}

.crm-reference-menu > summary {
  min-height: 44px;
  border-radius: 12px;
  padding-inline: 14px;
  gap: 8px;
}

.crm-reference-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #e3ebf5;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 42, 81, 0.04);
}

.crm-reference-status-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #667085;
  font-size: 0.9rem;
}

.crm-reference-status-copy strong {
  color: #1f8f57;
  font-weight: 650;
}

.crm-reference-status-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #eaf8f0;
  color: #1f8f57;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.crm-reference-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.crm-reference-stat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid #e4ebf5;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 14px 28px rgba(15, 42, 81, 0.06);
}

.crm-reference-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.crm-reference-stat-icon.blue { background: #edf3ff; color: #2453d5; }
.crm-reference-stat-icon.teal { background: #ecfbfa; color: #1091a6; }
.crm-reference-stat-icon.violet { background: #f2edff; color: #6b46e5; }
.crm-reference-stat-icon.amber { background: #fff4e7; color: #d97706; }

.crm-reference-stat-copy {
  display: grid;
  gap: 4px;
}

.crm-reference-stat-copy span {
  font-size: 0.9rem;
  color: #475467;
}

.crm-reference-stat-copy strong {
  font-size: 2rem;
  line-height: 1;
  color: #172554;
}

.crm-reference-stat-copy small {
  color: #667085;
  font-size: 0.86rem;
}

.crm-reference-stat-copy small em {
  font-style: normal;
  color: #16a34a;
  font-weight: 650;
  margin-left: 8px;
}

.crm-reference-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.crm-reference-main {
  min-width: 0;
  overflow: hidden;
}

.crm-reference-tabs-shell {
  gap: 12px;
}

.crm-reference-stage {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #e4ebf5;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 18px 34px rgba(15, 42, 81, 0.06);
  min-width: 0;
}

.crm-reference-tabs {
  display: inline-flex;
  gap: 24px;
  padding: 0 2px;
  border-bottom: 1px solid #e6edf7;
}

.crm-reference-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #667085;
  font-weight: 600;
}

.crm-reference-tab[data-state="active"] {
  color: #2453d5;
  border-bottom-color: #2453d5;
  background: transparent;
}

.crm-reference-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.crm-reference-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #dde5f1;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: #94a3b8;
}

.crm-reference-search.compact {
  min-height: 44px;
}

.crm-reference-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: #172554;
}

.crm-reference-search input:focus {
  outline: none;
}

.crm-reference-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.crm-reference-view-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid #dde5f1;
  background: #fff;
}

.crm-reference-view-toggle button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #667085;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.crm-reference-view-toggle button.active {
  background: #eef4ff;
  color: #2453d5;
}

.crm-columns-menu {
  position: relative;
}

.crm-columns-menu > summary {
  list-style: none;
}

.crm-columns-menu > summary::-webkit-details-marker {
  display: none;
}

.crm-reference-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.crm-reference-filters select {
  min-width: 148px;
  min-height: 42px;
  border-radius: 12px;
  border-color: #dde5f1;
  background: #fff;
  color: #344054;
}

.crm-link-button {
  border: 0;
  background: transparent;
  color: #2453d5;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.crm-link-button.muted {
  color: #667085;
}

.crm-research-workbench,
.crm-contact-builder-card,
.crm-reference-table-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e6edf7;
  background: #fff;
  min-width: 0;
  overflow: visible;
}

.crm-research-workbench {
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.crm-research-workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.crm-research-workbench-head strong,
.crm-contact-builder-head strong {
  font-size: 1.05rem;
  color: #172554;
}

.crm-research-workbench-grid,
.crm-contact-builder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.crm-research-workbench-grid label,
.crm-contact-builder-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  color: #475467;
}

.crm-contact-builder-actions {
  display: flex;
  align-items: flex-end;
}

.crm-reference-table-card .crm-data-table {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.crm-reference-table-card table {
  border-radius: 16px;
  overflow: visible;
}

.crm-table-inline-input,
.crm-table-inline-select {
  width: 100%;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #dde5f1;
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  box-shadow: none;
}

.crm-table-inline-input:focus,
.crm-table-inline-select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.crm-table-inline-select-strong {
  background: #eaf7ef;
  color: #1f8f57;
}

.crm-table-inline-select-medium {
  background: #fff6e8;
  color: #d97706;
}

.crm-table-inline-select-light {
  background: #f3f4f6;
  color: #667085;
}

.crm-chip-editor {
  position: relative;
  min-width: 0;
  z-index: 1;
}

.crm-chip-editor.open {
  z-index: 50;
}

.crm-chip-editor-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  justify-content: flex-start;
}

.crm-chip-editor-trigger .crm-pill {
  max-width: 100%;
}

.crm-chip-editor-trigger .crm-pill span,
.crm-chip-editor-trigger > .crm-chip-stack {
  min-width: 0;
}

.crm-chip-editor-trigger-multi {
  width: 100%;
  justify-content: space-between;
}

.crm-chip-editor-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  max-width: 320px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #d9e4f3;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 42, 81, 0.14);
}

.crm-chip-editor-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-chip-editor-panel-head strong {
  color: #172554;
  font-size: 0.88rem;
}

.crm-chip-editor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-chip-editor-options .crm-pill,
.crm-chip-editor-trigger .crm-pill {
  border: 0;
}

.crm-chip-editor-options .crm-pill.active {
  box-shadow: inset 0 0 0 1px rgba(15, 42, 81, 0.18);
}

.crm-chip-editor-input {
  display: grid;
  gap: 6px;
}

.crm-chip-editor-input span {
  font-size: 0.74rem;
  font-weight: 600;
  color: #667085;
}

.crm-chip-editor-input input {
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #d9e4f3;
  background: #ffffff;
}

.crm-chip-editor-input input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.crm-inline-text-cell {
  min-width: 0;
}

.crm-inline-text-input {
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #334155;
  font-size: 0.78rem;
  box-shadow: none;
}

.crm-inline-text-input::placeholder {
  color: #98a2b3;
}

.crm-inline-text-input:focus {
  outline: none;
  color: #172554;
}

.crm-reference-table-card thead th {
  background: #fbfcff;
  color: #475467;
  font-size: 0.8rem;
  font-weight: 650;
}

.crm-reference-table-card tbody td {
  background: #fff;
  vertical-align: middle;
}

.crm-reference-table-card tbody tr:hover td {
  background: #f9fbff;
}

.crm-reference-table-card .tanstack-pagination {
  padding: 16px 2px 0;
}

.crm-reference-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.crm-reference-company-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #e6edf7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 12px 24px rgba(15, 42, 81, 0.05);
  cursor: pointer;
}

.crm-reference-company-card.active {
  border-color: #bfd4ff;
  box-shadow: 0 16px 28px rgba(36, 83, 213, 0.08);
}

.crm-reference-company-card.compact {
  gap: 10px;
}

.crm-org-cell,
.crm-contact-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.crm-org-mark,
.crm-reference-selected-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f1f4ff 0%, #e5ebff 100%);
  color: #2453d5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.crm-org-mark.active,
.crm-reference-selected-mark {
  background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
  color: #fff;
}

.crm-org-copy,
.crm-contact-copy,
.crm-contact-role {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.crm-org-copy strong,
.crm-contact-copy strong,
.crm-contact-role strong {
  font-size: 0.94rem;
  color: #172554;
}

.crm-org-copy small,
.crm-contact-copy small,
.crm-contact-role small,
.crm-table-muted {
  color: #667085;
  font-size: 0.82rem;
}

.crm-contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8f2eb 0%, #ead9ca 100%);
  color: #714b2d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.crm-contact-avatar.large {
  width: 44px;
  height: 44px;
}

.crm-row-actions,
.crm-chip-stack,
.crm-reference-company-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.crm-view-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
}

.crm-linked-org-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.crm-linked-org-button-wide {
  justify-self: start;
}

.crm-row-actions .icon-button.small,
.crm-reference-status .icon-button.small,
.crm-reference-side-head .icon-button.small,
.crm-reference-contact-actions .icon-button.small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.crm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}

.crm-pill-soft.blue { background: #eef4ff; color: #2453d5; }
.crm-pill-soft.violet { background: #f4efff; color: #7c3aed; }
.crm-pill-soft.mint { background: #ecfbf5; color: #0f9b6b; }
.crm-pill-soft.sand { background: #fff4e5; color: #d97706; }
.crm-pill-soft.green { background: #eaf7ef; color: #1f8f57; }

.crm-pill-status.strong { background: #eaf7ef; color: #1f8f57; }
.crm-pill-status.medium { background: #fff6e8; color: #d97706; }
.crm-pill-status.light { background: #f3f4f6; color: #667085; }

.crm-company-insight-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 14px;
}

.crm-company-insight-selected {
  margin: 0;
}

.crm-company-insight-contact-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e6edf7;
  background: #fbfdff;
}

.crm-company-insight-actions {
  margin: 16px 0 20px;
}

.crm-reference-contact-card {
  gap: 12px;
}

.crm-contact-insight-modal .crm-company-insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-reference-side {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #e4ebf5;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 18px 34px rgba(15, 42, 81, 0.06);
  position: relative;
  align-self: start;
  min-width: 0;
}

.crm-reference-side-head,
.crm-reference-side-section-head,
.crm-reference-selected-card,
.crm-reference-selected-org,
.crm-reference-primary-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-reference-side-head strong,
.crm-reference-side-section strong {
  color: #172554;
}

.crm-reference-selected-card {
  align-items: flex-start;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #ece8ff;
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
}

.crm-reference-selected-org {
  align-items: center;
  justify-content: flex-start;
}

.crm-reference-selected-org small,
.crm-reference-primary-contact small,
.crm-reference-activity-item small {
  color: #667085;
}

.crm-reference-side-section {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.crm-reference-contact-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.crm-reference-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.crm-reference-quick-actions .button {
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
}

.crm-reference-quick-actions .button.full {
  grid-column: 1 / -1;
}

.crm-reference-snapshot-list,
.crm-reference-activity-list {
  display: grid;
  gap: 10px;
}

.crm-reference-snapshot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-reference-snapshot-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 0.85rem;
}

.crm-reference-snapshot-item strong,
.crm-reference-activity-item strong {
  font-size: 0.88rem;
  color: #172554;
}

.crm-reference-snapshot-item .tone-high { color: #16a34a; }
.crm-reference-snapshot-item .tone-medium { color: #2563eb; }
.crm-reference-snapshot-item .tone-muted { color: #667085; }

.crm-reference-activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
}

.crm-reference-activity-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.crm-reference-activity-icon.green { background: #eaf7ef; color: #1f8f57; }
.crm-reference-activity-icon.purple { background: #f4efff; color: #7c3aed; }
.crm-reference-activity-icon.blue { background: #eef4ff; color: #2453d5; }

.crm-reference-activity-item div {
  display: grid;
  gap: 4px;
}

.crm-reference-side .state-surface {
  margin: 0;
}

@media (max-width: 1320px) {
  .crm-reference-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-reference-shell {
    grid-template-columns: 1fr;
  }

  .crm-company-insight-hero {
    grid-template-columns: 1fr;
  }

  .crm-contact-insight-modal .crm-company-insight-grid {
    grid-template-columns: 1fr;
  }

  .crm-reference-side {
    position: static;
  }
}

@media (max-width: 980px) {
  .crm-reference-toolbar {
    grid-template-columns: 1fr;
  }

  .crm-reference-toolbar-actions {
    justify-content: flex-start;
  }

  .crm-research-workbench-grid,
  .crm-contact-builder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-reference-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .crm-reference-head,
  .crm-reference-status,
  .crm-research-workbench-head,
  .crm-reference-side-head,
  .crm-reference-side-section-head,
  .crm-reference-selected-card,
  .crm-reference-primary-contact {
    flex-direction: column;
    align-items: flex-start;
  }

  .crm-reference-stats,
  .crm-research-workbench-grid,
  .crm-contact-builder-grid,
  .crm-reference-quick-actions {
    grid-template-columns: 1fr;
  }

  .crm-reference-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .crm-reference-filters select,
  .crm-link-button {
    width: 100%;
    justify-content: space-between;
  }

  .crm-reference-toolbar-actions {
    width: 100%;
  }
}

.crm-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.crm-builder-card,
.crm-list-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #d8e5e1;
  background: #fff;
  box-shadow: 0 18px 30px rgba(16, 42, 37, 0.06);
}

.crm-builder-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
}

.crm-builder-form {
  display: grid;
  gap: 14px;
}

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

.crm-form-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e1ece8;
  background: linear-gradient(180deg, #ffffff, #f5faf8);
}

.crm-builder-grid > label,
.crm-form-section > label {
  display: grid;
  gap: 6px;
  align-content: start;
}

.crm-builder-grid > label > input,
.crm-builder-grid > label > textarea,
.crm-builder-grid > label > select,
.crm-form-section > label > input,
.crm-form-section > label > textarea,
.crm-form-section > label > select {
  width: 100%;
}

.crm-form-section-head {
  display: grid;
  gap: 4px;
}

.crm-form-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

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

.crm-capability-grid label:last-child,
.crm-span {
  grid-column: 1 / -1;
}

.crm-form-section textarea,
.crm-builder-grid textarea,
.crm-builder-grid input,
.crm-builder-grid select {
  min-height: 44px;
}

.crm-form-section textarea,
.crm-span textarea {
  min-height: 104px;
}

.consortium-modal-card {
  width: min(840px, 100%);
  padding: 24px;
  gap: 18px;
  border-radius: 20px;
}

.consortium-modal-head {
  align-items: flex-start;
}

.consortium-modal-head p {
  margin: 8px 0 0;
  max-width: 58ch;
}

.consortium-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.consortium-summary-pill {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dfe9e6;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
}

.consortium-summary-pill strong {
  font-size: 0.98rem;
  font-weight: 620;
  color: var(--ink);
}

.consortium-builder-form {
  gap: 16px;
}

.consortium-modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.consortium-modal-grid > label {
  gap: 8px;
}

.consortium-modal-grid input,
.consortium-modal-grid select,
.consortium-modal-grid textarea {
  min-height: 46px;
}

.consortium-modal-grid textarea {
  min-height: 116px;
}

.crm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d7e7e2;
  background: #ffffff;
  color: #2a423a;
  font-weight: 720;
  box-shadow: 0 6px 14px rgba(20, 38, 33, 0.05);
}

.crm-chip.active {
  background: linear-gradient(180deg, #0d8c7d, #0a786b);
  color: #fff;
  border-color: transparent;
}

.crm-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #456057;
  font-size: 0.84rem;
}

.crm-meta-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef6f3;
}

.crm-attachments {
  display: grid;
  gap: 10px;
}

.crm-upload {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed #bfd4cd;
  background: #f9fcfb;
}

.crm-upload span {
  font-weight: 720;
}

.crm-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.crm-redirect-card span {
  color: var(--muted);
  line-height: 1.35;
}

.connection-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dce7e3;
  border-radius: 8px;
  background: #f6fbfa;
}

.connection-card.danger {
  border-color: rgba(160, 38, 38, 0.24);
  background: #fcf5f5;
}

.freshsales-select {
  display: grid;
  gap: 6px;
}

.freshsales-select select {
  min-height: 42px;
}

.freshsales-select .hint {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.directory-list {
  display: grid;
  gap: 12px;
}

.directory-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe8e3;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
  box-shadow: 0 10px 18px rgba(14, 34, 28, 0.04);
}

.directory-card-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.directory-card-main small {
  color: var(--muted);
}

.directory-card-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.directory-card-fields.crm-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-card-fields textarea {
  min-height: 72px;
  grid-column: 1 / -1;
}

.attachment-panel {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.upload-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.upload-row input[type="file"] {
  width: 100%;
  font-size: 0.86rem;
}

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

.attachment-chip {
  display: inline-grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #dce7e3;
  background: #f7faf9;
  color: inherit;
  text-decoration: none;
  min-width: 140px;
}

.attachment-chip strong,
.attachment-chip small {
  grid-column: 2;
  line-height: 1.2;
}

.attachment-chip strong {
  font-size: 0.8rem;
}

.attachment-chip small {
  color: var(--muted);
  font-size: 0.72rem;
}

.team-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1fr) minmax(150px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.team-grid {
  display: grid;
  gap: 10px;
}

.team-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.team-card div:first-child {
  display: grid;
  gap: 3px;
}

.team-card span,
.team-card small {
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segmented button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 820;
}

.segmented button.active {
  background: var(--ink);
  color: #fff;
}

.ai-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  margin-top: 8px;
  border: 1px solid #d6c8a9;
  border-radius: 999px;
  background: #fff7e6;
  color: #6b4a13;
  font-size: 0.78rem;
  font-weight: 680;
}

.ai-badge.enabled {
  border-color: #b7d6ce;
  background: #e7f6f2;
  color: #0f5f56;
}

.nav-label,
.eyebrow {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.workflow-nav {
  display: grid;
  gap: 8px;
  padding: 18px 0;
  border-top: 1px solid rgba(7, 59, 76, 0.08);
  border-bottom: 1px solid rgba(7, 59, 76, 0.08);
}

.workflow-nav .nav-label {
  color: rgba(7, 59, 76, 0.62);
}

.workflow-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 10px;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 16px;
  background: #ffffff;
  color: #0b0b0c;
  text-align: left;
  box-shadow: 0 10px 22px rgba(75, 123, 174, 0.06);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.workflow-step:hover {
  transform: translateY(-1px);
  border-color: rgba(75, 123, 174, 0.14);
  background: #f7fbff;
  box-shadow: 0 14px 26px rgba(75, 123, 174, 0.09);
}

.step-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  color: #365ef7;
  box-shadow: 0 12px 24px rgba(54, 94, 247, 0.12);
  font-size: 0.82rem;
  font-weight: 760;
}

.workflow-icon {
  stroke-width: 2.15;
}

.step-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding-right: 4px;
}

.workflow-step strong {
  min-width: 0;
  overflow: visible;
  white-space: normal;
  line-height: 1.18;
  font-size: 0.94rem;
  font-weight: 620;
}

.workflow-step small {
  color: rgba(7, 59, 76, 0.56);
}

.workflow-step em {
  width: 8px;
  height: 8px;
  justify-self: end;
  align-self: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(7, 59, 76, 0.16);
  box-shadow: 0 0 0 4px rgba(75, 123, 174, 0.06);
  color: transparent;
  font-size: 0;
  font-style: normal;
}

.workflow-step.active {
  color: #2859d4;
  background: linear-gradient(180deg, #eef4ff, #f7fbff);
  border-color: rgba(75, 123, 174, 0.16);
  box-shadow: 0 14px 28px rgba(75, 123, 174, 0.1);
}

.workflow-step.active .step-number,
.workflow-step.attention .step-number {
  background: linear-gradient(135deg, #ffcf7a, #ffac4d);
  border-color: rgba(255, 172, 77, 0.4);
  color: #7b4b09;
  box-shadow: 0 12px 24px rgba(255, 172, 77, 0.22);
}

.workflow-step.complete .step-number {
  background: linear-gradient(135deg, #37c79e, #24a77f);
  border-color: rgba(36, 167, 127, 0.38);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(36, 167, 127, 0.18);
}

.workflow-step.active em {
  background: #365ef7;
  box-shadow: 0 0 0 4px rgba(54, 94, 247, 0.14);
}

.workflow-step.complete em {
  background: #24a77f;
  box-shadow: 0 0 0 4px rgba(36, 167, 127, 0.12);
}

.workflow-step.attention em {
  background: #ffac4d;
  box-shadow: 0 0 0 4px rgba(255, 172, 77, 0.14);
}

.workflow-nav.collapsed {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 0;
  overflow: visible;
  border-top: 1px solid rgba(7, 59, 76, 0.06);
  border-bottom: 1px solid rgba(7, 59, 76, 0.06);
}

.workflow-nav.collapsed .workflow-step {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  grid-template-columns: 40px;
  justify-content: center;
  justify-items: center;
  min-height: 56px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.workflow-nav.collapsed .step-copy {
  display: none;
}

.workflow-nav.collapsed .workflow-step em {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  justify-self: auto;
  align-self: auto;
  box-shadow: 0 0 0 3px rgba(75, 123, 174, 0.08);
}

.workflow-nav.collapsed .step-number {
  width: 40px;
  height: 40px;
  margin: 0 auto;
}

.workspace-sidebar.collapsed .workflow-nav {
  width: 100%;
}

.generate-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.info-action {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6faf7;
  color: var(--teal);
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.info-action:hover {
  background: #e7f6f2;
  border-color: #b7d6ce;
  transform: translateY(-1px);
}

.prompt-sheet {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.prompt-sheet-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.prompt-sheet-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.model-picker {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
  align-items: stretch;
}

.model-picker label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.model-picker select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
}

.model-cost-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dce7e3;
  border-radius: 8px;
  background: #f6fbfa;
}

.model-cost-card strong {
  font-size: 0.92rem;
}

.model-cost-card span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.model-cost-card small {
  color: #0f5f56;
  font-size: 0.75rem;
  font-weight: 850;
}

.model-compact {
  width: min(560px, 100%);
  margin-top: 10px;
}

.model-compact summary {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: #f5fbf9;
  color: #385247;
  cursor: pointer;
  list-style: none;
}

.model-compact summary::-webkit-details-marker {
  display: none;
}

.model-compact summary span,
.model-compact summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.model-compact summary strong {
  font-size: 0.86rem;
  font-weight: 680;
}

.model-compact .model-picker {
  margin-top: 8px;
}

.workspace-model-picker {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .model-picker {
    grid-template-columns: 1fr;
  }

  .mini-save-grid,
  .crm-form-grid,
  .directory-card-fields {
    grid-template-columns: 1fr;
  }

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

  .spider-chart {
    max-width: 360px;
  }
}

.prompt-editor {
  min-height: 108px;
  resize: vertical;
  font-family: inherit;
}

.command-nav-item {
  margin-top: 14px;
}

.cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 190px minmax(280px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  padding: 22px;
  margin-bottom: 16px;
  border: 1px solid #cfd8d0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.cockpit-copy h2 {
  max-width: 720px;
  margin: 8px 0 10px;
  font-size: clamp(1.45rem, 1.2rem + 1vw, 2.25rem);
  line-height: 1.05;
}

.cockpit-copy p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.55;
}

.cockpit-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
}

.command-centre-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(290px, 0.7fr);
  gap: 18px;
  margin-bottom: 18px;
}

.command-centre-main,
.command-centre-side,
.command-centre-middle-stack {
  display: grid;
  gap: 18px;
}

.command-centre-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px;
}

.command-centre-head h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 1.75rem + 1vw, 3rem);
  line-height: 1.02;
  font-weight: 680;
}

.command-centre-head-main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.command-centre-head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.command-centre-project-pill {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #d8e0eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.command-centre-project-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #123e72 0%, #0d2c54 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 24px rgba(15, 44, 84, 0.22);
  line-height: 0;
  flex-shrink: 0;
}

.command-centre-project-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
  color: inherit;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.command-centre-project-pill strong,
.command-centre-project-pill small {
  display: block;
  min-width: 0;
}

.command-centre-project-pill strong {
  font-size: 1rem;
  font-weight: 620;
}

.command-centre-project-pill small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.84rem;
}

.command-centre-stage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.command-centre-stage-pill.tone-slate {
  background: #eceffd;
  color: #495ad5;
}

.command-centre-stage-pill.tone-emerald,
.command-centre-stage-pill.tone-teal {
  background: #e6f7f3;
  color: #0d7366;
}

.command-centre-stage-pill.tone-blue {
  background: #e9f1ff;
  color: #2d61da;
}

.command-centre-stage-pill.tone-ochre {
  background: #fff3df;
  color: #b86e00;
}

.command-centre-stage-pill.tone-red {
  background: #ffe7e6;
  color: #cf4040;
}

.command-centre-overview {
  padding: 24px 26px;
}

.command-centre-overview-head {
  margin-bottom: 18px;
}

.command-centre-overview-head h2 {
  margin-bottom: 6px;
  font-weight: 640;
}

.command-centre-overview-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.command-centre-ring-card {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dbe4ef;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-card);
}

.command-centre-ring-copy {
  display: grid;
  gap: 4px;
  text-align: center;
}

.command-centre-ring-copy strong {
  font-size: 1.15rem;
  font-weight: 620;
}

.command-centre-ring-copy span {
  color: #0e5f57;
  font-weight: 600;
}

.command-centre-ring-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.command-centre-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.command-centre-metric-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dde5ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  min-width: 0;
  transition:
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-fast);
}

.command-centre-metric-head {
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;
  column-gap: 12px;
  align-items: flex-start;
}

.command-centre-metric-head > div {
  min-width: 0;
  flex: 1 1 110px;
}

.command-centre-metric-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  border: 1px solid rgba(108, 134, 170, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 8px 18px rgba(28, 46, 76, 0.06);
  flex-shrink: 0;
  line-height: 0;
}

.command-centre-metric-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  color: inherit;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.command-centre-metric-icon.tone-violet {
  background: #efecff;
  color: #6558ea;
}

.command-centre-metric-icon.tone-emerald,
.command-centre-metric-icon.tone-teal {
  background: #e8f8f4;
  color: #14816d;
}

.command-centre-metric-icon.tone-blue {
  background: #ebf2ff;
  color: #2766e4;
}

.command-centre-metric-icon.tone-ochre {
  background: #fff2df;
  color: #c87907;
}

.command-centre-metric-head span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 540;
  line-height: 1.25;
}

.command-centre-metric-head strong {
  display: block;
  margin-top: 4px;
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 610;
}

.command-centre-metric-card:hover,
.command-centre-ring-card:hover,
.command-centre-review-table:hover,
.command-centre-ai-card:hover,
.command-centre-side-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(7, 59, 76, 0.12);
}

.command-centre-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 620;
  white-space: nowrap;
  margin-left: auto;
  align-self: flex-start;
  flex-shrink: 0;
}

.command-centre-status.good {
  background: #ebf8f4;
  color: #13806d;
}

.command-centre-status.fair {
  background: #fff4e3;
  color: #c47805;
}

.command-centre-status.risk {
  background: #ffe9e7;
  color: #cf4a43;
}

.command-centre-metric-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.command-centre-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 18px;
}

.command-centre-review-table {
  display: grid;
  gap: 0;
  border: 1px solid #e3e8f0;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(28, 45, 79, 0.04);
}

.command-centre-review-head,
.command-centre-review-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) 88px 110px minmax(180px, 1fr);
  gap: 14px;
  align-items: center;
}

.command-centre-review-head {
  padding: 12px 16px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 560;
  text-transform: uppercase;
}

.command-centre-review-row {
  width: 100%;
  padding: 14px 16px;
  border-top: 1px solid #edf1f6;
  background: #ffffff;
  text-align: left;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.command-centre-review-row:hover,
.command-centre-review-row.active {
  background: #f8fbff;
}

.command-centre-review-row.active {
  box-shadow: inset 3px 0 0 #4d63f0;
}

.command-centre-question-title {
  font-weight: 620;
  line-height: 1.35;
}

.command-centre-review-note {
  color: var(--muted);
  line-height: 1.45;
}

.command-centre-score-cell {
  display: inline-flex;
  justify-content: center;
}

.command-centre-ai-card {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f7f5ff 0%, #edf3ff 100%);
  border: 1px solid #dfdff6;
}

.command-centre-ai-card .eyebrow {
  font-weight: 600;
}

.command-centre-ai-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.command-centre-commentary-list {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding-left: 22px;
}

.command-centre-commentary-list li {
  line-height: 1.5;
}

.command-centre-action-list {
  display: grid;
  gap: 12px;
}

.command-centre-action-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.command-centre-action-row strong,
.command-centre-action-row small {
  display: block;
}

.command-centre-action-row strong {
  font-weight: 600;
  line-height: 1.35;
}

.command-centre-action-row small {
  margin-top: 4px;
  color: var(--muted);
}

.command-centre-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid #cad5e3;
  border-radius: 5px;
  background: #ffffff;
}

.command-centre-side-card h3 {
  margin-bottom: 14px;
}

.command-centre-deadline-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.command-centre-deadline-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #7868ff 0%, #6657f2 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 22px rgba(98, 86, 236, 0.2);
  line-height: 0;
}

.command-centre-deadline-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
  color: inherit;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.command-centre-deadline-card strong,
.command-centre-deadline-card small,
.command-centre-deadline-card p {
  display: block;
}

.command-centre-deadline-card strong {
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 650;
}

.command-centre-deadline-card small {
  margin-top: 6px;
  color: var(--muted);
}

.command-centre-deadline-card p {
  margin: 8px 0 0;
  color: #e24b3e;
  font-weight: 700;
}

.command-centre-side-foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.command-centre-side-foot strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.command-centre-feed,
.command-centre-risk-list {
  display: grid;
  gap: 14px;
}

.command-centre-feed-row,
.command-centre-risk-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.command-centre-feed-row .avatar-badge,
.command-centre-feed-row .team-avatar {
  flex-shrink: 0;
}

.command-centre-feed-row strong,
.command-centre-feed-row small,
.command-centre-feed-row p,
.command-centre-risk-row strong,
.command-centre-risk-row p {
  display: block;
}

.command-centre-feed-row strong,
.command-centre-risk-row strong,
.command-centre-side-card h3,
.command-centre-middle-stack h2,
.command-centre-question-review h2 {
  font-weight: 620;
}

.command-centre-feed-row small,
.command-centre-risk-row p {
  color: var(--muted);
}

.command-centre-feed-row p,
.command-centre-risk-row p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.command-centre-risk-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  line-height: 0;
}

.command-centre-risk-icon.high {
  background: #ffe9e7;
  color: #cf4a43;
}

.command-centre-risk-icon.medium {
  background: #fff4e3;
  color: #c47805;
}

.command-centre-risk-icon.low {
  background: #ebf8f4;
  color: #13806d;
}

.command-centre-risk-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  color: inherit;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.command-centre-question-review .muted,
.command-centre-middle-stack .muted,
.command-centre-side-card .muted {
  font-weight: 420;
}

.question-detail-grid .panel h3 strong,
.question-detail-grid .panel h4,
.question-detail-grid .metric strong {
  font-weight: 620;
}

.action-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: #34423a;
}

.score-ring {
  --score: 0;
  width: 168px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  border-radius: 999px;
  background: conic-gradient(var(--teal) calc(var(--score) * 1%), #e4eae4 0);
}

.score-ring::before {
  content: "";
  position: absolute;
}

.score-ring > div {
  width: calc(100% - 22px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: inherit;
  background: #fff;
  text-align: center;
}

.score-ring strong {
  font-size: 1.8rem;
  line-height: 1;
}

.score-ring span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.score-ring.small {
  width: 88px;
}

.score-ring.small strong {
  font-size: 1rem;
}

.score-ring.small span {
  font-size: 0.62rem;
}

.competition-facts {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 12px;
  margin-top: 14px;
}

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

.fact-section,
.date-card,
.fact-card,
.card {
  min-width: 0;
  padding: 13px;
  box-shadow: none;
}

.date-card {
  border-left: 4px solid var(--teal);
}

.date-card.missing {
  border-left-color: #aebaae;
  background: #f1f3f0;
}

.date-card span,
.fact-card span,
.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.date-card strong,
.fact-card strong,
.metric strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.fact-side {
  display: grid;
  gap: 12px;
}

.section-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.workspace-module-hero {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
  box-shadow: 0 16px 40px rgba(7, 59, 76, 0.06);
}

.workspace-module-hero-head {
  margin-bottom: 0;
}

.step-section-top {
  align-items: flex-start;
}

.workspace-module-hero-main {
  display: grid;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.workspace-module-title-block {
  display: grid;
  gap: 4px;
}

.workspace-module-hero-copy {
  max-width: 68ch;
}

.workspace-module-hero-copy .muted {
  margin: 0;
}

.workspace-module-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-module-generate-group {
  align-items: center;
}

.workspace-module-meta-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: start;
}

.workspace-module-next-hint {
  margin: 0;
  min-height: 100%;
}

.workspace-module-prompt-sheet {
  margin-top: -2px;
}

.title-with-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.title-with-action h2 {
  margin-bottom: 0;
}

.generate-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px 0 7px;
  border: 1px solid #b7d6ce;
  border-radius: 999px;
  background: #e7f6f2;
  color: #0f5f56;
  font-weight: 700;
}

.generate-action span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 0.68rem;
}

.generate-action strong {
  font-size: 0.82rem;
  font-weight: 700;
}

.generate-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.metric-grid,
.cards-grid,
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metric,
.status {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 30, 40, 0.14);
  animation: toast-in 180ms ease-out;
}

@keyframes toast-in {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--teal);
  flex-shrink: 0;
}

.toast-text {
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink);
  word-break: break-word;
}

.toast-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.toast-action {
  appearance: none;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.toast-action:hover {
  background: rgba(7, 59, 76, 0.08);
}

.toast-close {
  appearance: none;
  background: transparent;
  border: 0;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}

.toast-close:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.05);
}

.toast-error {
  border-color: #f1b9bd;
  background: #fdf2f3;
}

.toast-error .toast-icon { background: var(--coral); }
.toast-error .toast-action { color: var(--coral); }
.toast-error .toast-action:hover { background: rgba(208, 38, 49, 0.1); }

.toast-success {
  border-color: #b4d8c9;
  background: #effaf3;
}

.toast-success .toast-icon { background: var(--emerald); }
.toast-success .toast-action { color: var(--emerald); }

.toast-warning {
  border-color: #f0d6a3;
  background: #fdf6e3;
}

.toast-warning .toast-icon { background: var(--amber); }
.toast-warning .toast-action { color: var(--amber); }

.toast-info { border-color: #c4d9df; }

.state-surface {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid #d7e5df;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  box-shadow: 0 10px 24px rgba(15, 30, 40, 0.04);
}

.state-surface.inline {
  padding: 14px 16px;
}

.state-surface.compact {
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
}

.state-surface.loading {
  border-color: #cfe0db;
  background: linear-gradient(180deg, #f7fcfa 0%, #eef8f4 100%);
}

.state-surface.success {
  border-color: #cfe5d7;
  background: linear-gradient(180deg, #fbfefc 0%, #effaf3 100%);
}

.state-surface.warning {
  border-color: #ead9af;
  background: linear-gradient(180deg, #fffdf6 0%, #fdf6e3 100%);
}

.state-surface.error {
  border-color: #f0c4c8;
  background: linear-gradient(180deg, #fff9fa 0%, #fdf2f3 100%);
}

.state-surface-visual {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  background: #e4f2ee;
  box-shadow: inset 0 0 0 1px rgba(7, 59, 76, 0.08);
  flex-shrink: 0;
}

.state-surface-visual.success {
  color: var(--emerald);
  background: #e6f5eb;
}

.state-surface-visual.warning {
  color: #9a6a00;
  background: #fdf1d6;
}

.state-surface-visual.error {
  color: var(--coral);
  background: #fde8ea;
}

.state-surface-visual.loading {
  background: #dff0eb;
}

.state-surface-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.state-surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.state-surface-head strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.state-surface-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(7, 59, 76, 0.08);
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.state-surface p,
.state-surface small {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.state-surface-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.waiting-status {
  margin-bottom: 16px;
}

.waiting-status .state-surface-head strong {
  color: #12332d;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(15, 118, 110, 0.18);
  border-top-color: var(--teal);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

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

.stage-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stage-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f7f4;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 640;
}

.stage-pill.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.stage-pill.done {
  color: #0f5f56;
  background: #e7f6f2;
  border-color: #b7d6ce;
}

.stage-pill.blocked {
  color: #6b4a13;
  background: #fff7e6;
  border-color: #d6c8a9;
}

.stage-progress strong {
  color: #8b2024;
}

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

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

.scorecard-grid {
  grid-template-columns: repeat(7, minmax(130px, 1fr));
}

.readiness-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.readiness-card-top,
.idea-card-top,
.finance-bars > div > div,
.output-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.readiness-card-top span,
.pipeline-strip span,
.finance-hero span,
.radar-card span,
.mini-bars span,
.evidence-bank span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 680;
  text-transform: uppercase;
}

.readiness-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eae4;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.timeline-step {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 5px solid #b8c4b9;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.timeline-step.complete {
  border-top-color: var(--teal);
}

.timeline-step strong {
  font-size: 1.5rem;
}

.timeline-step small {
  color: var(--muted);
  line-height: 1.35;
}

.card h4 {
  margin-bottom: 8px;
}

.card {
  overflow-wrap: anywhere;
}

.card.selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.16);
}

.card.dimmed {
  opacity: 0.42;
  filter: grayscale(0.85);
}

.card.dimmed:hover,
.card.dimmed:focus-within {
  opacity: 0.82;
  filter: grayscale(0.2);
}

.idea-card,
.partner-card {
  display: grid;
  gap: 10px;
}

.idea-step .button-row {
  align-items: stretch;
}

.idea-card.loading {
  min-height: 210px;
  align-content: start;
  opacity: 0.96;
}

.lever-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin-top: 16px;
  border: 1px solid #c8ddd6;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fcfa 0%, #eef8f4 100%);
}

.lever-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.lever-note {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #dcefeb;
  color: #0f5f56;
  font-size: 0.72rem;
  font-weight: 860;
  white-space: nowrap;
}

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

.spider-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 42, 37, 0.04);
}

.spider-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.spider-head h4 {
  margin: 0 0 4px;
  font-size: 1.02rem;
}

.spider-head .muted {
  margin: 0;
  max-width: 46ch;
}

.spider-body {
  display: grid;
  place-items: center;
}

.spider-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.spider-legend span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf6f4;
  color: #0f5f56;
  font-size: 0.72rem;
  font-weight: 860;
}

.spider-chart {
  width: 100%;
  max-width: 430px;
  aspect-ratio: 1;
  overflow: visible;
}

.spider-ring {
  fill: none;
  stroke: rgba(15, 118, 110, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.spider-axis {
  stroke: rgba(15, 118, 110, 0.14);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.spider-area {
  fill: rgba(15, 118, 110, 0.13);
  stroke: rgba(15, 118, 110, 0.56);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.spider-point {
  fill: var(--primary);
  stroke: #fff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.spider-point.weight-0 {
  fill: #7aa8a3;
}

.spider-point.weight-1,
.spider-point.weight-2 {
  fill: var(--primary);
}

.spider-point.weight-3 {
  fill: #0d9488;
}

.spider-point.weight-4 {
  fill: #075e55;
}

.spider-point-hit {
  fill: transparent;
  cursor: pointer;
}

.spider-point-group:hover .spider-point {
  stroke: #e9fffb;
  filter: drop-shadow(0 2px 4px rgba(15, 118, 110, 0.2));
}

.spider-center {
  fill: #f4fbf8;
  stroke: rgba(15, 118, 110, 0.4);
  stroke-width: 1.5;
}

.spider-center-label {
  fill: #0f5f56;
  font-size: 0.7rem;
  font-weight: 860;
  pointer-events: none;
}

.spider-label,
.spider-value {
  fill: #16312b;
  font-size: 0.72rem;
  font-weight: 780;
  pointer-events: none;
}

.spider-value {
  fill: var(--muted);
  font-size: 0.66rem;
  font-weight: 760;
}

.spider-label-group {
  cursor: pointer;
}

.spider-label-group:hover .spider-label {
  fill: var(--primary);
}

.lever-section-grid {
  display: grid;
  gap: 12px;
}

.lever-section {
  display: grid;
  gap: 10px;
}

.lever-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.lever-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.lever-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lever-card-copy {
  display: grid;
  gap: 4px;
}

.lever-card-copy strong {
  font-size: 0.95rem;
}

.lever-card-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.lever-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7f6f2;
  color: #0f5f56;
  font-size: 0.68rem;
  font-weight: 860;
  text-transform: uppercase;
}

.lever-control {
  display: grid;
  gap: 6px;
}

.lever-control input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.lever-control span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 780;
}

.project-naming {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin-top: 16px;
  border: 1px solid #b7d6ce;
  border-radius: 8px;
  background: #f4fbf8;
}

.project-naming-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-naming-head > div {
  min-width: 0;
}

.project-naming-head .circle-action .dashboard-icon {
  width: 20px;
  height: 20px;
  background: transparent;
}

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

.acronym-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.acronym-card strong {
  color: var(--teal);
  font-size: 1.1rem;
}

.acronym-card span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.acronym-card.selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.fact-card.needs-review {
  border-color: #d6c8a9;
  background: #fffaf0;
}

.competition-dashboard {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px 18px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 10%, rgba(242, 184, 108, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #f9fcfb, #ffffff);
  box-shadow: 0 24px 60px rgba(18, 38, 34, 0.09);
  overflow: hidden;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(15, 118, 110, 0.08), transparent 45%, transparent 55%, rgba(194, 123, 56, 0.06));
  opacity: 0.9;
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.dashboard-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-hero h2 {
  margin: 0;
  font-size: clamp(2.05rem, 1.45rem + 2.1vw, 4rem);
  line-height: 1.02;
  font-weight: 650;
  letter-spacing: 0;
  max-width: 18ch;
}

.dashboard-hero .muted {
  max-width: 56ch;
  font-size: 0.98rem;
  line-height: 1.6;
}

.dashboard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #24413a;
  font-size: 0.8rem;
  font-weight: 620;
  box-shadow: 0 8px 18px rgba(24, 42, 37, 0.04);
}

.dashboard-chip .dashboard-icon {
  width: 24px;
  height: 24px;
  background: rgba(15, 118, 110, 0.08);
}

.dashboard-chip .dashboard-icon.material-symbols-outlined {
  font-size: 18px;
}

.dashboard-date-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.dashboard-icon-action {
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--teal);
  box-shadow: 0 12px 26px rgba(24, 42, 37, 0.08);
}

.dashboard-icon-action .dashboard-icon {
  width: 100%;
  height: 100%;
  background: transparent;
}

.dashboard-icon-action .dashboard-icon svg {
  width: 22px;
  height: 22px;
}

.deadline-pill {
  min-width: 320px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 132px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 38%),
    linear-gradient(180deg, #ffecec, #ffdede);
  box-shadow: 0 18px 40px rgba(171, 70, 70, 0.16);
  position: relative;
  overflow: hidden;
}

.deadline-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(196, 73, 73, 0.16), transparent 52%, rgba(255, 255, 255, 0.08));
  pointer-events: none;
}

.deadline-pill > * {
  position: relative;
  z-index: 1;
}

.deadline-pill .dashboard-icon {
  width: 64px;
  height: 64px;
  background: #ffe0e0;
  color: #bb3f3f;
  border: 1px solid rgba(187, 63, 63, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.deadline-pill span,
.deadline-pill small {
  display: block;
}

.deadline-pill span {
  color: #8e4444;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deadline-pill strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 1.28rem;
  line-height: 1.08;
  color: #5d1f1f;
}

.deadline-pill small {
  margin-top: 8px;
  color: #7e4848;
  font-size: 0.88rem;
  font-weight: 600;
}

.deadline-pill.urgent {
  border-color: #e3b3b3;
  background: #fff0f0;
}

.deadline-pill.overdue {
  border-color: #e5c3bb;
  background: #fff1ee;
}

.deadline-pill.normal {
  border-color: #e3b3b3;
  background: #fff5f5;
}

.deadline-pill.missing {
  background: #f3f5f3;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  grid-auto-rows: 1fr;
}

.snapshot-card,
.dashboard-date {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  row-gap: 6px;
  min-width: 0;
  min-height: 142px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.7), transparent 32%),
    linear-gradient(180deg, #ffffff, #fbfcfb);
  box-shadow: 0 10px 26px rgba(24, 42, 37, 0.05);
  transition: transform 140ms ease, box-shadow 140ms ease;
  position: relative;
  overflow: hidden;
}

.snapshot-card:hover,
.dashboard-date:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(24, 42, 37, 0.08);
}

.snapshot-card.highlight {
  border-color: #c27b38;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 35%),
    linear-gradient(180deg, #fffaf3, #fff6ea);
}

.snapshot-card.deadline-feature {
  min-height: 180px;
  padding: 20px 20px 20px 20px;
  border-color: #d56b6b;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(180deg, #ffe5e5, #ffd3d3);
  box-shadow: 0 18px 40px rgba(171, 70, 70, 0.14);
}

.snapshot-card.deadline-feature::before {
  background: linear-gradient(180deg, rgba(187, 63, 63, 0.34), rgba(187, 63, 63, 0.08));
}

.snapshot-card.deadline-feature .dashboard-icon {
  background: #ffd8d8;
  color: #a93d3d;
}

.snapshot-card.deadline-feature strong {
  font-size: 1.48rem;
  color: #6d2222;
}

.snapshot-card.deadline-feature small {
  color: #7d4949;
}

.snapshot-card.accent-urgent,
.dashboard-date.urgent {
  border-color: #cfb37a;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.75), transparent 35%),
    linear-gradient(180deg, #fff8ea, #fff1d6);
}

.snapshot-card.accent-overdue,
.dashboard-date.overdue {
  border-color: #d68c8c;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.75), transparent 35%),
    linear-gradient(180deg, #fff3f3, #ffe4e4);
}

.snapshot-card.accent-normal,
.dashboard-date.normal {
  border-color: #c4ddd6;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.75), transparent 35%),
    linear-gradient(180deg, #ffffff, #f4fbf8);
}

.snapshot-card.missing,
.dashboard-date.missing {
  border-color: #d5d9dc;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.68), transparent 35%),
    linear-gradient(180deg, #f6f7f8, #eceff1);
  box-shadow: 0 10px 24px rgba(94, 105, 112, 0.05);
}

.snapshot-card.missing::before,
.dashboard-date.missing::before {
  background: linear-gradient(180deg, rgba(118, 131, 139, 0.28), rgba(118, 131, 139, 0.06));
}

.snapshot-card.missing .dashboard-icon,
.dashboard-date.missing .dashboard-icon {
  background: #e4e8eb;
  color: #6d767d;
}

.snapshot-card.missing span,
.dashboard-date.missing span,
.snapshot-card.missing strong,
.dashboard-date.missing strong,
.snapshot-card.missing small,
.dashboard-date.missing small {
  color: #5f696f;
}

.snapshot-card::before,
.dashboard-date::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.22), rgba(15, 118, 110, 0.02));
}

.snapshot-card.highlight::before {
  background: linear-gradient(180deg, rgba(194, 123, 56, 0.28), rgba(194, 123, 56, 0.06));
}

.snapshot-card.accent-urgent::before,
.dashboard-date.urgent::before {
  background: linear-gradient(180deg, rgba(179, 130, 44, 0.3), rgba(179, 130, 44, 0.08));
}

.snapshot-card.accent-overdue::before,
.dashboard-date.overdue::before {
  background: linear-gradient(180deg, rgba(187, 63, 63, 0.34), rgba(187, 63, 63, 0.08));
}

.snapshot-card.accent-normal::before,
.dashboard-date.normal::before {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.22), rgba(15, 118, 110, 0.02));
}

.snapshot-card-head {
  display: contents;
}

.dashboard-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #e7f6f2;
  color: var(--teal);
  flex: 0 0 auto;
  line-height: 1;
  text-align: center;
}

.dashboard-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* SVG icons used inline (no background box) */
.inline-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -3px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.workflow-icon {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.dashboard-icon.large {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.dashboard-icon.large svg {
  width: 24px;
  height: 24px;
}

.home-button .dashboard-icon.large {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.home-button .dashboard-icon.large svg {
  width: 18px;
  height: 18px;
}

.snapshot-card-head .dashboard-icon {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
  justify-self: center;
  margin-top: 0;
}

.snapshot-card .dashboard-icon,
.dashboard-date .dashboard-icon {
  align-self: center;
}

.snapshot-card-head span {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  padding-top: 1px;
}

.snapshot-card span,
.dashboard-date span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 860;
  text-transform: uppercase;
}

.snapshot-card strong,
.dashboard-date strong {
  grid-column: 2;
  grid-row: 2;
  display: block;
  margin-top: 0;
  overflow-wrap: anywhere;
  font-size: 1.12rem;
  line-height: 1.12;
  letter-spacing: 0;
  color: #13231c;
}

.snapshot-card small,
.dashboard-date small {
  grid-column: 2;
  grid-row: 3;
  display: inline-flex;
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #5d736b;
  line-height: 1.35;
  width: auto;
  box-shadow: none;
}

.hero-mini {
  min-height: 68px;
  padding: 8px 10px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(24, 42, 37, 0.05);
  align-items: center;
  grid-template-columns: 30px minmax(0, 1fr);
}

.hero-mini.deadline-feature {
  min-height: 72px;
  padding: 9px 11px;
  border-color: #d56b6b;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(180deg, #ffe5e5, #ffd3d3);
  box-shadow: 0 14px 28px rgba(171, 70, 70, 0.14);
}

.hero-mini.deadline-feature::before {
  background: linear-gradient(180deg, rgba(187, 63, 63, 0.34), rgba(187, 63, 63, 0.08));
}

.hero-mini.deadline-feature .dashboard-icon {
  background: #ffd8d8;
  color: #a93d3d;
}

.hero-mini .dashboard-icon {
  width: 30px;
  height: 30px;
}

.hero-mini .dashboard-icon.material-symbols-outlined {
  font-size: 16px;
}

.hero-mini strong {
  font-size: 0.9rem;
  line-height: 1.05;
  margin-top: 1px;
}

.hero-mini small {
  font-size: 0.72rem;
  opacity: 0.92;
}

.competition-summary {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #d9e3dd;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.05), transparent 34%),
    linear-gradient(180deg, #fbfdfc, #ffffff);
  box-shadow: 0 16px 34px rgba(24, 42, 37, 0.06);
}

.continue-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.continue-btn {
  min-width: 240px;
}

.summary-board {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.summary-overview {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid #d8e2dc;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 38%),
    linear-gradient(180deg, #ffffff, #f7fbf9);
  box-shadow: 0 12px 28px rgba(24, 42, 37, 0.05);
  position: sticky;
  top: 16px;
}

.summary-overview-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.summary-overview-head h3 {
  margin: 4px 0 0;
  font-size: 1.28rem;
  line-height: 1.12;
  color: #13231c;
  letter-spacing: -0.02em;
}

.summary-overview-head .dashboard-icon {
  width: 46px;
  height: 46px;
  font-size: 24px;
}

.summary-overview p {
  margin: 0;
  color: #2a3b34;
  line-height: 1.55;
}

.summary-overview-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #375148;
}

.summary-tabs {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.summary-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.summary-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #d9e3dd;
  border-radius: 999px;
  background: #fff;
  color: #2a3b34;
  font-weight: 820;
  box-shadow: 0 8px 18px rgba(24, 42, 37, 0.04);
}

.summary-tab .dashboard-icon {
  width: 28px;
  height: 28px;
  font-size: 18px;
  background: #eef5f2;
}

.summary-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.16);
}

.summary-tab.active .dashboard-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.summary-tabpanel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d9e3dd;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfcfb);
  box-shadow: 0 12px 28px rgba(24, 42, 37, 0.05);
  min-width: 0;
}

.summary-tabpanel-head {
  display: grid;
  gap: 4px;
}

.summary-tabpanel-head p {
  margin: 0;
  color: #2a3b34;
  line-height: 1.45;
}

.summary-panel-body {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.summary-panel-body .summary-card {
  min-height: 100%;
}

.summary-panel-body .summary-card:first-child {
  position: sticky;
  top: 16px;
  align-self: start;
}

.summary-panel-body .summary-card:not(:first-child) {
  grid-column: 2;
}

.summary-panel-body .summary-card:first-child ul li {
  line-height: 1.38;
}

.summary-panel-body .summary-card:first-child .summary-card-head {
  margin-bottom: 4px;
}

.summary-panel-body .summary-card:first-child .summary-strap {
  white-space: normal;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.summary-empty {
  border-style: dashed;
  box-shadow: none;
}

.summary-card {
  display: grid;
  gap: 12px;
  padding: 18px 18px 18px 20px;
  border: 1px solid #d8e2dc;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.68), transparent 34%),
    linear-gradient(180deg, #ffffff, #f9fbfa);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.summary-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(7, 59, 76, 0.14);
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.22), rgba(15, 118, 110, 0.02));
}

.summary-card.summary-competition-purpose::before,
.summary-card.summary-strategic-bid-implications::before {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.28), rgba(15, 118, 110, 0.04));
}

.summary-card.summary-what-will-not-be-funded::before {
  background: linear-gradient(180deg, rgba(194, 123, 56, 0.3), rgba(194, 123, 56, 0.06));
}

.summary-card.summary-eligibility::before,
.summary-card.summary-funding-and-project-constraints::before {
  background: linear-gradient(180deg, rgba(44, 93, 159, 0.28), rgba(44, 93, 159, 0.06));
}

.summary-card.summary-assessment-and-application-structure::before {
  background: linear-gradient(180deg, rgba(120, 92, 171, 0.28), rgba(120, 92, 171, 0.06));
}

.summary-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.summary-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.15;
  color: #13231c;
  letter-spacing: -0.02em;
}

.summary-strap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef5f2;
  color: #48655d;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.summary-card ul {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 8px;
  list-style: none;
  min-width: 0;
}

.summary-card li {
  position: relative;
  padding-left: 16px;
  line-height: 1.48;
  color: #2a3b34;
}

.summary-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.36);
}

.summary-competition-purpose,
.summary-strategic-bid-implications {
  border-left: 3px solid var(--primary);
  background: #f5fbf9;
}

.summary-what-will-not-be-funded {
  border-left: 3px solid #c27b38;
  background: #fffaf3;
}

.summary-funding-and-project-constraints {
  border-left: 3px solid #2c5d9f;
  background: #f6f9ff;
}

.mini-bars {
  display: grid;
  gap: 8px;
  margin: 4px 0;
}

.partner-ask {
  padding: 10px;
  border-radius: 8px;
  background: #f5f0e8;
  color: #59412a;
  font-size: 0.86rem;
  line-height: 1.4;
}

.score {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #d7f0ec;
  color: #12332d;
  font-weight: 820;
  font-size: 0.78rem;
}

.error {
  color: #8b2024;
  font-weight: 760;
}

pre {
  white-space: pre-wrap;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
}

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

.partner-finder {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px minmax(280px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fcfb, #ffffff);
}

.partner-find-button {
  min-width: 130px;
  white-space: nowrap;
}

.partner-finder p {
  margin: 3px 0 0;
}

.selected-partner-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.selected-partner-strip span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f6f2;
  color: #0f5f56;
  font-size: 0.82rem;
  font-weight: 680;
}

.partner-column {
  display: grid;
  align-content: start;
  gap: 8px;
}

.partner-column h3 {
  margin-bottom: 0;
}

.partner-column p {
  margin-bottom: 2px;
}

.partner-column.sme .partner-type-pill.type-sme,
.partner-type-pill.type-sme {
  background: #dcefff;
  color: #0f4c7a;
}

.partner-column.university .partner-type-pill.type-university,
.partner-type-pill.type-university {
  background: #eef2ff;
  color: var(--indigo);
}

.partner-column.rto .partner-type-pill.type-rto,
.partner-type-pill.type-rto {
  background: #e7f6f2;
  color: #0f5f56;
}

.partner-tile {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.partner-tile.selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.partner-tile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.partner-tile-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.partner-tile-title strong,
.partner-tile-title small {
  overflow-wrap: anywhere;
}

.partner-expand {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.partner-tile-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.partner-tile-body label:nth-last-child(-n + 3),
.partner-tile-body .button {
  grid-column: 1 / -1;
}

.partner-tile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.partner-tile-actions .circle-action {
  width: 30px;
  height: 30px;
  font-size: 1rem;
}

.partner-tile input.score-input {
  width: 72px;
  justify-self: end;
}

.partner-tile .inline-title {
  height: 34px;
}

.partner-tile .compact-textarea {
  min-height: 62px;
}

.team-module {
  display: grid;
  gap: 20px;
}

.team-page {
  gap: 18px;
}

.team-page .module-page-head {
  align-items: flex-start;
}

.team-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: min(360px, 100%);
  flex: 1 1 360px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: #fff;
}

.team-search input {
  width: 100%;
  border: 0;
  background: transparent;
}

.team-toolbar-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.team-toolbar-filters select {
  min-width: 180px;
  min-height: 44px;
  border-radius: 14px;
}

.team-tabs-modern-bar {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(7, 59, 76, 0.08);
}

.team-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.team-panel-head h3 {
  margin: 4px 0 0;
}

.team-topbar,
.team-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.team-topbar {
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: linear-gradient(180deg, #fbfefe, #f4f9f7);
  border-radius: 16px;
  padding: 12px;
}

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

.team-tabs button {
  border: 1px solid rgba(7, 59, 76, 0.14);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 8px 13px;
  color: #33534c;
  font-weight: 560;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.team-tabs button:hover {
  border-color: rgba(7, 59, 76, 0.25);
  background: #fff;
  transform: translateY(-1px);
}

.team-tabs button.active {
  background: #073b4c;
  color: #fff;
  border-color: #073b4c;
}

.team-topbar .circle-action,
.team-profile-editor .circle-action.team-inline-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
}

.team-topbar .circle-action .dashboard-icon,
.team-topbar .circle-action svg,
.team-profile-editor .circle-action.team-inline-icon .dashboard-icon,
.team-profile-editor .circle-action.team-inline-icon svg {
  width: 17px;
  height: 17px;
  min-width: 17px;
  display: block;
  margin: 0;
  flex: 0 0 17px;
}

.team-topbar .circle-action .dashboard-icon,
.team-profile-editor .circle-action.team-inline-icon .dashboard-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-topbar .circle-action.add {
  font-size: 1.35rem;
  font-weight: 500;
}

.team-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.team-metric {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(7, 59, 76, 0.1);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, rgba(46, 125, 106, 0.05));
  padding: 16px;
  box-shadow: 0 10px 24px rgba(7, 59, 76, 0.05);
}

.team-metric span,
.team-member-card small,
.team-member-card em {
  display: block;
  color: #667773;
  font-size: 0.82rem;
}

.team-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 1.7rem;
  color: #0f252d;
  font-weight: 640;
}

.team-metric.danger {
  background: linear-gradient(145deg, #fff, rgba(208, 38, 49, 0.08));
  border-color: rgba(208, 38, 49, 0.26);
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.6fr);
  gap: 18px;
}

.team-overview-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(380px, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.team-overview-directory,
.team-overview-aside {
  display: grid;
  gap: 16px;
}

.team-layout-modern {
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.8fr);
  align-items: start;
}

.team-profiles-layout {
  grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr);
  align-items: start;
}

.team-profiles-panel {
  border: 1px solid rgba(7, 59, 76, 0.1);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.team-profiles-table-panel {
  padding: 18px;
}

.team-directory-table-wrap {
  overflow: auto;
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 16px;
  background: #fff;
}

.team-directory-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.team-directory-table th,
.team-directory-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(7, 59, 76, 0.08);
  vertical-align: middle;
  text-align: left;
}

.team-directory-table th {
  font-size: 0.8rem;
  font-weight: 560;
  color: rgba(7, 59, 76, 0.58);
  background: rgba(248, 251, 255, 0.8);
}

.team-directory-table tbody tr {
  cursor: pointer;
  transition: background 140ms ease;
}

.team-directory-table tbody tr:hover,
.team-directory-table tbody tr.active {
  background: rgba(111, 103, 255, 0.04);
}

.team-table-member {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.team-table-member strong {
  display: block;
  font-weight: 610;
}

.team-table-member small {
  display: block;
  color: rgba(7, 59, 76, 0.58);
}

.team-role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(111, 103, 255, 0.12);
  color: #5d59ff;
  font-size: 0.8rem;
  font-weight: 540;
}

.team-skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-skill-chips span,
.muted-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(75, 123, 174, 0.1);
  color: #335c85;
  font-size: 0.78rem;
  font-weight: 520;
}

.muted-chip {
  background: rgba(7, 59, 76, 0.06);
  color: rgba(7, 59, 76, 0.55);
}

.team-availability-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.team-availability-pill.high {
  background: rgba(46, 125, 106, 0.12);
  color: #1a8a68;
}

.team-availability-pill.medium {
  background: rgba(216, 138, 40, 0.14);
  color: #cf7f1d;
}

.team-availability-pill.low {
  background: rgba(208, 38, 49, 0.12);
  color: #cf4050;
}

.team-profiles-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-profiles-head h3 {
  margin: 0;
}

.team-profiles-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-profiles-tools input {
  width: 100%;
}

.team-profile-head-modern {
  align-items: flex-start;
  grid-template-columns: auto minmax(0, 1fr) auto;
  row-gap: 10px;
}

.team-profile-identity h3 {
  margin: 0;
}

.team-profile-status {
  margin-left: auto;
  text-align: right;
}

.team-profile-status small {
  color: #667773;
}

.team-profile-status strong {
  display: block;
}

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

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

.team-subtabs button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(7, 59, 76, 0.12);
  background: #fff;
  color: #48625c;
  font-weight: 520;
}

.team-subtabs button.active {
  background: rgba(7, 59, 76, 0.08);
  color: #103b4c;
  border-color: rgba(7, 59, 76, 0.18);
}

.team-quick-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-quick-signals span {
  border: 1px solid rgba(7, 59, 76, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  font-size: 0.8rem;
  color: #37514a;
}

.team-workspace-cards {
  display: grid;
  gap: 12px;
}

.team-work-card {
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.team-work-card h4 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 620;
}

.team-upload-dropzone {
  border: 1px dashed rgba(7, 59, 76, 0.3);
  border-radius: 10px;
  background: #f9fcfb;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 2px;
}

.team-upload-dropzone small {
  color: #667773;
}

.team-evidence-cards {
  display: grid;
  gap: 8px;
}

.team-evidence-card {
  border: 1px solid rgba(7, 59, 76, 0.12);
  border-radius: 10px;
  background: #f8fbfa;
  padding: 8px 10px;
}

.team-bio-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-bio-card {
  border: 1px solid rgba(7, 59, 76, 0.1);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.team-redirect-panel {
  display: grid;
  gap: 12px;
}

.team-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.team-list.compact {
  max-height: 760px;
  overflow: auto;
}

.team-member-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  text-align: left;
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: linear-gradient(180deg, #ffffff, #f8fcfb);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-inline);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background-color var(--transition-base);
}

.team-member-card:hover {
  transform: translateY(-1px);
  border-color: rgba(7, 59, 76, 0.2);
  box-shadow: 0 14px 24px rgba(7, 59, 76, 0.08);
}

.team-member-card.active {
  border-color: #073b4c;
  box-shadow: 0 14px 30px rgba(7, 59, 76, 0.14);
}

.team-member-card span:not(.team-avatar) {
  min-width: 0;
}

.team-member-card strong {
  display: block;
  white-space: normal;
  line-height: 1.2;
}

.team-member-card em {
  grid-column: 2;
  font-style: normal;
}

.team-member-meta {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(7, 59, 76, 0.1);
  color: #073b4c;
  font-weight: 800;
  overflow: hidden;
}

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

.team-insight,
.team-profile-editor,
.team-empty,
.team-matrix-wrap,
.team-gap-board,
.team-evidence-board,
.team-coverage-grid {
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: linear-gradient(180deg, #ffffff, #f8fcfb);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.team-context-rail {
  position: sticky;
  top: 14px;
  align-self: start;
}

.team-context-card,
.question-context-card,
.risk-context-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: #fff;
  box-shadow: var(--shadow-inline);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.team-context-card:hover,
.question-context-card:hover,
.risk-context-card:hover,
.crm-insight-panel:hover {
  border-color: rgba(7, 59, 76, 0.14);
  box-shadow: var(--shadow-card);
}

.team-tab-shell {
  display: grid;
  gap: 16px;
}

.team-empty.state-surface,
.summary-empty.state-surface,
.crm-empty-state.state-surface,
.crm-loading-state.state-surface {
  width: 100%;
}

.team-empty.state-surface .state-surface-copy {
  gap: 10px;
}

.team-spotlight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.team-spotlight-identity {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.team-spotlight-identity h3 {
  margin: 4px 0 0;
}

@media (max-width: 640px) {
  .state-surface {
    grid-template-columns: 1fr;
  }

  .state-surface-visual {
    width: 40px;
    height: 40px;
  }

  .state-surface-head {
    flex-wrap: wrap;
  }

  .data-surface-toolbar,
  .tanstack-toolbar,
  .data-surface-bulkbar,
  .ai-transparency-head {
    padding: 12px;
  }

  .data-surface-toolbar-primary,
  .data-surface-toolbar-secondary,
  .data-surface-actions,
  .data-surface-bulkbar-actions,
  .data-surface-filters,
  .ai-transparency-grid {
    width: 100%;
  }

  .ai-transparency-grid {
    grid-template-columns: 1fr;
  }

  .data-surface-actions .button,
  .data-surface-bulkbar-actions .button {
    flex: 1 1 160px;
    justify-content: center;
  }

  .data-surface-filter {
    width: 100%;
  }

  .data-surface-filter select {
    width: 100%;
    min-width: 0;
  }
}

.team-spotlight-actions {
  margin: 12px 0;
}

.team-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.team-summary-card {
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.team-summary-card strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 650;
  line-height: 1;
  margin-bottom: 6px;
}

.team-summary-card span {
  display: block;
  color: #61726f;
  font-size: 0.86rem;
}

.team-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 14px 0;
}

.team-card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.team-gap-list {
  display: grid;
  gap: 10px;
}

.team-gap-inline {
  border-radius: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(7, 59, 76, 0.1);
  background: #fff;
  display: grid;
  gap: 5px;
}

.team-gap-inline.critical {
  border-color: rgba(208, 38, 49, 0.28);
  background: rgba(208, 38, 49, 0.06);
}

.team-gap-inline.warning {
  border-color: rgba(216, 138, 40, 0.3);
  background: rgba(216, 138, 40, 0.08);
}

.team-gap-inline.info {
  border-color: rgba(75, 123, 174, 0.24);
  background: rgba(75, 123, 174, 0.07);
}

.team-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(7, 59, 76, 0.1);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.team-subtabs button {
  border: 1px solid rgba(7, 59, 76, 0.12);
  background: #fff;
  color: #3b5550;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 560;
}

.team-subtabs button.active {
  background: rgba(7, 59, 76, 0.08);
  border-color: rgba(7, 59, 76, 0.25);
  color: #073b4c;
}

.team-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.team-chip-row span {
  border-radius: 999px;
  background: rgba(46, 125, 106, 0.12);
  color: #073b4c;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.team-form-grid,
.team-bio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-form-grid label,
.team-bio-grid label {
  display: grid;
  gap: 6px;
  color: #384846;
  font-weight: 500;
}

.team-form-grid input,
.team-form-grid textarea,
.team-bio-grid textarea,
.team-matrix input,
.team-matrix select {
  width: 100%;
}

.team-form-grid textarea {
  min-height: 82px;
}

.team-span {
  grid-column: 1 / -1;
}

.team-url-field {
  grid-column: span 2;
}

.team-url-field span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
}

.team-bio-grid {
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-bio-grid textarea {
  min-height: 150px;
}

.mini-button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  background: rgba(7, 59, 76, 0.09);
  color: #073b4c;
  padding: 5px 9px;
  font-size: 0.78rem;
}

.team-matrix-wrap {
  overflow: auto;
}

.team-matrix {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1180px;
  width: 100%;
}

.team-matrix th,
.team-matrix td {
  border-bottom: 1px solid rgba(7, 59, 76, 0.1);
  padding: 9px;
  vertical-align: top;
}

.team-matrix th {
  position: sticky;
  top: 0;
  background: #f7faf9;
  z-index: 1;
  text-align: left;
}

.team-matrix tbody th {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
  min-width: 180px;
}

.team-matrix select {
  min-width: 120px;
}

.team-matrix input {
  margin-top: 6px;
  min-width: 180px;
}

.team-matrix td.level-none {
  background: rgba(11, 11, 12, 0.05);
}

.team-matrix td.level-basic {
  background: rgba(216, 138, 40, 0.12);
}

.team-matrix td.level-competent {
  background: rgba(75, 123, 174, 0.12);
}

.team-matrix td.level-strong {
  background: rgba(46, 125, 106, 0.13);
}

.team-matrix td.level-expert {
  background: rgba(7, 59, 76, 0.16);
}

.team-matrix select.level-none {
  border-color: rgba(11, 11, 12, 0.26);
}

.team-matrix select.level-basic {
  border-color: rgba(216, 138, 40, 0.55);
}

.team-matrix select.level-competent {
  border-color: rgba(75, 123, 174, 0.58);
}

.team-matrix select.level-strong {
  border-color: rgba(46, 125, 106, 0.58);
}

.team-matrix select.level-expert {
  border-color: rgba(7, 59, 76, 0.62);
}

.team-coverage-grid,
.team-gap-board,
.team-evidence-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.team-evidence-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.team-evidence-head h3 {
  margin: 0;
}

.team-evidence-head p {
  margin: 3px 0 0;
}

.team-member-modal {
  width: min(780px, 100%);
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
}

.team-member-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.team-member-modal-head h3 {
  margin: 4px 0 0;
  font-size: 1.55rem;
}

.team-member-modal-form {
  display: grid;
  gap: 18px;
}

.team-member-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.team-member-modal-grid label {
  display: grid;
  gap: 6px;
  color: #384846;
  font-weight: 500;
}

.team-member-modal-grid textarea {
  min-height: 92px;
}

.team-member-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(7, 59, 76, 0.08);
  padding-top: 16px;
}

.team-member-modal-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #58706a;
  font-size: 0.92rem;
}

.coverage-card,
.gap-card,
.evidence-person {
  border: 1px solid rgba(7, 59, 76, 0.12);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.coverage-card.covered,
.gap-card.good {
  border-color: rgba(46, 125, 106, 0.32);
  background: rgba(46, 125, 106, 0.08);
}

.gap-card.critical {
  border-color: rgba(208, 38, 49, 0.35);
  background: rgba(208, 38, 49, 0.08);
}

.gap-card.warning {
  border-color: rgba(216, 138, 40, 0.36);
  background: rgba(216, 138, 40, 0.1);
}

.gap-card.info {
  border-color: rgba(75, 123, 174, 0.28);
  background: rgba(75, 123, 174, 0.08);
}

.evidence-person ul,
.team-insight ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.empty-column {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.pipeline-strip,
.finance-hero,
.radar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.pipeline-strip > div,
.finance-hero > div,
.radar-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pipeline-strip strong,
.finance-hero strong,
.radar-card strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 1.1rem;
}

.partner-grid > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.wp-list {
  display: grid;
  gap: 12px;
}

.wp-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.editable-wp-card {
  grid-template-columns: minmax(210px, 0.8fr) repeat(3, minmax(180px, 1fr));
}

.editable-list {
  display: grid;
  align-content: start;
  gap: 7px;
}

.editable-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.circle-action {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.circle-action.small {
  width: 28px;
  height: 28px;
  font-size: 1rem;
}

.circle-action.tiny {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  font-size: 0.88rem;
}

.circle-action.add {
  border-color: #b7d6ce;
  background: #e7f6f2;
  color: var(--teal);
}

.circle-action.delete {
  border-color: #e5c3bb;
  background: #fff1ee;
  color: var(--coral);
}

.editable-list-row,
.wp-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editable-list-row input {
  flex: 1;
  min-width: 0;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 70px 70px auto;
}

.task-row label {
  gap: 3px;
  font-size: 0.68rem;
}

.task-row label input {
  width: 100%;
}

.editable-list input {
  height: 34px;
  padding: 0 9px;
  background: #f8faf8;
}

.month-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.month-inputs label {
  gap: 4px;
  font-size: 0.72rem;
}

.month-inputs input {
  height: 34px;
}

.plan-actions,
.output-actions {
  margin-bottom: 12px;
  align-items: center;
}

.output-page {
  display: grid;
  gap: 18px;
}

.output-table-card {
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(75, 123, 174, 0.06);
}

.output-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.output-summary-table th,
.output-summary-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(7, 59, 76, 0.08);
  text-align: left;
}

.output-summary-table th {
  font-size: 0.8rem;
  font-weight: 560;
  color: rgba(7, 59, 76, 0.56);
  background: rgba(248, 251, 255, 0.78);
}

.output-table-name {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.output-table-name strong {
  display: block;
  font-weight: 610;
}

.output-table-name small {
  display: block;
  color: rgba(7, 59, 76, 0.56);
}

.wp-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  font-weight: 820;
}

.tab.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.tab span {
  margin-left: 6px;
  opacity: 0.8;
}

.bid-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.5fr);
  gap: 16px;
}

.question-workbench {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: start;
}

.question-index {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfb;
}

.question-index-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.question-nav-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.question-nav-card .question-nav-main {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
  cursor: pointer;
}

.question-nav-card .question-nav-main > span {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.question-nav-card .question-nav-main strong {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.18;
}

.question-nav-card .question-nav-main small {
  color: var(--muted);
  font-size: 0.76rem;
}

.question-nav-card.active {
  border-color: rgba(15, 118, 110, 0.34);
  background: #f2fbf8;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.1);
}

.question-nav-card.done .question-nav-main > span {
  background: #d7f0ec;
  color: #0f5f56;
}

.question-editor {
  min-width: 0;
}

.question-prompt-panel {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fcfa;
}

.question-prompt-copy p {
  margin: 6px 0 0;
  color: var(--muted);
}

.question-prompt-box {
  min-height: 104px;
  resize: vertical;
}

.question-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.question-score-panel {
  position: sticky;
  top: 14px;
}

.question-context-rail {
  display: grid;
  gap: 12px;
}

.answer-box {
  min-height: 420px;
}

.score-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
}

.score-panel .score-ring {
  margin-bottom: 14px;
}

.finance-bars {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.concept-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.35fr);
  gap: 16px;
}

.evidence-bank {
  display: grid;
  gap: 9px;
}

.evidence-bank > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  background: var(--soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 620;
  letter-spacing: 0.03em;
}

.risk-table th {
  position: relative;
  padding-right: 18px;
}

.risk-table th span {
  display: block;
  white-space: pre-line;
}

.risk-table .column-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: col-resize;
}

.risk-table .column-resizer:hover,
.risk-table .column-resizer:active {
  background: rgba(15, 118, 110, 0.12);
}

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

.risk-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 16px;
  align-items: start;
}

.risk-context-rail {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 14px;
}

.risk-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.risk-card.high {
  color: #fff;
  background: #a63d40;
}

.risk-card.medium {
  background: #fff3d6;
}

.risk-card.low {
  background: #def1e6;
}

.risk-table table {
  min-width: 2500px;
  table-layout: fixed;
}

.risk-table td,
.risk-table th {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.risk-table td textarea,
.risk-table td input {
  min-width: 0;
}

.risk-table th:nth-child(1),
.risk-table td:nth-child(1) { width: 48px; text-align: center; }
.risk-table th:nth-child(2),
.risk-table td:nth-child(2) { width: 96px; }
.risk-table th:nth-child(3),
.risk-table td:nth-child(3) { width: 140px; }
.risk-table th:nth-child(4),
.risk-table td:nth-child(4) { width: 180px; }
.risk-table th:nth-child(5),
.risk-table td:nth-child(5) { width: 280px; }
.risk-table th:nth-child(6),
.risk-table td:nth-child(6) { width: 120px; }
.risk-table th:nth-child(7),
.risk-table td:nth-child(7),
.risk-table th:nth-child(8),
.risk-table td:nth-child(8),
.risk-table th:nth-child(9),
.risk-table td:nth-child(9),
.risk-table th:nth-child(10),
.risk-table td:nth-child(10),
.risk-table th:nth-child(12),
.risk-table td:nth-child(12),
.risk-table th:nth-child(13),
.risk-table td:nth-child(13),
.risk-table th:nth-child(14),
.risk-table td:nth-child(14),
.risk-table th:nth-child(15),
.risk-table td:nth-child(15) { width: 96px; text-align: center; }
.risk-table th:nth-child(11),
.risk-table td:nth-child(11) { width: 300px; }
.risk-table th:nth-child(16),
.risk-table td:nth-child(16) { width: 160px; }
.risk-table th:nth-child(17),
.risk-table td:nth-child(17) { width: 180px; }
.risk-table th:nth-child(18),
.risk-table td:nth-child(18) { width: 56px; text-align: center; }

.risk-table input,
.risk-table textarea {
  min-width: 0;
  width: 100%;
  border-color: transparent;
  background: #f8faf8;
}

.risk-table textarea {
  min-height: 74px;
  resize: vertical;
}

.risk-table .risk-textarea {
  min-height: 90px;
}

.risk-table tr.risk-high {
  background: rgba(166, 61, 64, 0.08);
}

.risk-table tr.risk-medium {
  background: rgba(255, 243, 214, 0.52);
}

.risk-table tr.risk-low {
  background: rgba(222, 241, 230, 0.64);
}

.risk-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 900;
}

.risk-chip.high {
  background: #a63d40;
  color: #fff;
}

.risk-chip.medium {
  background: #e29d26;
  color: #1f1606;
}

.risk-chip.low {
  background: #1f7a54;
  color: #fff;
}

.risk-rating {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
}

.risk-rating.high {
  background: #a63d40;
  color: #fff;
}

.risk-rating.medium {
  background: #e29d26;
  color: #1f1606;
}

.risk-rating.low {
  background: #1f7a54;
  color: #fff;
}

.question-guidance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
}

.question-guidance p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.word-counter {
  display: grid;
  gap: 6px;
  align-content: start;
}

.word-counter strong {
  font-size: 1.15rem;
}

.question-heading {
  margin-bottom: 12px;
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1.25;
}

.question-heading strong {
  font-weight: 900;
}

.question-meta-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.question-meta-controls label {
  display: grid;
  gap: 6px;
  min-width: 170px;
  color: var(--muted);
  font-size: 0.82rem;
}

.question-definition-editor {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.question-title-field,
.question-guidance-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.question-guidance-field textarea {
  min-height: 110px;
  resize: vertical;
}

.appendix-notes {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.appendix-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff4df;
  color: #6c4306;
  border: 1px solid #f0b04f;
  font-weight: 700;
}

.appendix-note span:first-child {
  font-size: 1rem;
  line-height: 1;
}

.gantt-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.gantt-toolbar-actions .circle-action {
  display: inline-grid;
  place-items: center;
}

.gantt-toolbar-actions .circle-action .dashboard-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: transparent;
}

.gantt-planner-shell {
  --gantt-meta-width: 430px;
  --gantt-month-width: 54px;
  position: relative;
  min-width: calc(var(--gantt-meta-width) + (var(--months, 12) * var(--gantt-month-width)));
  overflow-x: auto;
}

.gantt-planner {
  min-width: calc(var(--gantt-meta-width) + (var(--months, 12) * var(--gantt-month-width)));
  display: grid;
  gap: 8px;
}

.gantt-meta-resizer {
  position: absolute;
  top: 28px;
  bottom: 0;
  left: calc(var(--gantt-meta-width) - 4px);
  width: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: col-resize;
  z-index: 3;
}

.gantt-meta-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(7, 59, 76, 0.08);
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.gantt-meta-resizer:hover::before,
.gantt-meta-resizer:focus-visible::before {
  background: rgba(7, 59, 76, 0.22);
  box-shadow: 0 0 0 4px rgba(7, 59, 76, 0.08);
}

.gantt-block {
  display: grid;
  gap: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.gantt-month-header {
  display: grid;
  grid-template-columns: var(--gantt-meta-width) repeat(var(--months, 12), minmax(var(--gantt-month-width), var(--gantt-month-width)));
  gap: 2px;
  align-items: center;
}

.gantt-month-header::before {
  content: "Work package";
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.gantt-month-header span {
  display: grid;
  min-height: 26px;
  place-items: center;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  min-width: var(--gantt-month-width);
}

.gantt-lane {
  display: grid;
  grid-template-columns: var(--gantt-meta-width) minmax(calc(var(--months, 12) * var(--gantt-month-width)), 1fr);
  gap: 4px;
  align-items: stretch;
}

.gantt-lane-meta {
  display: grid;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.gantt-title-editor {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  max-height: 38px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.2;
  resize: none;
  overflow: hidden;
  white-space: normal;
}

.gantt-title-editor:focus {
  outline: 0;
}

.gantt-title-editor.wp-title {
  min-height: 42px;
  max-height: 42px;
  font-weight: 620;
  line-height: 1.18;
}

.wp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wp-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wp-add-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1;
}

.wp-add-chip span,
.wp-add-chip small {
  display: block;
  line-height: 1;
}

.wp-add-chip span {
  font-size: 0.9rem;
  font-weight: 900;
  transform: translateY(1px);
}

.wp-add-chip small {
  margin-top: -1px;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.wp-card-actions .circle-action.delete.small {
  align-self: center;
}

.wp-meta-inline {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.wp-owner-select {
  display: grid;
  gap: 2px;
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.wp-owner-select select {
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: 0.9rem;
}

.gantt-lane-meta .month-inputs {
  gap: 6px;
  margin-top: 4px;
}

.gantt-lane-meta .month-inputs label {
  gap: 2px;
  font-size: 0.66rem;
}

.gantt-lane-meta .month-inputs input {
  height: 28px;
  padding: 0 8px;
  font-size: 0.9rem;
}

.gantt-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--months, 12), minmax(var(--gantt-month-width), var(--gantt-month-width)));
  gap: 2px;
  min-height: 46px;
  padding: 6px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: repeating-linear-gradient(
    90deg,
    #fff 0,
    #fff var(--gantt-month-width),
    #f2f5f2 var(--gantt-month-width),
    #f2f5f2 calc(var(--gantt-month-width) + 2px)
  );
}

.gantt-bar {
  grid-row: 1;
  align-self: center;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--blue));
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
  cursor: grab;
}

.gantt-marker {
  z-index: 1;
  grid-row: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(31, 46, 38, 0.2);
  cursor: grab;
}

.gantt-marker.deliverable {
  background: var(--blue);
}

.gantt-marker.milestone {
  background: var(--coral);
}

.gantt-month-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.gantt-subrows {
  display: grid;
  gap: 3px;
  margin-left: 18px;
}

.gantt-subrow {
  display: grid;
  grid-template-columns: calc(var(--gantt-meta-width) - 18px) minmax(calc(var(--months, 12) * var(--gantt-month-width)), 1fr);
  gap: 4px;
  align-items: center;
}

.gantt-subrow-label {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #34423a;
  font-size: 0.74rem;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  gap: 6px;
  justify-content: space-between;
}

.gantt-subrow-label .gantt-title-editor {
  flex: 1;
}

.gantt-subrow-label.task {
  border-left: 4px solid var(--teal);
}

.gantt-subrow-label.deliverable {
  border-left: 4px solid var(--blue);
}

.gantt-subrow-label.milestone {
  border-left: 4px solid var(--coral);
}

.gantt-subtrack {
  display: grid;
  grid-template-columns: repeat(var(--months, 12), minmax(var(--gantt-month-width), var(--gantt-month-width)));
  gap: 2px;
  min-height: 34px;
  align-items: center;
  border-radius: 4px;
  background: repeating-linear-gradient(
    90deg,
    #fafcfa 0,
    #fafcfa var(--gantt-month-width),
    var(--soft) var(--gantt-month-width),
    var(--soft) calc(var(--gantt-month-width) + 2px)
  );
}

.gantt-subitem {
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 999px;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 900;
}

.gantt-subitem.task {
  background: var(--teal);
}

.gantt-subitem.deliverable {
  background: var(--blue);
}

.gantt-subitem.milestone {
  background: var(--coral);
}

.gantt-task-bar {
  min-width: 24px;
  height: 18px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  cursor: grab;
}

.gantt-task-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 96px;
  flex: 0 0 96px;
}

.gantt-task-dates input {
  height: 24px;
  padding: 0 4px;
  text-align: center;
}

.gantt-task-dates label {
  display: grid;
  gap: 1px;
  font-size: 0.58rem;
  font-weight: 780;
  color: var(--muted);
  text-transform: uppercase;
}

.gantt-month-control {
  display: grid;
  width: 44px;
  flex: 0 0 44px;
  gap: 1px;
  font-size: 0.58rem;
  font-weight: 780;
  color: var(--muted);
  text-transform: uppercase;
}

.gantt-month-control input {
  height: 24px;
  padding: 0 4px;
  text-align: center;
}

.month-inputs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.month-inputs label {
  display: grid;
  gap: 2px;
  font-size: 0.64rem;
  font-weight: 780;
  color: var(--muted);
  text-transform: uppercase;
}

.month-inputs input {
  height: 28px;
  padding: 0 6px;
  text-align: center;
}

.download-hint {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7f4;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.editable-finance input {
  min-width: 120px;
  height: 34px;
  padding: 0 8px;
  border-color: transparent;
  background: #f8faf8;
}

.editable-risk-grid .risk-card label {
  color: inherit;
}

.risk-card.high input,
.risk-card.high textarea {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.92);
}

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

.export-room {
  border-color: #c6d6d1;
}

.template-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.template-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.template-card.ready {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.template-card span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 860;
  text-transform: uppercase;
}

.template-card strong {
  display: block;
  margin: 7px 0;
}

.template-card p {
  min-height: 58px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.input-studio {
  display: grid;
  gap: 10px;
}

.input-studio details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.input-studio summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 850;
}

.input-studio details[open] summary {
  border-bottom: 1px solid var(--line);
}

.input-studio details > .grid,
.input-studio details > .compact-grid,
.input-studio details > .table-wrap,
.output-mapping-grid {
  margin: 14px;
}

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

.mini-table {
  max-height: 360px;
  margin-top: 0;
}

.mini-table input {
  min-width: 110px;
  height: 34px;
  padding: 0 8px;
  border-color: transparent;
  background: #f8faf8;
}

.mini-table td {
  padding: 5px;
}

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

.mapping-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.mapping-row span,
.mapping-row small {
  color: var(--muted);
}

.output-card {
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 14px;
  min-width: 0;
  box-shadow: 0 14px 28px rgba(75, 123, 174, 0.06);
}

.output-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.output-card-top h4 {
  margin: 0;
  font-weight: 610;
}

.output-card pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  color: var(--muted);
  font-family: inherit;
  line-height: 1.5;
}

.output-editor {
  min-height: 360px;
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.settings-shell {
  display: grid;
  gap: 18px;
}

.ai-transparency-panel {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 12px 28px rgba(75, 123, 174, 0.06);
}

.ai-transparency-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-transparency-surface {
  flex: 1;
}

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

.ai-transparency-grid article {
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(246, 250, 255, 0.88);
  border: 1px solid rgba(7, 59, 76, 0.08);
}

.ai-transparency-grid ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.ai-transparency-grid li + li {
  margin-top: 6px;
}

.ai-transparency-grid p {
  margin: 8px 0 0;
}

.progressive-section {
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 10px 24px rgba(75, 123, 174, 0.05);
  overflow: hidden;
}

.progressive-section + .progressive-section {
  margin-top: 14px;
}

.progressive-section summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
}

.progressive-section summary::-webkit-details-marker {
  display: none;
}

.progressive-section summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.progressive-section summary strong {
  font-size: 0.98rem;
  font-weight: 620;
  color: var(--ink);
}

.progressive-section summary small {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.progressive-chevron {
  color: rgba(7, 59, 76, 0.46);
  font-size: 1rem;
  transition: transform 180ms ease;
}

.progressive-section[open] .progressive-chevron {
  transform: rotate(180deg);
}

.progressive-section-body {
  padding: 0 18px 18px;
  display: grid;
  gap: 14px;
}

.progressive-section[open] summary {
  border-bottom: 1px solid rgba(7, 59, 76, 0.08);
  background: rgba(245, 249, 255, 0.7);
}

.progressive-section.compact summary {
  padding: 14px 16px;
}

.progressive-section.compact .progressive-section-body {
  padding: 0 16px 16px;
  gap: 12px;
}

.settings-shell-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.settings-shell-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.settings-sidebar {
  border: 1px solid rgba(7, 59, 76, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 18px;
  display: grid;
  gap: 18px;
  box-shadow: 0 12px 28px rgba(75, 123, 174, 0.06);
}

.settings-sidebar-group {
  display: grid;
  gap: 6px;
}

.settings-sidebar-label {
  font-size: 0.78rem;
  font-weight: 620;
  color: rgba(7, 59, 76, 0.48);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.settings-sidebar-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(7, 59, 76, 0.74);
  font-weight: 540;
  text-align: left;
}

.settings-sidebar-item.active {
  background: rgba(111, 103, 255, 0.08);
  color: #5d59ff;
  border-color: rgba(111, 103, 255, 0.14);
}

.settings-main-panel {
  display: grid;
  gap: 18px;
}

.settings-surface {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(7, 59, 76, 0.08);
  background: #fff;
  box-shadow: 0 14px 28px rgba(75, 123, 174, 0.06);
}

.settings-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 280px;
  gap: 24px;
  align-items: start;
}

.settings-profile-form,
.settings-profile-photo {
  display: grid;
  gap: 14px;
}

.settings-profile-photo {
  justify-items: start;
}

.progressive-modal-head {
  margin-bottom: 12px;
}

.settings-profile-photo .avatar-badge,
.settings-profile-photo .team-avatar,
.settings-profile-photo .workspace-avatar {
  width: 88px;
  height: 88px;
}

.settings-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(7, 59, 76, 0.7);
}

.settings-checkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(7, 59, 76, 0.12);
  border-radius: 14px;
  background: rgba(247, 251, 253, 0.9);
}

.settings-checkbox span {
  font-weight: 600;
  color: rgba(7, 59, 76, 0.86);
}

.settings-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

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

.clickable {
  text-align: left;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .grid,
  .metric-grid,
  .cards-grid,
  .acronym-grid,
  .scorecard-grid,
  .partner-grid,
  .partner-finder,
  .output-grid,
  .template-map,
  .output-mapping-grid,
  .risk-grid,
  .pipeline-strip,
  .finance-hero,
  .radar-grid,
  .snapshot-grid,
  .key-date-strip,
  .competition-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wp-card,
  .editable-wp-card,
  .bid-grid,
  .question-workbench,
  .cockpit,
  .command-centre-shell,
  .concept-panel,
  .team-form {
    grid-template-columns: 1fr;
  }

  .command-centre-overview-grid,
  .command-centre-content-grid,
  .command-centre-review-head,
  .command-centre-review-row {
    grid-template-columns: 1fr;
  }

  .command-centre-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .command-centre-side {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .command-centre-review-head {
    display: none;
  }

  .command-centre-review-row {
    align-items: start;
    gap: 8px;
    padding: 16px;
  }

  .command-centre-review-row > span:not(.command-centre-question-title):not(.command-centre-score-cell) {
    justify-self: start;
  }

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

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

  .summary-board {
    grid-template-columns: 1fr;
  }

  .summary-overview {
    position: static;
    top: auto;
  }

  .summary-panel-body {
    grid-template-columns: 1fr;
  }

  .summary-panel-body .summary-card:first-child,
  .summary-panel-body .summary-card:not(:first-child) {
    position: static;
    top: auto;
    grid-column: auto;
  }

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

  .partner-finder {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    align-items: stretch;
  }

  .partner-finder > :first-child,
  .partner-finder input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .app-shell,
  .grid,
  .two-grid,
  .metric-grid,
  .cards-grid,
  .acronym-grid,
  .scorecard-grid,
  .partner-grid,
  .partner-finder,
  .question-workbench,
  .output-grid,
  .template-map,
  .output-mapping-grid,
  .risk-grid,
  .pipeline-strip,
  .finance-hero,
  .radar-grid,
  .timeline,
  .snapshot-grid,
  .key-date-strip,
  .competition-facts,
  .date-grid,
  .link-import-row {
    grid-template-columns: 1fr;
  }

  .section-top,
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    flex-direction: column;
  }

  .command-centre-head,
  .command-centre-ai-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .command-centre-head .button-row,
  .command-centre-head-main,
  .command-centre-head-meta,
  .command-centre-overview-head {
    width: 100%;
  }

  .command-centre-head .button-row,
  .command-centre-overview-head,
  .command-centre-head-meta {
    gap: 12px;
  }

  .command-centre-project-pill {
    width: 100%;
  }

  .command-centre-metric-grid {
    grid-template-columns: 1fr;
  }

  .command-centre-side {
    grid-template-columns: 1fr;
  }

  .command-centre-overview,
  .command-centre-head,
  .command-centre-question-review,
  .command-centre-middle-stack > .panel,
  .command-centre-side-card {
    padding: 18px;
  }

  .command-centre-head h1 {
    font-size: 2.2rem;
  }

  .command-centre-review-table,
  .command-centre-metric-card,
  .command-centre-ring-card {
    border-radius: 16px;
  }

  .command-centre-review-row {
    padding: 14px;
  }

  .command-centre-question-title {
    font-size: 0.98rem;
  }

  .command-centre-deadline-card strong {
    font-size: 1.5rem;
  }

  .command-centre-deadline-card,
  .command-centre-feed-row,
  .command-centre-risk-row {
    grid-template-columns: 1fr;
  }

  .deadline-pill {
    min-width: 0;
    width: 100%;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main {
    padding: 16px;
  }

  .competition-summary {
    padding: 16px;
    border-radius: 20px;
  }

  .summary-overview,
  .summary-tabpanel,
  .summary-card {
    padding: 16px;
    border-radius: 18px;
  }

  .summary-tablist {
    display: grid;
    grid-template-columns: 1fr;
  }

  .summary-tab {
    width: 100%;
    justify-content: flex-start;
    border-radius: 16px;
    padding: 12px 14px;
    min-width: 0;
  }

  .summary-tab span {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
  }

  .summary-overview-head,
  .summary-card-head {
    grid-template-columns: 1fr;
  }

  .summary-card-head {
    display: grid;
    justify-content: start;
  }

  .summary-strap {
    white-space: normal;
  }

  .summary-overview-head h3,
  .summary-card h3 {
    overflow-wrap: anywhere;
  }

  .summary-tabpanel-head p,
  .summary-overview p,
  .summary-card li {
    overflow-wrap: anywhere;
  }

  .settings-step .section-top,
  .workspace-module-hero-head,
  .settings-note-panel .section-top,
  .idea-step .section-top,
  .partner-pipeline .section-top,
  .project-naming-head,
  .lever-panel-head,
  .spider-head {
    gap: 14px;
  }

  .workspace-module-hero,
  .workspace-module-prompt-sheet {
    padding: 16px;
    border-radius: 18px;
  }

  .workspace-module-meta-row {
    grid-template-columns: 1fr;
  }

  .workspace-module-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .settings-step .section-top .button,
  .settings-note-panel .section-top .button,
  .workspace-module-hero-actions .button,
  .idea-step .button-row .button,
  .partner-pipeline .button-row .button,
  .partner-find-button {
    width: 100%;
  }

  .settings-step .inline-action-input {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .settings-step .inline-action-input .button {
    width: 100%;
  }

  .idea-card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .idea-card-top .score-input {
    width: 100%;
  }

  .project-naming {
    padding: 14px;
  }

  .project-naming-head .circle-action {
    align-self: flex-start;
  }

  .acronym-card {
    min-height: 0;
  }

  .lever-panel,
  .spider-card {
    padding: 14px;
  }

  .spider-chart {
    max-width: 320px;
  }

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

  .partner-finder select,
  .partner-finder input,
  .partner-find-button {
    width: 100%;
  }

  .selected-partner-strip {
    margin-bottom: 12px;
  }

  .partner-tile-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .partner-expand {
    justify-self: start;
  }

  .partner-tile-body {
    grid-template-columns: 1fr;
  }

  .partner-tile input.score-input {
    width: 100%;
    justify-self: stretch;
  }

  .partner-tile-actions {
    flex-wrap: wrap;
  }

  .partner-tile-actions .circle-action {
    width: 40px;
    height: 40px;
  }

  .consortium-modal-card {
    padding: 18px;
    border-radius: 18px;
  }

  .crm-research-modal {
    padding: 18px;
    border-radius: 18px;
  }

  .crm-research-modal-summary,
  .crm-research-grid,
  .crm-research-pills {
    grid-template-columns: 1fr;
  }

  .crm-research-loading {
    grid-template-columns: 1fr;
  }

  .consortium-modal-summary,
  .consortium-modal-grid {
    grid-template-columns: 1fr;
  }
}

.tab-strip{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.tab-chip{border:1px solid rgba(7,59,76,.25);background:#fff;padding:8px 12px;border-radius:999px;font-weight:540;color:#0b0b0c}
.tab-chip.active{background:#073b4c;color:#fff;border-color:#073b4c}
.tools-panel {
  margin-bottom: 14px;
}

.tools-panel-head {
  margin-bottom: 12px;
}

.tools-tab-strip {
  margin-bottom: 0;
}

.tools-tab-chip {
  min-height: 40px;
}
.avatar-editor{display:flex;align-items:center;gap:14px}
.avatar-preview{width:68px;height:68px;border-radius:999px;background:rgba(7,59,76,.12);display:flex;align-items:center;justify-content:center;overflow:hidden;font-weight:700;color:#073b4c}
.avatar-preview img{width:100%;height:100%;object-fit:cover}
.avatar-chip{width:30px;height:30px;border-radius:999px;background:rgba(7,59,76,.12);display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#073b4c;overflow:hidden}
.avatar-chip img{width:100%;height:100%;object-fit:cover}
.user-cell{display:flex;align-items:center;gap:8px}
.panel-subtle{padding:14px;border:1px solid rgba(7,59,76,.15);border-radius:12px;background:#fff}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.topbar-main{min-width:280px;flex:1 1 420px}
.topbar-user{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto}
.topbar-actions{display:flex;flex-direction:column;gap:10px;align-items:flex-end}
.topbar-control-row{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap}

.workspace-health-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(180px,1fr));
  gap:10px;
  margin:6px 0 10px;
}

.health-chip{
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  padding:8px 10px;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.health-chip span{
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.02em;
  color:var(--muted);
}

.health-chip strong{
  font-size:.92rem;
  line-height:1.25;
  color:var(--ink);
}

.health-chip small{
  font-size:.78rem;
  color:var(--muted);
}

.health-chip.deadline{
  border-color:#d02631;
  background:rgba(208,38,49,.06);
}

.module-next-hint{
  margin:8px 0 6px;
  border:1px dashed var(--line);
  border-radius:8px;
  padding:8px 10px;
  background:#fafcfb;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.module-next-hint strong{
  font-size:.9rem;
  font-weight:700;
}

@media (max-width: 1200px){
  .workspace-health-strip{
    grid-template-columns:repeat(2,minmax(160px,1fr));
  }
}

@media (max-width: 700px){
  .workspace-health-strip{
    grid-template-columns:1fr;
  }
}
.user-avatar-chip{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid rgba(7,59,76,.16);border-radius:999px;background:#fff;max-width:260px}
.user-avatar-circle{width:30px;height:30px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:rgba(7,59,76,.12);color:#073b4c;font-size:12px;font-weight:700;overflow:hidden;flex:0 0 30px}
.user-avatar-circle img{width:100%;height:100%;object-fit:cover}
.user-avatar-name{font-size:13px;font-weight:600;color:#0b0b0c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.user-avatar-text{display:flex;flex-direction:column;min-width:0}
.user-avatar-text small{font-size:11px;line-height:1.2;color:#5f6b72;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}

/* ---------- Global responsive layer ---------- */
@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .command-centre-shell {
    grid-template-columns: 1fr;
  }
  .command-centre-side {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  .workspace-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .workspace-dashboard-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .crm-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .crm-insight-panel {
    position: static;
    order: 2;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .workspace-shell {
    grid-template-columns: 1fr;
  }
  .workspace-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    z-index: 80;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    border-right: 1px solid rgba(7, 59, 76, 0.08);
    border-bottom: 0;
    box-shadow: 0 28px 54px rgba(11, 11, 12, 0.16);
    overflow-y: auto;
  }
  .workspace-sidebar.mobile-open {
    transform: translateX(0);
  }
  .workspace-topbar,
  .workspace-hero,
  .workspace-table-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
  .workspace-topbar {
    grid-template-columns: 1fr;
  }
  .workspace-dashboard-grid {
    padding: 20px 16px 24px;
    min-width: 0;
  }
  .workspace-topbar-leading,
  .topbar-leading {
    width: 100%;
  }
  .workspace-metric-grid,
  .workspace-dashboard-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workspace-dashboard-main > *,
  .workspace-dashboard-side > * {
    width: 100%;
    max-width: 100%;
  }
  .workspace-list-row {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(120px, 1fr));
    grid-template-areas:
      "primary primary actions"
      "stage deadline readiness"
      "progress team team";
  }
  .workspace-table-filters {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .workspace-table-filters select {
    min-width: 0;
    width: 100%;
  }
  .workspace-list-primary { grid-area: primary; }
  .workspace-list-stage { grid-area: stage; }
  .workspace-list-deadline { grid-area: deadline; }
  .workspace-list-readiness { grid-area: readiness; }
  .workspace-list-progress { grid-area: progress; }
  .workspace-list-team { grid-area: team; }
  .workspace-list-actions { grid-area: actions; justify-self: end; }
  .workspace-sidebar.collapsed {
    gap: 18px;
    padding: 24px 18px 20px;
  }
  .workspace-sidebar.collapsed .workspace-brand .brand-logo {
    width: 160px;
  }
  .workspace-sidebar.collapsed .workspace-nav-item {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    padding: 0 14px 0 8px;
    gap: 14px;
  }
  .workspace-sidebar.collapsed .workspace-nav-copy {
    display: grid;
  }
  .workspace-sidebar.collapsed .workspace-nav-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .workspace-sidebar.collapsed .sidebar-primary-nav,
  .workspace-sidebar.collapsed .workflow-nav,
  .workspace-sidebar.collapsed .workspace-sidebar-footer {
    justify-items: stretch;
  }
  .sidebar-burger,
  .sidebar-close {
    display: inline-flex;
  }
  .workspace-sidebar-support {
    margin-top: auto;
  }
  .main {
    padding: 16px;
  }
  .topbar,
  .topbar-actions,
  .topbar-control-row {
    align-items: stretch;
  }
  .topbar-actions {
    width: 100%;
  }
  .team-layout,
  .team-layout-modern,
  .team-overview-shell,
  .risk-workbench,
  .question-workbench,
  .crm-shell {
    grid-template-columns: 1fr;
  }
  .crm-discovery-intent {
    grid-template-columns: 1fr;
  }
  .crm-discovery-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .crm-discovery-secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .team-bio-cards {
    grid-template-columns: 1fr;
  }
  .crm-insight-panel,
  .team-context-rail,
  .question-score-panel,
  .risk-context-rail {
    position: static;
    top: auto;
  }
  .team-summary-grid,
  .team-spotlight-grid,
  .team-member-modal-grid {
    grid-template-columns: 1fr;
  }
  .team-form-grid,
  .team-bio-grid {
    grid-template-columns: 1fr;
  }
  .team-url-field {
    grid-column: span 1;
  }
  .gantt-planner-shell,
  .gantt-planner,
  .table-wrap,
  .crm-data-table {
    overflow: auto;
  }
  .team-member-modal {
    padding: 18px;
    border-radius: 20px;
  }
  .team-member-modal-footer,
  .team-panel-head,
  .team-spotlight-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .panel {
    padding: 12px;
    border-radius: 12px;
  }
  .sidebar-primary-nav {
    grid-template-columns: 1fr;
  }
  .module-button {
    min-height: 44px;
  }
  .workspace-dashboard-grid,
  .workspace-main,
  .workspace-sidebar {
    gap: 16px;
  }
  .workspace-topbar,
  .workspace-dashboard-grid,
  .workspace-table-card,
  .workspace-side-card,
  .workspace-hero {
    padding: 16px;
  }
  .workspace-sidebar {
    padding: 20px 14px 18px;
  }
  .workspace-metric-grid,
  .workspace-dashboard-side {
    grid-template-columns: 1fr;
  }
  .workspace-list-columns {
    display: none;
  }
  .workspace-search {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .workspace-search-kbd {
    display: none;
  }
  .workspace-list-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "primary"
      "stage"
      "deadline"
      "readiness"
      "progress"
      "team"
      "actions";
  }
  .workspace-list-actions {
    justify-self: start;
  }
  .workspace-list-row,
  .workspace-list-create {
    width: 100%;
    max-width: 100%;
  }
  .workspace-list-row > *,
  .workspace-list-create > * {
    min-width: 0;
  }
  .workspace-title-field {
    min-height: auto;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .workspace-hero-actions,
  .topbar-actions,
  .topbar-control-row,
  .button-row,
  .workspace-topbar-actions {
    width: 100%;
    justify-content: stretch;
  }
  .workspace-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .workspace-hero-actions .button,
  .button-row .button,
  .topbar-actions .button,
  .workspace-topbar-actions .button {
    width: 100%;
    max-width: 100%;
  }
  .workspace-org-pill,
  .workspace-profile-pill {
    width: 100%;
    justify-content: flex-start;
  }
  .crm-tabs-modern {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .crm-discovery-filters,
  .crm-discovery-secondary {
    grid-template-columns: 1fr;
  }
  .crm-toolbar {
    gap: 8px;
  }
  .crm-toolbar-filters {
    width: 100%;
  }
  .crm-toolbar-filters select {
    width: 100%;
  }
  .button-row {
    width: 100%;
  }
  .button-row .button {
    flex: 1 1 auto;
  }
  .health-chip strong {
    font-size: 0.86rem;
  }
}

/* ---------- Module-by-module mobile polish ---------- */
@media (max-width: 1100px) {
  .question-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .question-index,
  .question-score-panel {
    position: static;
    top: auto;
    max-height: none;
  }

  .question-index {
    order: -1;
  }

  .question-detail-grid,
  .settings-profile-grid,
  .settings-placeholder-grid,
  .team-profiles-layout,
  .team-profiles-head,
  .team-profiles-tools,
  .team-profile-head-modern,
  .team-profile-actions,
  .crm-layout,
  .crm-builder-grid,
  .crm-capability-grid,
  .crm-redirect-grid,
  .crm-finder-grid,
  .concept-panel,
  .question-guidance {
    grid-template-columns: 1fr;
  }

  .settings-shell-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-sidebar {
    position: static;
    top: auto;
  }

  .question-meta-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-prompt-actions,
  .output-actions,
  .plan-actions,
  .gantt-toolbar-actions {
    flex-wrap: wrap;
  }

  .team-page-toolbar,
  .team-topbar,
  .crm-page-head,
  .settings-shell-head,
  .competition-import-hero .link-import-row,
  .dashboard-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .td-topbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .td-topbar-left,
  .td-topbar-right,
  .td-topbar-actions {
    width: 100%;
  }

  .td-topbar-right {
    flex-wrap: wrap;
    justify-content: stretch;
    align-items: stretch;
  }

  .td-diagram-picker {
    max-width: none;
    width: 100%;
  }

  .td-topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .td-rail-resizer {
    display: none;
  }

  .td-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .td-rail-left,
  .td-rail-right {
    display: grid;
  }

  .td-rail-left {
    order: 2;
  }

  .td-rail-right {
    order: 3;
  }

  .td-canvas {
    order: 1;
    min-height: 58vh;
  }

  .td-rail-scroll {
    max-height: none;
  }

  .td-ai-modal {
    width: min(96vw, 900px);
  }

  .output-summary-table,
  .team-directory-table,
  .crm-data-table table {
    min-width: 820px;
  }

  .output-table-card,
  .team-directory-table-wrap,
  .crm-data-table,
  .risk-table,
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 760px) {
  .competition-import-hero,
  .dashboard-hero,
  .competition-dashboard,
  .competition-summary,
  .settings-shell,
  .team-page,
  .crm-page,
  .output-page,
  .command-centre-shell,
  .td-shell {
    gap: 16px;
  }

  .competition-import-hero,
  .dashboard-hero,
  .settings-surface,
  .team-profiles-panel,
  .team-profiles-table-panel,
  .team-profile-editor,
  .team-evidence-board,
  .team-gap-board,
  .team-coverage-grid,
  .crm-builder-card,
  .crm-list-card,
  .crm-discovery-card,
  .crm-insight-panel,
  .output-table-card,
  .output-card,
  .td-rail,
  .td-canvas,
  .question-index,
  .score-panel,
  .risk-card,
  .settings-sidebar,
  .workspace-module-hero,
  .workspace-module-prompt-sheet {
    border-radius: 18px;
  }

  .competition-dashboard,
  .settings-shell,
  .team-page,
  .crm-page,
  .output-page,
  .td-shell {
    padding: 0;
  }

  .competition-import-hero,
  .dashboard-hero,
  .summary-overview,
  .summary-tabpanel,
  .summary-card,
  .settings-surface,
  .team-profiles-panel,
  .team-profiles-table-panel,
  .team-profile-editor,
  .team-evidence-board,
  .team-gap-board,
  .team-coverage-grid,
  .crm-builder-card,
  .crm-list-card,
  .crm-discovery-card,
  .crm-insight-panel,
  .output-table-card,
  .output-card,
  .td-rail,
  .td-canvas,
  .question-index,
  .question-editor,
  .score-panel,
  .risk-card,
  .settings-sidebar,
  .question-prompt-panel {
    padding: 16px;
  }

  .section-top,
  .topbar,
  .team-page-toolbar,
  .team-topbar,
  .crm-page-head,
  .settings-shell-head,
  .settings-shell-layout,
  .settings-profile-grid,
  .team-profile-head-modern,
  .team-profiles-head,
  .team-profiles-tools,
  .crm-tool-card-head,
  .crm-inline-helper,
  .crm-finder-grid,
  .crm-discovery-intent,
  .crm-builder-grid,
  .crm-capability-grid,
  .crm-redirect-grid,
  .question-meta-controls,
  .question-guidance,
  .question-prompt-actions,
  .output-actions,
  .plan-actions {
    grid-template-columns: 1fr;
  }

  .competition-import-hero .link-import-row .button-row,
  .button-row,
  .team-profile-actions,
  .team-spotlight-actions,
  .question-prompt-actions,
  .output-actions,
  .plan-actions,
  .gantt-toolbar-actions,
  .crm-toolbar .button-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .competition-import-hero .link-import-row .button-row .button,
  .button-row .button,
  .team-profile-actions .button,
  .team-spotlight-actions .button,
  .question-prompt-actions .button,
  .output-actions .button,
  .plan-actions .button,
  .gantt-toolbar-actions .button,
  .crm-toolbar .button-row .button,
  .crm-page-head .button,
  .team-page-toolbar .button,
  .settings-shell-head .button {
    width: 100%;
  }

  .td-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .td-topbar-actions .td-iconbtn,
  .td-topbar-actions .td-rail-toggle {
    width: 38px;
  }

  .question-heading {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .question-index-head,
  .question-prompt-copy,
  .team-panel-head,
  .team-spotlight-head,
  .crm-form-section-head,
  .consortium-modal-head,
  .team-member-modal-head,
  .progressive-modal-head,
  .td-ai-modal-head {
    gap: 10px;
  }

  .question-nav-card,
  .team-member-card,
  .crm-company-card,
  .workspace-list-row,
  .workspace-feed-item,
  .command-centre-feed-row,
  .command-centre-risk-row {
    border-radius: 16px;
  }

  .question-nav-card .question-nav-main {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .question-nav-card .question-nav-main > span {
    width: 30px;
    height: 30px;
    font-size: 0.74rem;
  }

  .question-guidance,
  .question-prompt-panel,
  .score-panel {
    gap: 12px;
  }

  .answer-box {
    min-height: 320px;
  }

  .finance-hero,
  .finance-bars,
  .risk-grid,
  .output-grid,
  .settings-placeholder-grid,
  .team-summary-grid,
  .team-spotlight-grid,
  .team-workspace-cards,
  .team-evidence-cards,
  .team-bio-cards,
  .team-card-list,
  .crm-discovery-filters,
  .crm-discovery-secondary {
    grid-template-columns: 1fr;
  }

  .finance-hero > div,
  .team-metric,
  .team-summary-card,
  .crm-hero-card,
  .crm-redirect-card,
  .risk-card,
  .output-card {
    min-width: 0;
  }

  .gantt-planner-shell {
    --gantt-meta-width: 300px;
    --gantt-month-width: 48px;
  }

  .gantt-month-header::before,
  .gantt-add-row {
    font-size: 0.66rem;
  }

  .gantt-lane-meta {
    padding: 8px;
  }

  .wp-meta-inline {
    grid-template-columns: 1fr;
  }

  .gantt-title-editor,
  .gantt-title-editor.wp-title {
    min-height: 42px;
    max-height: 42px;
  }

  .gantt-task-dates {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .risk-table table {
    min-width: 1900px;
  }

  .output-summary-table,
  .team-directory-table,
  .crm-data-table table {
    min-width: 760px;
  }

  .output-summary-table th,
  .output-summary-table td,
  .team-directory-table th,
  .team-directory-table td,
  .crm-data-table th,
  .crm-data-table td {
    padding: 12px 12px;
  }

  .output-card-top,
  .crm-research-hero,
  .team-profile-status,
  .team-quick-signals,
  .crm-meta-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .output-card-top {
    gap: 10px;
  }

  .output-editor {
    min-height: 220px;
  }

  .settings-sidebar-group {
    gap: 8px;
  }

  .settings-sidebar-item {
    min-height: 46px;
    align-items: center;
  }

  .settings-profile-photo {
    justify-items: stretch;
  }

  .settings-profile-photo .avatar-badge,
  .settings-profile-photo .team-avatar,
  .settings-profile-photo .workspace-avatar {
    justify-self: start;
  }

  .team-tabs,
  .team-subtabs,
  .crm-tabs-modern,
  .tabs,
  .tab-strip {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .team-tabs::-webkit-scrollbar,
  .team-subtabs::-webkit-scrollbar,
  .crm-tabs-modern::-webkit-scrollbar,
  .tabs::-webkit-scrollbar,
  .tab-strip::-webkit-scrollbar {
    display: none;
  }

  .team-tabs button,
  .team-subtabs button,
  .crm-tab-modern,
  .tab,
  .tab-chip {
    flex: 0 0 auto;
  }

  .team-member-modal,
  .consortium-modal-card,
  .crm-research-modal,
  .td-ai-modal {
    width: min(96vw, 100%);
    max-height: 90vh;
    padding: 18px;
    border-radius: 20px;
  }

  .team-member-modal-grid,
  .consortium-modal-grid,
  .crm-research-modal-summary,
  .crm-research-grid,
  .crm-research-pills,
  .td-ai-modal-grid {
    grid-template-columns: 1fr;
  }

  .td-shell .react-flow__controls {
    transform: scale(0.92);
    transform-origin: bottom right;
  }

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

  .td-palette-footer,
  .td-prop-grid {
    grid-template-columns: 1fr;
  }

  .td-props,
  .td-tags,
  .td-port-list {
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .workspace-module-title-block h2,
  .competition-import-hero h2,
  .dashboard-hero h2,
  .command-centre-head h1,
  .workspace-hero h1 {
    font-size: clamp(1.7rem, 1.18rem + 3vw, 2.3rem);
    line-height: 1.04;
  }

  .section-top,
  .competition-import-hero,
  .dashboard-hero,
  .summary-overview,
  .summary-tabpanel,
  .summary-card,
  .workspace-module-hero,
  .workspace-module-prompt-sheet,
  .question-index,
  .question-editor,
  .score-panel,
  .settings-surface,
  .team-profiles-panel,
  .team-profiles-table-panel,
  .team-profile-editor,
  .team-evidence-board,
  .team-gap-board,
  .team-coverage-grid,
  .crm-builder-card,
  .crm-list-card,
  .crm-discovery-card,
  .crm-insight-panel,
  .output-table-card,
  .output-card,
  .td-rail,
  .td-canvas,
  .command-centre-overview,
  .command-centre-question-review,
  .command-centre-middle-stack > .panel,
  .command-centre-side-card {
    padding: 14px;
    border-radius: 16px;
  }

  .question-meta-controls label,
  .question-title-field,
  .question-guidance-field,
  .team-form-grid label,
  .team-bio-grid label,
  .crm-builder-grid > label,
  .crm-form-section > label,
  .td-prop {
    gap: 4px;
  }

  .team-avatar,
  .crm-company-avatar.large,
  .workspace-avatar {
    width: 44px;
    height: 44px;
  }

  .team-metric strong,
  .finance-hero strong,
  .workspace-metric-card strong,
  .command-centre-metric-head strong,
  .command-centre-deadline-card strong {
    font-size: 1.3rem;
  }

  .output-table-name {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
  }

  .gantt-planner-shell {
    --gantt-meta-width: 260px;
    --gantt-month-width: 44px;
  }

  .gantt-task-dates {
    grid-template-columns: 1fr;
  }

  .td-palette-grid {
    grid-template-columns: 1fr;
  }

  .crm-research-hero,
  .crm-finder-modern,
  .team-spotlight-identity,
  .team-work-card,
  .team-evidence-card,
  .output-card-top {
    gap: 8px;
  }

  .question-nav-card .question-nav-main strong,
  .team-table-member strong,
  .output-table-name strong,
  .crm-company-cell strong {
    font-size: 0.92rem;
  }

  .team-profiles-layout {
    grid-template-columns: 1fr;
  }

.question-nav-card .question-nav-main small,
.team-table-member small,
.output-table-name small,
.crm-company-cell small,
.crm-score-reason small,
.question-prompt-copy p,
.muted {
  font-size: 0.86rem;
  }
}

.command-centre-review-row,
.team-directory-table tbody tr,
.crm-data-table tbody tr,
.workspace-hub-card,
.question-nav-card,
.crm-company-card,
.risk-card,
.output-card,
.module-stat-card {
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.module-stat-card,
.output-card,
.risk-card,
.crm-company-card,
.question-nav-card {
  box-shadow: var(--shadow-inline);
}

.module-stat-card:hover,
.output-card:hover,
.risk-card:hover,
.crm-company-card:hover,
.question-nav-card:hover {
  border-color: rgba(7, 59, 76, 0.12);
  box-shadow: var(--shadow-card);
}

@media (max-width: 820px) {
  .ai-preflight-summary {
    grid-template-columns: 1fr;
  }

  .ai-preflight-item {
    grid-template-columns: 1fr;
  }

  .ai-preflight-icon {
    margin-bottom: 2px;
  }

  .crm-finder-results-summary {
    grid-template-columns: 1fr;
  }

  .crm-finder-result-card {
    grid-template-columns: 1fr;
  }

  .crm-company-insight-summary,
  .crm-company-insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
