@font-face {
  font-family: "Roboto";
  src: url("/static/fonts/Roboto.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Condensed";
  src: url("/static/fonts/RobotoCondensed.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bcause-orange: #ec430f;
  --bcause-orange-dark: #c93609;
  --bcause-teal: #084c61;
  --bcause-accent: #ff5033;
  --bcause-grey: #ebebeb;
  --bcause-ink: #252525;
  --bcause-muted: #6c757d;
  --bcause-line: #e4e4e4;
  --bs-body-font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--bcause-ink);
  --bs-link-color: var(--bcause-orange);
  --bs-link-hover-color: var(--bcause-orange-dark);
  --bs-border-radius: 10px;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--bs-body-font-family);
  color: var(--bcause-ink);
  background: #fff;
}

h1, h2, h3, h4, .display-5 {
  font-family: "Roboto", sans-serif;
  letter-spacing: -0.01em;
}
h3, .h5, .eyebrow, .brand-text {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--bcause-line);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.brand { text-decoration: none; color: var(--bcause-ink); }
.brand-logo { height: 44px; width: auto; }
.brand-text { font-weight: 700; font-size: 1.2rem; }
.brand-sub {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bcause-orange);
  margin-left: .2rem;
}
.main-nav a {
  color: var(--bcause-ink);
  text-decoration: none;
  font-weight: 500;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--bcause-orange); border-bottom-color: var(--bcause-orange); }
.demo-badge {
  background: var(--bcause-teal);
  color: #fff;
  border-radius: 999px;
  padding: .18rem .55rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.user-chip {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .9rem;
  color: var(--bcause-muted);
}

.btn-bcause {
  background: var(--bcause-orange);
  border-color: var(--bcause-orange);
  color: #fff;
  font-weight: 600;
}
.btn-bcause:hover, .btn-bcause:focus {
  background: var(--bcause-orange-dark);
  border-color: var(--bcause-orange-dark);
  color: #fff;
}
.link-bcause { color: var(--bcause-orange); text-decoration: none; font-weight: 600; }
.link-bcause:hover { color: var(--bcause-orange-dark); }
.link-muted { color: var(--bcause-muted); text-decoration: none; }
.link-muted:hover { color: var(--bcause-orange); }

.impersonation-banner {
  background: var(--bcause-teal);
  color: #fff;
  font-size: .92rem;
}
.impersonation-banner a { color: #fff; }

.hero {
  background: linear-gradient(135deg, #fff 0%, #f7fbfc 55%, #e9f4f7 100%);
  border: 1px solid var(--bcause-line);
  border-radius: 18px;
  padding: 2.2rem;
}
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bcause-orange);
  font-weight: 700;
  margin-bottom: .5rem;
}
.demo-card {
  background: var(--bcause-teal);
  color: #fff;
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 16px 40px rgba(8, 76, 97, .18);
}
.demo-card-label {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
  opacity: .8;
  margin-bottom: .8rem;
}
.demo-card li { padding: .28rem 0; font-size: .95rem; }

.info-card {
  background: #fff;
  border: 1px solid var(--bcause-line);
  border-radius: 14px;
  padding: 1.3rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.03);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.empty-state {
  border: 1px dashed #cfd6da;
  border-radius: 14px;
  padding: 2rem;
  background: #fafcfd;
  color: var(--bcause-muted);
}

.auth-wrap {
  max-width: 880px;
  margin: 1rem auto 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--bcause-line);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}
