:root {
  --bg: #f3f2ee;
  --paper: #fffcf7;
  --ink: #1c1b19;
  --muted: #5c5a55;
  --line: #d9d5cc;
  --accent: #2c2a26;
  --accent-hover: #111;
  --danger: #9b2c2c;
  --ok: #276749;
  --shadow: 0 18px 40px rgba(28, 27, 25, 0.08);
  --radius: 1.25rem;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}

button, input, textarea {
  font-family: inherit;
}

.hidden { display: none !important; }

.gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1.5rem;
}

.gate-box {
  width: 100%;
  max-width: 22rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.gate-box h1 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.gate-box label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.gate-box input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #fff;
  margin-bottom: 0.9rem;
}

.gate-error {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.2rem;
  margin-bottom: 0.4rem;
}

.hub {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 2.5rem;
  gap: 2.25rem;
}

.hub-header {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.hub-title h1 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.hub-title p {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 28rem;
}

.hub-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  flex-shrink: 0;
}

.hub-logos img {
  height: 64px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.tool-row {
  width: min(1280px, 100%);
  margin: auto;
  display: flex;
  gap: 1rem;
}

.tool-btn {
  flex: 1;
  min-height: 200px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.25rem);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tool-btn:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
}

.tool-btn svg {
  width: 42px;
  height: 42px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.tool-btn span {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.25;
  padding: 0 0.4rem;
}

.tool-btn.is-placeholder {
  opacity: 0.72;
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 3rem;
}

.page-wide { max-width: 1080px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.topbar h1 {
  font-size: 1.35rem;
  font-weight: 650;
}

.step-status {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
  font-weight: 400;
}

.topbar a, .linkish {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  text-align: right;
  max-width: 12rem;
  line-height: 1.3;
}

.placeholder-inline {
  color: var(--muted);
  font-size: 1.4rem;
  font-weight: 650;
  padding: 3rem 0;
  text-align: center;
}

.progress {
  height: 3px;
  background: var(--line);
  border-radius: 99px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  background: var(--ink);
  width: 33%;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

textarea, .field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.8rem 0.9rem;
  background: #fff;
  resize: vertical;
  min-height: 7rem;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

#round-sheet-nav {
  justify-content: flex-start;
}

.actions-left {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chat-head-who {
  flex: 1;
  min-width: 0;
}

.chat-head-who .person-lens {
  margin: 0.15rem 0 0;
}

.chat-probe {
  align-self: stretch;
  border: 1px dashed var(--line);
  border-radius: 0.9rem;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.35rem;
}

.chat-probe .hint { margin-bottom: 0.25rem; }
.chat-probe .insight-text { margin: 0; font-style: italic; }

.probe-link {
  background: none;
  border: none;
  padding: 0.15rem 0 0;
  margin-top: 0.35rem;
  cursor: pointer;
  font-size: 0.82rem;
  max-width: none;
  text-align: left;
}

.btn {
  border: none;
  border-radius: 0.8rem;
  padding: 0.65rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.ghost { background: #eceae4; color: var(--ink); }
.btn.ghost:hover { background: #e2dfd6; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.trend-group-title {
  font-size: 0.95rem;
  margin: 1.1rem 0 0.55rem;
}

.trend-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

.trend-card {
  min-height: 0;
}

.trend-card p {
  text-align: left;
}

.trend-compact {
  min-height: 0;
  padding: 0.75rem 0.85rem;
}

.trend-card.on {
  border-color: var(--ink);
}

.trend-collide {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin: 1.1rem 0 0.4rem;
}

.trend-collide-card {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  padding: 0.85rem 0.9rem;
  background: #fff;
}

.trend-x {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--muted);
}

#idea-questions .person,
#sparks-questions .analysis-section {
  margin-bottom: 0.7rem;
  min-height: 0;
}

#step-idea label {
  display: block;
  font-weight: 600;
  margin: 1rem 0 0.4rem;
  font-size: 0.92rem;
}

.person {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  background: #fff;
  cursor: pointer;
  text-align: left;
  min-height: 10rem;
}

.person:hover { border-color: var(--ink); }
.person h3 { font-size: 1rem; margin-bottom: 0.4rem; text-align: left; }
.person p {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: justify;
  hyphens: auto;
}
.person .person-lens {
  font-size: 0.82rem;
  font-weight: 600;
  margin: -0.15rem 0 0.4rem;
  text-align: left;
  hyphens: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 25, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 1rem;
}

#loading-overlay { z-index: 45; }

.overlay-box {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 22rem;
  text-align: center;
}

.spin {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  margin: 0 auto 0.8rem;
  animation: spin 0.8s linear infinite;
}

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

.chat {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.chat-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.8rem;
}

.chat-log {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 280px;
  max-height: 420px;
}

.chat-start {
  align-self: center;
  text-align: center;
  max-width: 24rem;
  margin: auto 0;
  padding: 1.25rem 0.5rem;
}

.chat-start strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.chat-start p { margin: 0; }

.bubble {
  max-width: 80%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.9rem;
  font-size: 0.95rem;
}

.bubble.user {
  align-self: flex-end;
  background: var(--ink);
  color: #fff;
}

.bubble.assistant {
  align-self: flex-start;
  background: #eceae4;
}

.bubble.typing {
  padding: 0.7rem 0.9rem;
}

.chat-typing-dots {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  height: 0.7rem;
}

.chat-typing-dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #5c5a55;
  animation: chat-typing-bounce 1.4s ease-in-out infinite both;
}

.chat-typing-dots span:nth-child(1) { animation-delay: 0s; }
.chat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-input {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.chat-input input {
  flex: 1;
  min-height: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.suggest {
  align-self: stretch;
  border: 1px dashed var(--line);
  border-radius: 0.9rem;
  padding: 0.7rem;
}

.suggest p { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.4rem; }
.suggest-status { margin: 0.15rem 0 0; }
.suggest button {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.45rem 0.6rem;
  margin-top: 0.35rem;
  cursor: pointer;
}
.suggest-item { padding: 0.55rem 0.65rem; }
.suggest-cat {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.suggest-q {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.18rem 0 0.2rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.suggest-why {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.toggle {
  width: 42px;
  height: 24px;
  border-radius: 99px;
  border: none;
  background: #d4d0c8;
  position: relative;
  cursor: pointer;
}

.toggle.on { background: var(--ink); }
.toggle i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
}
.toggle.on i { transform: translateX(18px); }

.qa { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; font-size: 0.8rem; color: var(--muted); }

.chat-foot {
  margin-top: 0.55rem;
}

.chat-foot .linkish {
  background: none;
  border: none;
  padding: 0.15rem 0;
  cursor: pointer;
  font-size: 0.85rem;
  max-width: none;
  text-align: left;
}

.chat-foot .linkish:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.analysis-section {
  margin: 1.15rem 0 1.35rem;
}

.analysis-section h3 {
  font-size: 0.98rem;
  font-weight: 650;
  margin-bottom: 0.45rem;
}

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

.insight {
  margin: 0.7rem 0 1rem;
}

.insight-text {
  margin: 0;
  line-height: 1.4;
}

.insight-core {
  margin: 0;
  font-weight: 650;
  line-height: 1.35;
}

.insight-context {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--muted);
}

.insight-quote {
  margin: 0.45rem 0 0;
  padding: 0.1rem 0 0.1rem 0.75rem;
  border-left: 2px solid var(--line);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.4;
}

.insight-basis {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.insight-evidence {
  margin-top: 0.4rem;
}

.insight-evidence span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.insight-evidence p {
  margin: 0;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.35;
}

.analysis-open {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.analysis-open-lead {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.analysis-question {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.55rem 0.7rem;
  margin-top: 0.4rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.35;
}

.analysis-disclaimer {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.analysis-disclaimer strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.analysis-disclaimer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.analysis-error {
  color: var(--danger);
}

.skip {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.q-card { margin-bottom: 0.9rem; }
.q-card label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.92rem; }

.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.9rem; }

.tabs .chip {
  white-space: nowrap;
  max-width: 100%;
}

.persona-intro {
  margin-bottom: 0.85rem;
  white-space: normal;
}

.persona-intro-name {
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.persona-fazit {
  margin: 0.45rem 0 0;
  padding: 0.4rem 0.65rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.persona-fazit-label {
  font-weight: 600;
}

.talk-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.talk-cta .hint {
  margin: 0;
  text-align: right;
  font-size: 0.88rem;
}

@media (max-width: 560px) {
  .tabs .chip {
    white-space: normal;
    text-align: left;
    line-height: 1.25;
  }

  .talk-cta {
    align-items: stretch;
    width: 100%;
  }

  .talk-cta .hint,
  .talk-cta .btn {
    text-align: center;
  }

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

  .trend-collide {
    flex-direction: column;
    align-items: stretch;
  }

  .trend-x {
    text-align: center;
  }
}

.feedback-body {
  white-space: pre-wrap;
  color: var(--ink);
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.matrix th, .matrix td {
  border: 1px solid var(--line);
  padding: 0.65rem;
  vertical-align: top;
  background: #fff;
}

.matrix th { background: #eceae4; font-weight: 600; }
.matrix td.who { width: 7.5rem; background: #f7f5f0; font-weight: 600; }
.matrix textarea { min-height: 5.5rem; border: none; padding: 0; }

.cluster li { margin: 0.35rem 0 0.35rem 1rem; color: var(--muted); }

.person-static { cursor: default; }

.analysis-section label {
  display: block;
  font-weight: 600;
  margin: 0.55rem 0 0.4rem;
  font-size: 0.92rem;
}

.q-card .field,
.analysis-section .field {
  min-height: 4.5rem;
}

.six-history {
  margin-top: 0.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--line);
}

.six-arrow {
  margin: 0.25rem 0 0.15rem;
  color: var(--muted);
  text-align: center;
}

.six-impulses {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.six-extra {
  font-size: 0.9rem;
  opacity: 0.88;
}

.trend-card,
.trend-collide-card,
#idea-questions .person,
.insight-text {
  overflow-wrap: anywhere;
}

.six-phase {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

.six-pack {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.six-pack h2 {
  margin-bottom: 0.35rem;
}

.six-pack .btn {
  margin-top: 0.45rem;
}

.six-idea-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.top-idea {
  padding: 0.85rem 0.9rem 1rem;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line);
}

.concept-card {
  margin-top: 0.75rem;
  padding: 0.75rem 0.8rem;
}

.concept-card h4 {
  margin: 0.65rem 0 0.2rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.concept-card h4:first-child {
  margin-top: 0;
}

.admin-wrap { max-width: 920px; margin: 0 auto; padding: 1.5rem 1.1rem 3rem; }
.admin-item { margin-bottom: 1rem; }
.admin-item h2 { font-size: 1rem; margin-bottom: 0.2rem; }
.admin-item .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.6rem; }
.admin-item textarea { min-height: 8rem; margin-bottom: 0.5rem; }
.admin-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.75rem 0 0.15rem;
  font-weight: 600;
  cursor: pointer;
}
.admin-toggle input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--ink);
}
.admin-toggle input:disabled {
  cursor: not-allowed;
}
.admin-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.35rem;
}
.msg { padding: 0.6rem 0.8rem; border-radius: 0.6rem; margin-bottom: 0.8rem; }
.msg.ok { background: #e6ffed; color: var(--ok); }
.msg.err { background: #ffe8e8; color: var(--danger); }
.placeholder-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 650;
  color: var(--muted);
}

.page-bmc {
  max-width: 1280px;
  width: 100%;
}

.bmc-toolbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.bmc-hyp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.bmc-hyp-col h3 {
  margin: 0 0 0.2rem;
}

.bmc-hyp-list {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

.bmc-hyp-list li {
  margin-bottom: 0.55rem;
  line-height: 1.4;
}

@media (max-width: 800px) {
  .bmc-hyp-grid {
    grid-template-columns: 1fr;
  }
}

.bmc-legend { margin-bottom: 0.85rem; }

.bmc-tag {
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 0.3rem;
  vertical-align: middle;
}

.bmc-tag.assumption {
  background: #fef3c7;
  color: #92400e;
}

.bmc-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: minmax(168px, auto) minmax(168px, auto) minmax(140px, auto);
  border: 1px solid var(--ink);
  background: var(--paper);
}

.bmc-cell {
  border: 1px solid var(--ink);
  padding: 0.55rem 0.6rem;
  display: flex;
  flex-direction: column;
  min-height: 140px;
  min-width: 0;
}

.bmc-kp { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.bmc-ka { grid-column: 3 / span 2; grid-row: 1; }
.bmc-kr { grid-column: 3 / span 2; grid-row: 2; }
.bmc-vp { grid-column: 5 / span 2; grid-row: 1 / span 2; }
.bmc-cr { grid-column: 7 / span 2; grid-row: 1; }
.bmc-ch { grid-column: 7 / span 2; grid-row: 2; }
.bmc-cs { grid-column: 9 / span 2; grid-row: 1 / span 2; }
.bmc-cost { grid-column: 1 / span 5; grid-row: 3; }
.bmc-rev { grid-column: 6 / span 5; grid-row: 3; }

.bmc-cell-head h3 {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.bmc-cell-head p {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.bmc-items {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
  align-content: flex-start;
}

.bmc-item {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  max-width: 100%;
  background: #f7f5f0;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.28rem 0.4rem;
  font-size: 0.75rem;
}

.bmc-item.is-assumption {
  background: #fffbeb;
  border-style: dashed;
  border-color: #d97706;
}

.bmc-item-text {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.bmc-item.is-assumption .bmc-item-text { font-style: italic; }

.bmc-item-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--muted);
  padding: 0 0.1rem;
  flex-shrink: 0;
}

.bmc-item-btn:hover { color: var(--ok); }
.bmc-item-btn.danger:hover { color: var(--danger); }

.bmc-add {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--line);
}

.bmc-add input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.35rem 0.45rem;
  font-size: 0.75rem;
}

.bmc-add .btn {
  padding: 0.3rem 0.55rem;
  font-size: 0.9rem;
}

.bmc-delta-change {
  margin: 0.7rem 0 1rem;
}

.bmc-delta-change .insight-text {
  margin-top: 0.2rem;
}

.bmc-risk {
  margin: 0.7rem 0 1rem;
}

.bmc-risk .btn {
  margin-top: 0.45rem;
}

.bmc-compare {
  overflow-x: auto;
  margin: 0.6rem 0 1.1rem;
  border: 1px solid var(--line);
}

.bmc-compare table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.bmc-compare th,
.bmc-compare td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  vertical-align: top;
  min-width: 8.5rem;
  text-align: left;
  line-height: 1.35;
}

.bmc-compare tr > :first-child {
  min-width: 7rem;
  font-weight: 600;
}

.bmc-compare thead th {
  font-weight: 600;
}

#step-perspectives .grid-3,
#step-constraints .grid-3 {
  margin-bottom: 1.1rem;
}

#canvas-wrap .tabs {
  margin-bottom: 0.75rem;
}
  padding: 0.3rem 0.55rem;
  font-size: 0.9rem;
}

.overlay-wide {
  max-width: 52rem;
  width: 100%;
  text-align: left;
  max-height: 90vh;
  overflow: auto;
}

@media (max-width: 800px) {
  .hub-header { flex-direction: column; }
  .hub-logos { justify-content: flex-start; }
  .tool-row { flex-direction: column; }
  .tool-btn { min-height: 120px; flex-direction: row; justify-content: flex-start; padding: 0 1.4rem; gap: 1rem; }
  .tool-btn span { text-align: left; }
  .grid-3 { grid-template-columns: 1fr; }
  .matrix { font-size: 0.8rem; }
  .bmc-grid {
    display: flex;
    flex-direction: column;
  }
  .bmc-kp, .bmc-ka, .bmc-kr, .bmc-vp, .bmc-cr, .bmc-ch, .bmc-cs, .bmc-cost, .bmc-rev {
    grid-column: auto;
    grid-row: auto;
  }
  .bmc-vp { order: 1; }
  .bmc-cs { order: 2; }
  .bmc-cr { order: 3; }
  .bmc-ch { order: 4; }
  .bmc-kp { order: 5; }
  .bmc-ka { order: 6; }
  .bmc-kr { order: 7; }
  .bmc-cost { order: 8; }
  .bmc-rev { order: 9; }
}
