:root {
  color-scheme: light;
  --muted: #566a62;
  --reading-secondary: #51675e;
  --toolbar-height: 78px;
}
body {
  font-size: 16px;
  line-height: 1.9;
}
.brand > span:last-child {
  min-width: 0;
}
.brandmark {
  flex-shrink: 0;
}
.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.guide-section {
  font-size: 16px;
}
.guide-section summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.9;
}
.guide-section summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
  border-radius: 4px;
}
.guide-section-body {
  padding-block-start: 16px;
  max-width: 90ch;
}
.guide-section-body p {
  margin: 0;
}
.language-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--toolbar-height);
}
.language-bar form {
  flex-wrap: wrap;
}
.sidebar {
  top: var(--toolbar-height);
  overflow-y: auto;
}
.impersonation-banner {
  top: var(--toolbar-height);
}
.has-impersonation .sidebar {
  top: calc(var(--toolbar-height) + 90px);
  height: calc(100vh - var(--toolbar-height) - 90px);
}
#theme-toggle {
  flex-shrink: 0;
  min-height: 42px;
}
.project-links,
.project-bottom,
.page-heading,
.topbar {
  flex-wrap: wrap;
}
.project-links {
  row-gap: 12px;
}
.steps {
  overflow-x: auto;
}
.step {
  flex-shrink: 0;
  white-space: normal;
}
.form-control,
.form-select,
.public-survey .form-control,
.public-survey .form-select {
  font-size: 16px;
  min-height: 44px;
}
.pair-card h3 {
  font-size: 17px;
  line-height: 1.9;
}
.subtitle,
.field-hint,
.stat-label,
.stat-note,
.project-meta,
.response-count small,
.nav-caption,
.brand small,
.profile small,
.footer,
.soft-text,
.muted-count,
.help-card p,
.top-actions .date,
.survey-heading p,
.panel-title p,
.admin-metric span,
.admin-brand span,
.pagination-bar,
.project-links a,
.guide-card p,
.help-content,
.scale-legend,
.legend-item {
  color: var(--reading-secondary);
}
.table {
  --bs-table-color: var(--ink);
}
.search-box input::placeholder,
.form-control::placeholder {
  color: var(--reading-secondary);
  opacity: 1;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #148b75;
  outline-offset: 3px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --surface: #101b23;
  --ink: #edf4f1;
  --muted: #bacbc4;
  --reading-secondary: #bacbc4;
  --line: #3a505b;
  --deep: #d7eee6;
  --mint: #223f3c;
  --green: #40c9ad;
  --bs-body-color: #edf4f1;
  --bs-body-bg: #101b23;
  --bs-border-color: #3a505b;
}
html[data-theme="dark"]
  :is(
    .sidebar,
    .topbar,
    .language-bar,
    .panel,
    .project-card,
    .stat,
    .admin-metric,
    .guide-card,
    .pair-card,
    .modal-card,
    .popup-menu,
    .sort-menu,
    .dropdown-menu,
    .builder-field,
    .node,
    .survey-heading,
    .preview-form,
    .settings-preview,
    .pages button,
    .view-switch,
    .form-control,
    .form-select,
    .search-box input,
    .icon-btn,
    .help-card button,
    .steps,
    .btn-light
  ) {
  background-color: #1b2b35;
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"]
  :is(
    .help-card,
    .hero,
    .builder-canvas,
    .chart-viewport,
    .scale-preview,
    .node.root,
    .project-bottom,
    .table th,
    .table thead,
    .share-link,
    .field-tool,
    .option-item,
    .details-grid,
    .detail-item,
    .detail-tile,
    .mock-input,
    .mini-banner,
    .pair-endpoints span,
    .settings-preview,
    .tabs,
    .step,
    .note
  ) {
  background-color: #22363e;
  color: var(--ink);
  border-color: var(--line);
}
/* Override the light gradient, not only the color underneath it. */
html[data-theme="dark"] .help-card {
  background: linear-gradient(135deg, #223b3e, #1b2b35);
}
html[data-theme="dark"] .help-card p,
html[data-theme="dark"] .detail-tile small,
html[data-theme="dark"] .modal-description,
html[data-theme="dark"] .upload-box,
html[data-theme="dark"] .ticks,
html[data-theme="dark"] .breadcrumb-text {
  color: var(--reading-secondary);
}
html[data-theme="dark"] .step {
  background: transparent;
  color: var(--reading-secondary);
  border-radius: 6px;
  padding: 6px;
}
html[data-theme="dark"] .step span {
  background: #344b56;
  color: #e0eee8;
  flex-shrink: 0;
}
html[data-theme="dark"] .step:not(:last-child)::after {
  border-color: var(--line);
}
html[data-theme="dark"] .step.active span {
  background: #087f6d;
  color: #fff;
}
html[data-theme="dark"] :is(.icon-btn, .help-card button) {
  color: #b6dfd2;
  box-shadow: none;
}
html[data-theme="dark"] :is(.icon-btn, .help-card button) .ico {
  color: inherit;
}
html[data-theme="dark"]
  :is(
    .icon-btn:hover,
    .help-card button:hover,
    .popup-menu button:hover,
    .field-tool:hover
  ) {
  background: #304b54;
  color: #e3fff5;
  border-color: #658e86;
}
html[data-theme="dark"] .option-item input {
  background: transparent;
  color: var(--ink);
}
html[data-theme="dark"] .survey-heading,
html[data-theme="dark"] .mini-preview,
html[data-theme="dark"] .upload-box {
  border-color: var(--line);
}
html[data-theme="dark"] .preview-progress {
  background: #344b56;
}
html[data-theme="dark"] .chart-viewport {
  background-image: radial-gradient(#48606b 1px, transparent 1px);
}
html[data-theme="dark"]
  :is(
    .side-link,
    .project-title,
    .breadcrumb-text b,
    .help-card strong,
    .help-content strong,
    .pair-card h3,
    .form-label,
    .radio-label,
    .public-survey .field-options label,
    .public-survey .form-control,
    .public-survey .form-select,
    .admin-nav a,
    .btn-quiet,
    .tree textarea,
    .node textarea,
    .field-tool,
    .project-links a
  ) {
  color: var(--ink);
}
html[data-theme="dark"]
  :is(
    .side-link.active,
    .admin-nav .selected,
    .step.active,
    .tab-btn.active,
    .view-switch button.selected,
    .pages button.current,
    .badge-status,
    .avatar,
    .stat-icon,
    .project-symbol
  ) {
  background: #254b43;
  color: #b6f5df;
}
html[data-theme="dark"]
  :is(
    .badge-status.draft,
    .badge-status.inactive,
    .lock-note,
    .preview-banner,
    .impersonation-banner
  ) {
  background: #423a25;
  color: #ffe5a0;
  border-color: #75653d;
}
html[data-theme="dark"]
  :is(.btn-primary, .btn-primary:hover, .btn-primary:focus, .brandmark) {
  background-color: #087f6d;
  border-color: #35a98c;
  color: #fff;
}
html[data-theme="dark"] :is(.text-danger, .danger, .error-msg, .required) {
  color: #ffaaa7 !important;
}
html[data-theme="dark"] .table {
  --bs-table-bg: #1b2b35;
  --bs-table-color: #edf4f1;
  --bs-table-border-color: #3a505b;
  color: var(--ink);
}
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] :is(.node textarea, .node input) {
  background: transparent;
}
html[data-theme="dark"] .btn-light:hover {
  background: #2d4650;
}
html[data-theme="dark"] .modal-backdrop-custom {
  background: #0009;
}
html[data-theme="dark"]
  :is(
    .stat-number,
    .response-count strong,
    .admin-brand,
    .hero h2,
    .hero p,
    .hero-link,
    .scale-legend b,
    .detail-value
  ) {
  color: #b6f5df;
}
@media (max-width: 760px) {
  :root {
    --toolbar-height: 118px;
  }
  .language-bar {
    align-items: flex-start;
    padding: 10px 12px;
  }
  .language-bar form {
    gap: 6px;
    max-width: 235px;
  }
  .language-bar label {
    width: 100%;
  }
  .language-bar .btn {
    padding: 7px 9px;
  }
  .language-bar select {
    min-width: 90px;
  }
  .has-impersonation .sidebar {
    top: var(--toolbar-height);
    height: calc(100vh - var(--toolbar-height));
  }
  .project-top {
    flex-wrap: wrap;
  }
  .project-top > div:nth-child(2) {
    flex: 1;
    min-width: 180px;
  }
  .project-meta {
    flex-wrap: wrap;
  }
  .topbar {
    height: auto;
    min-height: 72px;
    padding-block: 12px;
  }
  .admin-header > div {
    flex-wrap: wrap;
  }
  .auth-card {
    margin-inline: 12px;
  }
}