.status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  background: #f6f9fa;
  border: 1px solid var(--bcause-line);
  border-radius: 12px;
  padding: .75rem 1rem;
}
.section-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #e6f2f5;
  border-left: 4px solid var(--bcause-teal);
  border-radius: 6px;
  padding: .6rem .9rem;
  color: var(--bcause-teal);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: .95rem;
}
.section-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--bcause-teal);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
}
.declaration-box {
  max-height: 16rem;
  overflow-y: auto;
  background: #fbfbfb;
  border: 1px solid var(--bcause-line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  font-size: .9rem;
}
.repeater-row {
  background: #fbfbfb;
  border-color: var(--bcause-line) !important;
}
.auth-card-wide {
  grid-column: 1 / -1;
  max-width: 900px;
  margin: 0 auto;
}
.demo-credentials {
  background: #f6f9fa;
  border: 1px solid var(--bcause-line);
  border-radius: 16px;
  padding: 1.1rem;
}
@media (max-width: 767.98px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .hero { padding: 1.4rem; }
  .brand-text { display: none; }
}

.form-control:focus, .form-select:focus {
  border-color: var(--bcause-orange);
  box-shadow: 0 0 0 .2rem rgba(236, 67, 15, .15);
}

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

.status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: .2rem .6rem;
  font-size: .76rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-neutral { background: #eef1f3; color: #43505a; border-color: #dfe5e8; }
.status-teal { background: #e2f1f5; color: var(--bcause-teal); border-color: #c6e4eb; }
.status-amber { background: #fff3d6; color: #8a5b00; border-color: #f4dfa9; }
.status-green { background: #e5f6eb; color: #1d6b3a; border-color: #c7e9d2; }
.status-grey { background: #eceff1; color: #546169; border-color: #dde3e6; }
.status-red { background: #fde8e5; color: #a83420; border-color: #f7cfc8; }
.status-dark { background: #e2e7e9; color: #2e3b42; border-color: #cbd4d8; }

.site-footer {
  margin-top: 4rem;
  background: var(--bcause-orange);
  color: #fff;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff3ee; }

.feedback-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--bcause-teal);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 8px 24px rgba(8, 76, 97, .35);
  z-index: 1040;
}
.feedback-fab:hover { background: #0b5d75; }
@media (max-width: 575.98px) {
  .feedback-fab { width: 48px; height: 48px; font-size: 1.1rem; }
  .site-footer { margin-bottom: 3.6rem; }
}

.feedback-picker-bar {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: .9rem;
  width: min(760px, calc(100vw - 8rem));
  padding: .65rem .8rem .65rem 1rem;
  border-radius: 14px;
  background: rgba(8, 76, 97, .97);
  color: #fff;
  box-shadow: 0 12px 32px rgba(8, 76, 97, .35);
}
.feedback-picker-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.feedback-picker-hint { font-size: .82rem; color: #cfe7ee; }
.feedback-picker-current {
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feedback-picker-actions { display: flex; gap: .35rem; flex-shrink: 0; }
.feedback-inspect-outline {
  position: fixed;
  z-index: 1039;
  pointer-events: none;
  border: 2px solid var(--bcause-orange);
  border-radius: 6px;
  background: rgba(236, 67, 15, .08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .65) inset;
  box-sizing: border-box;
}
.feedback-inspect-label {
  position: fixed;
  z-index: 1040;
  pointer-events: none;
  max-width: min(420px, 70vw);
  padding: .16rem .45rem;
  border-radius: 4px;
  background: var(--bcause-teal);
  color: #fff;
  font-size: .74rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.feedback-picking,
body.feedback-picking * {
  cursor: crosshair !important;
  user-select: none !important;
}
.feedback-reference {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
  padding: .65rem .8rem;
  border: 1px solid #c6e4eb;
  border-radius: 10px;
  background: #f2f8fa;
}
.feedback-reference-main { min-width: 0; }
.feedback-reference-label { font-weight: 600; font-size: .92rem; }
.feedback-reference-hint {
  margin-top: .1rem;
  font-size: .76rem;
  color: var(--bcause-muted);
  word-break: break-all;
}
.feedback-reference-actions { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }
.feedback-toast {
  position: fixed;
  right: 1.1rem;
  bottom: 5.6rem;
  z-index: 1060;
  max-width: min(360px, calc(100vw - 2rem));
  padding: .65rem .9rem;
  border-radius: 10px;
  background: #1d6b3a;
  color: #fff;
  font-size: .9rem;
  box-shadow: 0 10px 26px rgba(8, 76, 97, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.feedback-toast.show { opacity: 1; visibility: visible; transform: translateY(0); }
.feedback-located {
  outline: 3px solid var(--bcause-orange) !important;
  outline-offset: 3px !important;
  animation: feedbackPulse 1.2s ease-in-out 4;
}
.feedback-located-changed {
  outline: 2px dashed var(--bcause-orange) !important;
  outline-offset: 3px !important;
}
.feedback-locate-notice {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1060;
  display: flex;
  align-items: center;
  gap: .75rem;
  max-width: min(640px, calc(100vw - 2rem));
  padding: .6rem .75rem .6rem .9rem;
  border: 1px solid #f4dfa9;
  border-radius: 10px;
  background: #fff3d6;
  color: #5a3a00;
  font-size: .88rem;
  box-shadow: 0 10px 26px rgba(8, 76, 97, .18);
}
.feedback-locate-notice .btn-close { flex-shrink: 0; }
@keyframes feedbackPulse {
  0%, 100% { outline-color: var(--bcause-orange); }
  50% { outline-color: var(--bcause-teal); }
}
@media (max-width: 575.98px) {
  .feedback-picker-bar {
    width: calc(100vw - 1.4rem);
    padding-right: 4.6rem;
    align-items: flex-start;
    flex-direction: column;
  }
  .feedback-picker-actions { width: 100%; }
  .feedback-picker-actions .btn { flex: 1; }
  .feedback-toast { right: .8rem; bottom: 4.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .feedback-located { animation: none; }
  .feedback-toast { transition: none; }
  html { scroll-behavior: auto; }
}

.table-bcause thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--bcause-muted);
  border-bottom-color: var(--bcause-line);
}
.table-bcause td { vertical-align: middle; }

.program-card {
  background: #fff;
  border: 1px solid var(--bcause-line);
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 6px 20px rgba(0,0,0,.04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.program-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.08); }
.program-cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bcause-teal), #0d6b84);
}
.program-cover img { width: 100%; height: 100%; object-fit: cover; }
.program-cover-placeholder { display: flex; align-items: flex-end; padding: 1rem; }
.program-cover-title { color: #fff; font-family: "Roboto Condensed", sans-serif; font-weight: 700; font-size: 1.35rem; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.program-card-body { padding: 1.15rem 1.2rem 1.3rem; }
.program-card-body h2 a { color: var(--bcause-ink); text-decoration: none; }
.program-card-body h2 a:hover { color: var(--bcause-orange); }

.program-detail-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  align-items: stretch;
  background: #f8fbfc;
  border: 1px solid var(--bcause-line);
  border-radius: 18px;
  overflow: hidden;
}
.program-detail-cover { min-height: 260px; }
.program-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.program-detail-intro { padding: 1.6rem 1.6rem 1.6rem 0; }
@media (max-width: 767.98px) {
  .program-detail-hero { grid-template-columns: 1fr; }
  .program-detail-intro { padding: 0 1.2rem 1.2rem; }
}

.content-card {
  background: #fff;
  border: 1px solid var(--bcause-line);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.03);
}
.rich-text { line-height: 1.7; }
.rich-text h2, .rich-text h3, .rich-text h4 { margin-top: 1.2rem; }
.rich-text blockquote { border-left: 3px solid var(--bcause-orange); padding-left: 1rem; color: var(--bcause-muted); }

.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-list li {
  position: relative;
  padding: 0 0 1.1rem 1.25rem;
  border-left: 2px solid #dbe5e9;
}
.timeline-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-list li::before {
  content: "";
  position: absolute;
  left: -6px; top: .3rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bcause-orange);
}

.admin-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--bcause-line); }
.admin-tabs a {
  padding: .55rem .9rem;
  color: var(--bcause-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-weight: 500;
}
.admin-tabs a:hover { color: var(--bcause-orange); }
.admin-tabs a.active { color: var(--bcause-orange); border-bottom-color: var(--bcause-orange); }

.quill-editor { min-height: 190px; background: #fff; border-radius: 0 0 10px 10px; }
.ql-toolbar.ql-snow { border-color: var(--bcause-line); border-radius: 10px 10px 0 0; }
.ql-container.ql-snow { border-color: var(--bcause-line); font-family: var(--bs-body-font-family); font-size: 1rem; }

.feedback-list { display: grid; gap: .9rem; }
.feedback-item {
  background: #fff;
  border: 1px solid var(--bcause-line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.feedback-item p { white-space: pre-wrap; }

.question-list .content-card { border-left: 3px solid #dbe5e9; }
.question-list .content-card:hover { border-left-color: var(--bcause-orange); }

.stat-card {
  background: #fff;
  border: 1px solid var(--bcause-line);
  border-radius: 14px;
  padding: 1rem;
  height: 100%;
}
.stat-value { font-family: "Roboto Condensed", sans-serif; font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--bcause-teal); }
.stat-label { font-size: .78rem; color: var(--bcause-muted); margin-top: .2rem; }

.milestone-timeline { display: grid; gap: .8rem; }
.milestone-item { border: 1px solid var(--bcause-line); border-radius: 12px; padding: .85rem 1rem; background: #fbfcfd; }

.rich-text.clamped {
  max-height: 290px;
  overflow: hidden;
  position: relative;
}
.rich-text.clamped::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 80px;
  background: linear-gradient(rgba(255,255,255,0), #fff);
}

.page-group-chip {
  display: inline-flex;
  flex-direction: column;
  gap: .1rem;
  border: 1px solid var(--bcause-line);
  border-radius: 10px;
  padding: .45rem .65rem;
  color: var(--bcause-ink);
  text-decoration: none;
  background: #fbfcfd;
}
.page-group-chip:hover { border-color: var(--bcause-orange); color: var(--bcause-orange); }

.feedback-notes-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 4.9rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(8, 76, 97, .25);
  background: #fff;
  color: var(--bcause-teal);
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(8, 76, 97, .18);
  z-index: 1040;
}
.feedback-notes-toggle:hover { background: #f2f8fa; }
.feedback-notes-pane { width: min(430px, 100vw) !important; }
.feedback-note {
  border: 1px solid var(--bcause-line);
  border-radius: 12px;
  padding: .75rem .85rem;
  margin-bottom: .75rem;
  background: #fff;
}
.feedback-note p { white-space: pre-wrap; margin-bottom: .5rem; }
@media (max-width: 575.98px) {
  .feedback-notes-toggle { right: 1.3rem; bottom: 4.4rem; width: 40px; height: 40px; }
}

#form-builder .builder-section {
  border: 1px solid #d5e4e9;
  border-left: 4px solid var(--bcause-teal);
  border-radius: 14px;
  padding: .85rem;
  margin-bottom: .85rem;
  background: #fbfcfd;
}
#form-builder .builder-section-fixed {
  border-style: dashed;
  border-left: 4px solid var(--bcause-teal);
  background: #fff;
}
#form-builder .builder-section-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .7rem;
  padding: .35rem .5rem;
  background: #e8f2f4;
  border: 1px solid #cfe0e5;
  border-radius: 10px;
}
#form-builder .section-title-form {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1 1 18rem;
}
#form-builder .drag-handle {
  cursor: grab;
  user-select: none;
  color: var(--bcause-muted);
  font-size: 1.05rem;
  line-height: 1;
  padding: .2rem .35rem;
  border-radius: 6px;
}
#form-builder .drag-handle:hover { background: #eef4f6; color: var(--bcause-teal); }
#form-builder .drag-handle:active { cursor: grabbing; }
#form-builder .builder-questions {
  min-height: 3rem;
  padding: .25rem;
  border-radius: 10px;
  transition: background .15s ease;
}
#form-builder .builder-questions.sortable-ghost { background: #fff4ef; }
#form-builder .question-card {
  background: #fff;
  border: 1px solid var(--bcause-line);
  border-radius: 12px;
  padding: .7rem .8rem;
  margin-bottom: .55rem;
}
#form-builder .question-card-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
#form-builder .question-card.sortable-ghost { opacity: .45; }
#form-builder .builder-section.sortable-ghost { opacity: .55; }

.tag-list { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 1.6rem; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: #eef4f6;
  border: 1px solid #cfe0e5;
  color: var(--bcause-teal);
  border-radius: 999px;
  padding: .15rem .3rem .15rem .6rem;
  font-size: .85rem;
}
.tag-chip .tag-remove {
  border: 0;
  background: transparent;
  color: var(--bcause-muted);
  line-height: 1;
  padding: 0 .2rem;
  font-size: 1rem;
}
.tag-chip .tag-remove:hover { color: var(--bcause-orange); }
.tag-value-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem;
  margin-bottom: .35rem;
  border: 1px solid var(--bcause-line);
  border-radius: 10px;
  background: #fff;
}
.tag-value-row .form-control,
.tag-value-row .form-select { min-width: 8rem; }
.tag-value-row .drag-handle { cursor: grab; }

.question-preview-box {
  border: 1px dashed #cfe0e5;
  border-radius: 12px;
  padding: .75rem .9rem;
  background: #fbfcfd;
}

.flow-steps {
  background: rgba(255, 255, 255, .96);
  padding: .5rem 0;
  z-index: 1020;
  border-bottom: 1px solid var(--bcause-line);
}

.milestone-list { display: grid; gap: .75rem; }
.milestone-card {
  border: 1px solid var(--bcause-line);
  border-radius: 12px;
  padding: .75rem .85rem;
  background: #fbfcfd;
}

.rich-editor-surface {
  min-height: 130px;
  overflow-y: auto;
}
.rich-editor-single .rich-editor-surface {
  min-height: auto;
  white-space: nowrap;
  overflow-x: auto;
}
.placeholder-chip {
  display: inline-block;
  background: #eef4f6;
  border: 1px solid #cfe0e5;
  color: var(--bcause-teal);
  border-radius: 999px;
  padding: .05rem .45rem;
  font-size: .85rem;
  white-space: nowrap;
}
.placeholder-menu .dropdown-item { white-space: normal; }

@media (min-width: 992px) {
  .builder-preview-card { position: sticky; top: 90px; }
}

/* The section the question was dragged from keeps its normal expanded
   appearance for the whole drag. Only the other sections compact. */
#form-builder.layout-summary-mode .builder-section:not(.summary-source) {
  padding: .35rem .45rem;
  margin-bottom: .35rem;
}
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .builder-section-head {
  margin-bottom: .25rem;
}
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .section-title-form button,
#form-builder.layout-summary-mode .builder-section:not(.summary-source) [data-add-question],
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .question-card-head [data-bs-toggle],
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .question-card .collapse,
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .question-preview-box,
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .question-card-head .text-bg-warning {
  display: none;
}
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .section-title-form .section-heading-input {
  border: 0;
  background: transparent;
  padding: 0;
  height: auto;
  font-weight: 600;
  pointer-events: none;
}
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .builder-questions {
  min-height: 1rem;
  padding: 0;
}
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .question-card {
  padding: .15rem .35rem;
  margin-bottom: .15rem;
  border-radius: 8px;
}
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .question-card-head {
  gap: .35rem;
}
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .drag-handle {
  font-size: 1rem;
  padding: .05rem .2rem;
}

#form-builder.layout-summary-sections .builder-questions,
#form-builder.layout-summary-questions .builder-section:not(.summary-source) .builder-questions {
  display: none;
}
#form-builder.layout-summary-questions .builder-section.summary-expanded .builder-questions {
  display: block;
}
#form-builder.layout-summary-questions .builder-section {
  cursor: pointer;
}
#form-builder.layout-summary-questions .builder-section.summary-expanded {
  border-color: var(--bcause-orange);
  background: #fff8f4;
}
#form-builder .sortable-drag,
#form-builder .sortable-ghost,
#form-builder .sortable-fallback {
  pointer-events: none;
}

