.bb-root {
  --bg: #f6f5f2;
  --panel: #ffffff;
  --border: #e2e0da;
  --text: #2b2a27;
  --muted: #79766e;
  --accent: #8ba33f;
  --accent-dark: #6f8631;
  --danger: #c1543e;
  --radius: 10px;

  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: 100dvh;
  background: var(--bg);
  border: 1px solid var(--border);
}
.admin-logged .bb-root {
  min-height: calc(100dvh - 25px);
}
.bb-root * {
  box-sizing: border-box;
}
.bb-sidebar {
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px;
  max-height: 100%;
}
.bb-preview-pane {
  overflow-y: auto;
  padding: 32px;
}
.bb-root h1 {
  font-size: 16px;
  margin: 0 0 4px;
}
.bb-root .bb-sub {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 20px;
}
.bb-root select,
.bb-root input[type="text"],
.bb-root textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.bb-root textarea {
  resize: vertical;
  min-height: 60px;
}
.bb-root label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin: 10px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.bb-presets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.bb-presets button {
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fbfaf8;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.bb-presets button:hover {
  border-color: var(--accent);
}
.bb-add-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.bb-add-row select {
  flex: 1;
}
.bb-add-row button {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.bb-add-row button:hover {
  background: var(--accent-dark);
}
.bb-block-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #fff;
}
.bb-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}
.bb-block-head .bb-name {
  font-size: 13px;
  font-weight: 600;
}
.bb-block-controls {
  display: flex;
  gap: 4px;
}
.bb-block-controls button {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.bb-block-controls button:hover {
  background: #f0efeb;
  color: var(--text);
}
.bb-block-controls button.bb-remove:hover {
  color: var(--danger);
}
.bb-block-body {
  padding: 0 12px 14px;
  display: none;
}
.bb-block-body.bb-open {
  display: block;
}
.bb-checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.bb-checkbox-row input {
  width: auto;
}
.bb-checkbox-row label {
  margin: 0;
  text-transform: none;
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}
.bb-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.bb-output {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.bb-output button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 8px;
}
.bb-output textarea {
  height: 140px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.bb-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 40px 0;
}
.bb-preview-wrap {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.bb-picker {
  position: relative;
  margin-bottom: 16px;
}
.bb-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bb-picker-trigger:hover {
  background: var(--accent-dark);
}
.bb-picker-caret {
  font-size: 11px;
  opacity: 0.8;
}
.bb-picker-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}
.bb-picker.bb-picker-open .bb-picker-panel {
  display: grid;
}
.bb-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 10px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #fbfaf8;
  cursor: pointer;
  font-size: 11px;
  color: var(--text);
  line-height: 1.3;
}
.bb-tile:hover {
  border-color: var(--accent);
  background: #f2f5e9;
}
.bb-tile-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
}
.bb-tile-icon svg {
  width: 100%;
  height: 100%;
}
.bb-tile-name {
  font-weight: 500;
}
.bb-list-field { margin: 8px 0; }
.bb-list-items { display: flex; flex-direction: column; gap: 10px; margin: 6px 0; }
.bb-list-item {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bb-list-item-remove {
    align-self: flex-start;
    background: #fdecea;
    color: #c62828;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
}
.bb-list-add {
    background: var(--accent, #e08858);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
}

/* ---- rendered block styles (this part also ships in the site's separate CSS file) ---- */
.bb-block {
  padding: 48px 40px;
}
.bb-row {
  display: flex;
  gap: 36px;
  align-items: center;
}
.bb-row.bb-flip {
  flex-direction: row-reverse;
}
.bb-col {
  flex: 1;
  min-width: 0;
}
.bb-heading {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #222;
}
.bb-rule {
  width: 60px;
  height: 3px;
  background: var(--accent, #8ba33f);
  border: none;
  margin: 0 0 18px;
  border-radius: 2px;
}
.bb-text {
  font-size: 15px;
  line-height: 1.6;
  color: #3d3d3d;
  margin: 0;
}
.bb-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  background: #eee;
}
.bb-list {
  margin: 0;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.9;
  color: #3d3d3d;
}
.bb-list b {
  color: #222;
}
.bb-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.bb-switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d8d6cf;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.bb-switch-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.bb-switch.bb-switch-on {
  background: var(--accent);
}
.bb-switch.bb-switch-on .bb-switch-thumb {
  left: 21px;
}
.bb-switch-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.bb-cols3 {
  display: flex;
  gap: 24px;
}
.bb-cols3 .bb-col3 {
  flex: 1;
  min-width: 0;
}
.bb-cols3 .bb-heading {
  font-size: 17px;
}
.bb-full-image {
  width: 100%;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  background: #eee;
}
.bb-qa-item{border-top:1px solid #e2e0da;padding:16px 0;}
.bb-qa-item:first-child{border-top:none;}
.bb-qa-q{
  font-weight:700;color:#222;margin:0;font-size:15px;
  cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;
}
.bb-qa-q::-webkit-details-marker{display:none;}
.bb-qa-q::after{content:"+";font-weight:400;color:var(--accent, #8ba33f);font-size:18px;margin-left:12px;}
.bb-qa-item[open] .bb-qa-q::after{content:"–";}
.bb-qa-a{margin:10px 0 0;font-size:14px;line-height:1.6;color:#3d3d3d;}

.bb-grid3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
}
.bb-grid3-a { grid-column: 1; grid-row: 1; }
.bb-grid3-b { grid-column: 1; grid-row: 2; }
.bb-grid3-c { grid-column: 2; grid-row: 1 / 3; }

.bb-grid3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bb-grid4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.bb-grid4 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bb-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.bb-grid2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bb-bars {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.bb-bar-label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}
.bb-bar-track {
    width: 100%;
    height: 10px;
    background: #f0f0f0;
    border-radius: 999px;
    overflow: hidden;
}
.bb-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
}

.bb-proscons {
    display: flex;
    gap: 40px;
}
.bb-proscons-col {
    flex: 1;
}
.bb-proscons-col h4 {
    margin: 0 0 12px 0;
    font-weight: 700;
}
.bb-proscons-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bb-proscons-col li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.bb-icon {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
}
.bb-plus {
    background: #e6f4ea;
    color: #2e7d32;
}
.bb-minus {
    background: #fdecea;
    color: #c62828;
}

@media (max-width:767px) {
.bb-row,
.bb-row.bb-flip {
    gap: 36px;
    flex-direction: column;
}
.bb-cols3 {
    gap: 16px;
    flex-direction: column;
}
.bb-col {
    flex: 100%;
    min-width: 100%;
}
.bb-grid3 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 16px;
    }
    .bb-grid3-a,
    .bb-grid3-b,
    .bb-grid3-c {
        grid-column: 1;
        grid-row: auto;
    }
.bb-grid4 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
.bb-grid2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
.bb-bars { gap: 20px; }
.bb-proscons {
        gap: 24px;
        flex-direction: column;
    }
}