/* Blueprint: the plan on one page */

.bbi-bp-doc { overflow: hidden; }

.bbi-bp-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 16px 0 18px;
  border-bottom: 1px solid var(--bbi-line);
}

.bbi-bp-title { font-size: 16px; font-weight: 800; color: var(--bbi-ink); white-space: nowrap; }

.bbi-bp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  width: 296px;
  height: 40px;
  padding: 0 7px 0 12px;
  border-radius: 12px;
  border: 1.5px solid #dfe3f1;
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bbi-bp-search.is-focus,
.bbi-bp-search.is-found {
  border-color: rgba(94, 114, 228, 0.55);
  box-shadow: 0 0 0 4px rgba(94, 114, 228, 0.1);
}

.bbi-bp-search__icon { width: 16px; height: 16px; flex: none; color: var(--bbi-muted); }
.bbi-bp-search__icon svg { display: block; width: 100%; height: 100%; }
.bbi-bp-search__field { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--bbi-ink); white-space: nowrap; }
.bbi-bp-search__ph { font-weight: 600; color: var(--bbi-faint); }

.bbi-bp-search__count {
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: #fff2bf;
  font-size: 12px;
  font-weight: 800;
  line-height: 24px;
  color: #946200;
  white-space: nowrap;
}

.bbi-bp-kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  border: 1px solid #dfe3f1;
  border-bottom-width: 2px;
  background: var(--bbi-surface-2);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
}

/* Section nav */
.bbi-bp-nav {
  position: absolute;
  top: 64px;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 166px;
  padding: 14px 12px 14px;
  border-right: 1px solid var(--bbi-line);
  background: #fbfcff;
}

.bbi-bp-nav__items { display: grid; gap: 3px; }

.bbi-bp-nav__item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bbi-muted);
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.bbi-bp-nav__item svg { width: 15px; height: 15px; flex: none; }

.bbi-bp-nav__item em {
  margin-left: auto;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--bbi-faint);
}

.bbi-bp-nav__item.is-on { background: rgba(94, 114, 228, 0.1); color: var(--bbi-indigo); }
.bbi-bp-nav__item.is-on em { color: var(--bbi-indigo); }

.bbi-bp-nav__label { margin: 18px 6px 8px; }
.bbi-bp-nav__export { margin-top: auto; }

.bbi-bp-keys { display: grid; gap: 6px; padding: 0 6px; }

.bbi-bp-keys div {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-bp-keys span { margin-left: 6px; }

.bbi-bp-ex {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #dfe3f1;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-ink);
  box-shadow: var(--bbi-shadow-sm);
  transition: transform 0.2s var(--bbi-ease), background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.bbi-bp-ex + .bbi-bp-ex { margin-top: 6px; }
.bbi-bp-ex svg { width: 15px; height: 15px; color: var(--bbi-indigo); }
.bbi-bp-ex.is-pressed { transform: scale(0.95); }
.bbi-bp-ex.is-done { background: var(--bbi-good-bg); border-color: var(--bbi-good-edge); color: var(--bbi-good); }
.bbi-bp-ex.is-done svg { color: var(--bbi-good); }

/* Document page */
.bbi-bp-view {
  position: absolute;
  top: 64px;
  left: 166px;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.bbi-bp-view::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 85%);
  pointer-events: none;
}

.bbi-bp-page { padding: 14px 18px 18px 22px; will-change: transform; }

.bbi-bp-h {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 800;
  color: var(--bbi-ink);
}

.bbi-bp-h:first-child { margin-top: 0; }

.bbi-bp-h__icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(94, 114, 228, 0.12);
  color: var(--bbi-indigo);
}

.bbi-bp-h__icon svg { width: 13px; height: 13px; }

.bbi-bp-tree { display: grid; gap: 3px; margin-top: 7px; }

.bbi-bp-node {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin-left: -8px;
  padding-right: 8px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--bbi-ink);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.bbi-bp-node > b { font-weight: 800; white-space: nowrap; }

.bbi-bp-node__dot {
  width: 8px;
  height: 8px;
  flex: none;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--bbi-navy);
}

.bbi-bp-node__dot--1 { background: var(--bbi-indigo); }
.bbi-bp-node__dot--2 { background: var(--bbi-purple); }

.bbi-bp-node.is-hit {
  background: rgba(255, 214, 77, 0.16);
  box-shadow: inset 0 0 0 1.5px rgba(240, 180, 0, 0.35);
}

.bbi-bp-rule {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--bbi-surface-2);
  border: 1px solid var(--bbi-line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-bp-rule b { font-weight: 800; color: var(--bbi-indigo); }
.bbi-bp-rule__v { font-weight: 800; }
.bbi-bp-rule--dest { background: #fff7e8; border-color: #ffd28a; color: #9a5b00; }

.bbi-bp-page mark {
  padding: 0 2px;
  margin: 0 -2px;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.bbi-bp-page mark.is-on { background: #ffe066; color: #4d3a00; }

.bbi-bp-goals,
.bbi-bp-lock,
.bbi-bp-roster { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

.bbi-bp-goal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px 0 9px;
  border-radius: 9px;
  background: rgba(94, 114, 228, 0.1);
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-indigo);
  white-space: nowrap;
}

.bbi-bp-goal svg { width: 14px; height: 14px; }
.bbi-bp-goal em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--bbi-muted); }

.bbi-bp-lock__arrow svg { display: block; width: 16px; height: 16px; color: var(--bbi-muted); }

.bbi-bp-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--bbi-surface-2);
  white-space: nowrap;
}

.bbi-bp-person .bbi-avatar { width: 30px; height: 30px; box-shadow: 0 0 0 2px #fff; }
.bbi-bp-person b { display: block; font-size: 13px; font-weight: 800; line-height: 1.2; color: var(--bbi-ink); }
.bbi-bp-person small { display: block; font-size: 11.5px; font-weight: 700; color: var(--bbi-muted); }

.bbi-bp-note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffcf0;
  border: 1px solid #f5e8b8;
  font-size: 13px;
  font-weight: 600;
  color: var(--bbi-ink);
}

/* Pinned comment thread */
.bbi-bp-thread {
  z-index: 6;
  padding: 12px 14px 14px;
  box-shadow: var(--bbi-shadow-lg);
}

.bbi-bp-thread::before {
  content: '';
  position: absolute;
  left: -7px;
  top: var(--bp-arrow, 60px);
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid rgba(94, 114, 228, 0.1);
  border-bottom: 1px solid rgba(94, 114, 228, 0.1);
  transform: rotate(45deg);
}

.bbi-bp-thread__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-muted);
}

.bbi-bp-thread__head svg { width: 14px; height: 14px; color: var(--bbi-indigo); }

.bbi-bp-thread__head span { white-space: nowrap; }

.bbi-bp-msg__who { display: flex; align-items: center; gap: 8px; }
.bbi-bp-msg__who .bbi-avatar { width: 26px; height: 26px; box-shadow: 0 0 0 2px #fff; }
.bbi-bp-msg__who b { font-size: 13px; font-weight: 800; color: var(--bbi-ink); }
.bbi-bp-msg__who small { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--bbi-muted); }

.bbi-bp-msg p {
  margin: 6px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--bbi-ink);
}

.bbi-bp-at {
  padding: 0 3px;
  border-radius: 5px;
  background: rgba(94, 114, 228, 0.12);
  font-weight: 800;
  color: var(--bbi-indigo);
}

.bbi-bp-reply {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--bbi-line);
}