#form-builder .section-heading-input {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  height: auto;
  padding: .2rem .4rem;
  color: var(--bcause-teal);
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}
#form-builder .section-heading-input:hover {
  background: #fff;
  border-color: #cfe0e5;
}
#form-builder .section-heading-input:focus {
  background: #fff;
  border-color: var(--bcause-teal);
  box-shadow: 0 0 0 .18rem rgba(8, 76, 97, .12);
}
#form-builder .section-question-count {
  background: var(--bcause-teal);
  color: #fff;
  border-radius: 999px;
  padding: .28rem .6rem;
  font-size: .75rem;
  font-weight: 700;
}
#form-builder .question-card-head .fw-semibold {
  font-size: .98rem;
  font-weight: 600;
}
#form-builder.layout-summary-mode .section-title-form .section-heading-input {
  font-size: 1.05rem;
  font-weight: 700;
}
.question-preview-box {
  border: 1px solid #b9d6de;
  border-left: 4px solid var(--bcause-teal);
  border-radius: 12px;
  padding: .85rem 1rem;
  background: #edf6f8;
}
.question-preview-box > .small.text-muted {
  display: inline-block;
  background: var(--bcause-teal);
  color: #fff !important;
  border-radius: 999px;
  padding: .2rem .6rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.question-preview-box .question-preview-inert {
  background: #fff;
  border: 1px dashed #b9d6de;
  border-radius: 10px;
  padding: .75rem .9rem;
}

#form-builder .builder-section {
  scroll-margin-top: 90px;
}
#form-builder .builder-section:target {
  border-color: var(--bcause-orange);
  box-shadow: 0 0 0 3px rgba(236, 67, 15, .14);
}

.section-insert-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: .2rem 0;
}
.section-insert-line {
  flex: 1;
  border-top: 1px dashed #cfe0e5;
}
.section-insert-panel {
  flex-basis: 100%;
}
.builder-section.section-collapsed .builder-questions,
.builder-section.section-collapsed .add-question-panel {
  display: none;
}
.section-toggle {
  text-decoration: none;
  color: var(--bcause-muted);
  font-size: 1rem;
  line-height: 1;
}
.section-toggle:hover { color: var(--bcause-teal); }
#form-builder.layout-summary-mode .section-insert-control,
#form-builder.layout-summary-mode .section-toggle,
#form-builder.layout-summary-mode [data-toggle-all-sections] {
  display: none;
}

.section-insert-button,
.question-insert-button,
.milestone-insert-button {
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  line-height: 1;
  border-radius: 50%;
  font-weight: 700;
}
.question-insert-control {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: .1rem 0;
  opacity: .55;
  transition: opacity .15s ease;
}
.question-insert-control:hover,
.question-insert-control:focus-within {
  opacity: 1;
}
.question-insert-line {
  flex: 1;
  border-top: 1px dashed #dbe5e9;
}
.milestone-insert-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin: .35rem 0;
  opacity: .55;
  transition: opacity .15s ease;
}
.milestone-insert-control:hover,
.milestone-insert-control:focus-within { opacity: 1; }
.milestone-insert-line {
  flex: 1;
  border-top: 1px dashed #dbe5e9;
}
.milestone-insert-panel { flex-basis: 100%; }
#form-builder.layout-summary-mode .builder-section:not(.summary-source) .question-insert-control {
  display: none;
}

#form-builder.layout-summary-mode .add-question-panel {
  display: none;
}
