@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;500;600;700&display=swap");

/* Shared presentation for Div-idy's tools, never the generated project iframe. */
:root {
  --tool-font: "Josefin Sans", "Avenir Next", sans-serif;
  --tool-ink: #254760;
  --tool-muted: #496879;
  --tool-blue: #4f76f6;
  --tool-link: #3157b7;
  --tool-green: #206548;
  --tool-mint: #77f2a1;
  --tool-danger: #a33141;
  --tool-line: rgba(53, 90, 112, .16);
  --tool-edge: rgba(255, 255, 255, .8);
  --tool-paper: rgba(255, 255, 255, .82);
  --tool-glass: linear-gradient(135deg, rgba(79, 118, 246, .14), rgba(119, 242, 161, .17)), rgba(240, 244, 248, .94);
  --tool-prompt-glass: linear-gradient(135deg, rgba(79, 118, 246, .3), rgba(119, 242, 161, .3)), rgba(240, 244, 248, .94);
  --tool-background: radial-gradient(ellipse at 0 0, rgba(79, 118, 246, .13), transparent 58%), radial-gradient(ellipse at 100% 30%, rgba(119, 242, 161, .16), transparent 55%), #f0f5f8;
  --tool-shadow: 0 6px 24px rgba(37, 71, 96, .08);
  --tool-radius: 18px;
  --tool-control-radius: 11px;
}

body.dividy-tool-page,
body.dividy-tool-page#devbody {
  color: var(--tool-ink);
  background: var(--tool-background);
  font-family: var(--tool-font);
  font-size: 15px;
  line-height: 1.5;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}
body.dividy-tool-page *,
body.dividy-tool-page *::before,
body.dividy-tool-page *::after { box-sizing: border-box; }
body.dividy-tool-page :is(h1, h2, h3, h4, p, label, button, input, select, textarea, summary, table),
body.project-workspace-shell :is(.workspace-tool-heading, .workspace-publish-card) {
  font-family: var(--tool-font);
}
body.dividy-tool-page :is(h1, h2, h3, h4) {
  color: var(--tool-ink);
  font-weight: 600;
  letter-spacing: -.025em;
}
body.dividy-tool-page :is(.intro h1, .an-heading h1, .ab-toolbar h1, .ai-wrapper > h2) {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -.035em;
}
body.dividy-tool-page :is(.ai-subhead, .subheading, .an-subhead, .ab-toolbar p) {
  color: var(--tool-muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 72ch;
}
body.dividy-tool-page :is(.ai-wrapper, .analytics-wrapper, .ab-wrapper, .db-shell, #tools-section) {
  width: 100%;
  max-width: 1400px;
  margin: 28px auto 64px;
  padding: 0 28px;
}
body.dividy-ai .ai-wrapper { max-width: 1120px; }
body.dividy-seo #tools-section { max-width: 1120px; }
body.dividy-database .db-shell { padding-bottom: 24px; }
body.dividy-tool-page :is(.dev-header, .tool-header) {
  color: var(--tool-ink);
  background: var(--tool-glass);
  border-bottom: 1px solid var(--tool-edge);
  box-shadow: 0 3px 16px rgba(37, 71, 96, .04);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
}
body.dividy-tool-page :is(#dataname, .project-name) {
  color: var(--tool-ink);
  font-family: var(--tool-font);
  font-weight: 600;
  letter-spacing: -.02em;
}

/* The outer workspace already provides navigation and the shared composer. */
html.dividy-workspace-embedded { padding: 0 !important; }
html.dividy-workspace-embedded body.dividy-tool-page {
  margin: 0 !important;
  padding: 0 0 calc(320px + env(safe-area-inset-bottom, 0px)) !important;
}
html.dividy-workspace-embedded body.dividy-tool-page :is(.ai-wrapper, .analytics-wrapper, .ab-wrapper, .db-shell, #tools-section) {
  margin-top: 0 !important;
  margin-bottom: 0;
  padding-top: 28px !important;
}
html.dividy-workspace-embedded .tool-header,
html.dividy-workspace-embedded .dividy-ai .ai-wrapper > h2 { display: none !important; }

/* Glass belongs on the outer surfaces; records and inputs stay calm and clear. */
body.dividy-tool-page :is(.ai-card, .panel, .an-card, .ab-card, .seo-card) {
  color: var(--tool-ink);
  background: var(--tool-glass);
  border: 1px solid var(--tool-edge);
  border-radius: var(--tool-radius);
  box-shadow: var(--tool-shadow);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
}
body.dividy-tool-page :is(.ai-card, .an-card, .ab-card, .seo-card) { padding: 24px; }
body.dividy-tool-page :is(.ai-card h3, .an-card h2, .ab-card h3, .seo-card h2, .workspace-heading h2) {
  font-size: 21px;
  line-height: 1.3;
}
body.dividy-tool-page :is(.ai-help, .ai-context-description, .ai-usage-empty, .ai-status, .seo-help, .seo-footer, .seo-status, .ab-meta, .ab-status, .small, .muted, .an-muted, .an-footnote) {
  color: var(--tool-muted);
  font-size: 13px;
  line-height: 1.65;
}
body.dividy-tool-page :is(.eyebrow, .an-eyebrow) {
  color: var(--tool-green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}
body.dividy-tool-page :is(.empty-state, .ab-empty, .seo-empty, .an-empty) {
  color: var(--tool-muted);
  background: rgba(255, 255, 255, .5);
  border: 1px dashed rgba(53, 90, 112, .22);
  border-radius: 14px;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.7;
}
body.dividy-tool-page :is(.count-chip, .ai-pill, .an-badge, .an-type-chip, .ab-pill, .cell-boolean) {
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.35;
}
body.dividy-tool-page :is(.count-chip, .ai-pill, .cell-boolean, .ab-pill.live) {
  color: var(--tool-green);
  background: rgba(119, 242, 161, .24);
}
body.dividy-tool-page .ab-pill.paused {
  color: #87560e;
  background: #fff0cf;
}

/* Shared controls: mint primary actions, glass secondary actions, visible focus. */
body.dividy-tool-page :is(button, .ab-actions a, .back-link) {
  min-height: 44px;
  border-radius: var(--tool-control-radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  touch-action: manipulation;
}
body.dividy-tool-page :is(.ab-btn, .ab-actions a, .an-button, .an-text-button, .an-suggestions button, .ai-prompt-actions button, .seo-actions button),
body.dividy-database button {
  color: var(--tool-ink);
  background: var(--tool-paper);
  border: 1px solid var(--tool-line);
  box-shadow: 0 2px 7px rgba(37, 71, 96, .04);
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
body.dividy-tool-page :is(.ab-actions a, .ab-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
}
body.dividy-tool-page :is(.an-button:not(.an-button-secondary), .ab-btn:not(.secondary), .ab-actions .primary, .ai-prompt-actions button, #seoSaveBtn),
body.dividy-database button.primary {
  color: #184e36;
  background: linear-gradient(120deg, #77f2a1, #b0f5c8);
  border: 1px solid rgba(39, 118, 91, .17);
  box-shadow: 0 3px 10px rgba(39, 118, 91, .09);
}
body.dividy-tool-page :is(button, .ab-actions a):hover:not(:disabled):not([aria-disabled="true"]) {
  transform: none;
  filter: none;
  box-shadow: 0 3px 12px rgba(37, 71, 96, .1);
}
body.dividy-tool-page :is(.ab-btn.secondary, .an-button-secondary, .seo-actions button:not(#seoSaveBtn)):hover:not(:disabled),
body.dividy-database button:not(.primary):not(.danger):hover:not(:disabled) {
  background: #f7fbff;
  border-color: rgba(79, 118, 246, .32);
}
body.dividy-tool-page :is(.an-button:not(.an-button-secondary), .ab-btn:not(.secondary), .ab-actions .primary, .ai-prompt-actions button, #seoSaveBtn):hover:not(:disabled),
body.dividy-database button.primary:hover:not(:disabled) {
  background: linear-gradient(120deg, #91efb1, #c4f8d6);
  border-color: rgba(39, 118, 91, .3);
}
body.dividy-tool-page :is(button:disabled, [aria-disabled="true"]) {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}
body.dividy-tool-page :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 44px;
  min-width: 0;
  border: 1px solid var(--tool-line);
  border-radius: var(--tool-control-radius);
  color: var(--tool-ink);
  background: rgba(255, 255, 255, .88);
  font-family: var(--tool-font);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(37, 71, 96, .025);
}
body.dividy-tool-page :is(input, textarea)::placeholder { color: #637e8d; opacity: 1; }
body.dividy-tool-page :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--tool-link); }
body.dividy-tool-page label { color: var(--tool-muted); font-size: 13px; }
body.dividy-tool-page :is(button, a, input, select, textarea, summary):focus-visible,
body.project-workspace-shell :is(.workspace-tool-surface, #workspacePublishSurface) :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--tool-blue);
  outline-offset: 3px;
}
body.dividy-tool-page :is(.danger, button.danger),
body.dividy-tool-page :is(.danger, button.danger):hover:not(:disabled) {
  color: var(--tool-danger);
  background: #fff0f2;
  border-color: rgba(163, 49, 65, .2);
}
body.dividy-tool-page :is(.is-error, .an-error, .ai-update-status.error, .ai-status.error, .ab-status.error, .seo-status.error) {
  color: var(--tool-danger) !important;
}
body.dividy-tool-page :is(.ai-update-status.success, .seo-status.success) { color: var(--tool-green); }

/* AI usage and context. */
body.dividy-ai .ai-card { margin-bottom: 22px; }
body.dividy-ai .ai-usage-row { border-color: var(--tool-line); padding-top: 12px; padding-bottom: 12px; }
body.dividy-ai :is(.ai-usage-group-title, .ai-usage-project-label, .ai-usage-tokens) { font-size: 14px; }
body.dividy-ai :is(.ai-usage-meta, .ai-usage-project-label small) { color: var(--tool-muted); font-size: 13px; }
body.dividy-ai .ai-usage-current { background: rgba(255, 255, 255, .63); border-radius: 12px; padding: 12px; }
body.dividy-ai .ai-usage-project-label a { color: var(--tool-link); }
body.dividy-ai .ai-usage-bar { background: rgba(37, 71, 96, .1); height: 9px; }
body.dividy-ai .ai-usage-fill { background: linear-gradient(90deg, var(--tool-blue), var(--tool-mint)); }
body.dividy-ai .ai-card.limit-reached .ai-usage-fill { background: linear-gradient(90deg, #e18f34, var(--tool-danger)); }
body.dividy-ai :is(.ai-generated-context, .ai-prompt-bar) {
  border: 1px solid var(--tool-edge);
  border-radius: 14px;
  background: rgba(255, 255, 255, .5);
}
body.dividy-ai .ai-generated-context pre {
  color: var(--tool-ink);
  background: rgba(255, 255, 255, .72);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.65;
}
body.dividy-ai .ai-prompt-bar { padding: 18px; background: var(--tool-prompt-glass); }

/* Database: lightweight navigation surrounding a legible records surface. */
body.dividy-database .intro { align-items: flex-start; margin-bottom: 24px; }
body.dividy-database .collections { padding: 20px 12px; }
body.dividy-database .workspace { padding: 24px; }
body.dividy-database .collection-button { background: transparent; border-color: transparent; box-shadow: none; text-align: left; }
body.dividy-database .collection-button[aria-current="true"],
body.dividy-database .collection-button[aria-current="true"]:hover:not(:disabled) {
  background: linear-gradient(120deg, rgba(79, 118, 246, .13), rgba(119, 242, 161, .22)), #f8fcff;
  color: var(--tool-ink);
  border-color: rgba(79, 118, 246, .2);
}
body.dividy-database .collection-button span:last-child { color: var(--tool-muted); font-size: 12px; }
body.dividy-database :is(.compact-label, .field-choice, .filter-chip, .pagination, .wallet-heading, .card-field > span:first-child) { font-size: 12px; }
body.dividy-database :is(.notice, .preview-banner, .options-body) {
  background: rgba(255, 255, 255, .68);
  border-color: var(--tool-line);
  border-radius: 12px;
  font-size: 13px;
}
body.dividy-database .preview-banner { border-color: rgba(39, 118, 91, .3); background: #effbf4; }
body.dividy-database .table-scroll { background: rgba(255, 255, 255, .88); border-color: var(--tool-line); border-radius: 12px; }
body.dividy-database table { font-size: 14px; }
body.dividy-database th { background: #edf3f8; color: var(--tool-muted); font-size: 12px; font-weight: 600; border-color: var(--tool-line); }
body.dividy-database td { border-color: rgba(53, 90, 112, .1); }
body.dividy-database td .record-link { color: var(--tool-link); background: transparent; border: 0; box-shadow: none; font-size: 13px; }
body.dividy-database .data-card { background: var(--tool-paper); border-color: var(--tool-line); border-radius: 14px; }
body.dividy-database .card-field { font-size: 14px; }
body.dividy-database .ai-panel { padding: 22px; background: var(--tool-prompt-glass); }
body.dividy-database .ai-panel h2 { font-size: 25px; letter-spacing: -.03em; }
body.dividy-database .ai-panel :is(p, textarea, .privacy-note) { font-size: 13px; }
body.dividy-database .ai-panel .ai-label { font-size: 11px; letter-spacing: .05em; border-radius: 999px; margin-bottom: 16px; }
body.dividy-database .example-prompts button { padding: 10px 12px; margin-bottom: 7px; border: 1px solid var(--tool-line); border-radius: 10px; background: rgba(255, 255, 255, .5); font-size: 13px; font-weight: 400; }
body.dividy-database .wallet progress { height: 8px; accent-color: var(--tool-green); }
body.dividy-database .wallet progress::-webkit-progress-bar { border-radius: 99px; background: rgba(37, 71, 96, .1); }
body.dividy-database .wallet progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, var(--tool-blue), var(--tool-mint)); }
body.dividy-database .wallet progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, var(--tool-blue), var(--tool-mint)); }

/* Analytics: the assistant stays at the top, with quieter data cards below. */
body.dividy-analytics { --an-ink: var(--tool-ink); --an-muted: var(--tool-muted); --an-line: var(--tool-line); --an-blue: var(--tool-link); --an-green: var(--tool-green); }
body.dividy-analytics .an-assistant { background: var(--tool-prompt-glass); }
body.dividy-analytics .an-assistant-icon { color: var(--tool-green); background: rgba(255, 255, 255, .64); border-radius: 12px; }
body.dividy-analytics :is(.an-budget-box, .an-answer, .an-metric) { color: var(--tool-ink); background: var(--tool-paper); border: 1px solid var(--tool-edge); border-radius: 14px; }
body.dividy-analytics .an-metric { box-shadow: 0 3px 14px rgba(37, 71, 96, .04); }
body.dividy-analytics .an-metric-accent { background: linear-gradient(125deg, rgba(119, 242, 161, .23), rgba(255, 255, 255, .85)); }
body.dividy-analytics :is(.an-metric small, .an-status-row, .an-pagination, .an-chart-axis, .an-breakdown-label span:last-child, .an-event-detail small, .an-event-detail ul) { font-size: 12px; }
body.dividy-analytics :is(.an-metric-label, .an-breakdown-label) { font-size: 14px; }
body.dividy-analytics .an-suggestions button { background: rgba(255, 255, 255, .6); font-size: 13px; font-weight: 400; }
body.dividy-analytics .an-text-button { background: transparent; box-shadow: none; border-color: transparent; color: var(--tool-link); }
body.dividy-analytics .an-table-wrap { background: rgba(255, 255, 255, .76); border: 1px solid var(--tool-line); border-radius: 12px; }
body.dividy-analytics .an-table { font-size: 14px; }
body.dividy-analytics .an-table th { background: #edf3f8; color: var(--tool-muted); font-size: 12px; }
body.dividy-analytics .an-events-table td:last-child { font-size: 12px; }
body.dividy-analytics .an-type-chip { color: var(--tool-muted); background: rgba(255, 255, 255, .56); border-color: var(--tool-line); }
body.dividy-analytics .an-chart-bar { background: linear-gradient(to top, var(--tool-blue), #94bfd9); }
body.dividy-analytics .an-budget-track { background: rgba(37, 71, 96, .1); }
body.dividy-analytics #assistant-budget-fill { background: linear-gradient(90deg, var(--tool-blue), var(--tool-mint)); }

/* SEO and A/B tests share the same surface and action hierarchy. */
body.dividy-seo :is(.seo-help, .seo-top label, .seo-field label, .seo-meta-row label, .seo-footer) { color: var(--tool-muted); font-size: 13px; }
body.dividy-seo :is(.seo-actions, .seo-footer) { gap: 12px; flex-wrap: wrap; }
body.dividy-seo .seo-meta-row { padding: 14px; border: 1px solid var(--tool-line); border-radius: 12px; background: rgba(255, 255, 255, .56); }
body.dividy-seo .page-item { background: var(--tool-paper); border: 1px solid var(--tool-line); border-radius: 14px; box-shadow: none; }
body.dividy-abtests .ab-toolbar { gap: 20px; margin-bottom: 26px; }
body.dividy-abtests .ab-toolbar h1 { margin: 0 0 10px; }
body.dividy-abtests .ab-toolbar p { margin: 0; }
body.dividy-abtests .ab-grid { gap: 20px; }
body.dividy-abtests .ab-card { box-shadow: var(--tool-shadow); }
body.dividy-abtests .ab-meta { line-height: 1.7; }
body.dividy-abtests :is(.ab-header-actions, .ab-actions) { gap: 9px; flex-wrap: wrap; }

/* Dialogs stay light, including the older A/B editor's analysis and status menu. */
body.dividy-tool-page :is(.record-dialog, .ab-modal-card, .abtest-modal-card) {
  color: var(--tool-ink);
  background: linear-gradient(135deg, rgba(79, 118, 246, .1), rgba(119, 242, 161, .12)), #f8fbfd;
  border: 1px solid var(--tool-edge);
  border-radius: 20px;
  box-shadow: 0 18px 60px rgba(37, 71, 96, .2);
}
body.dividy-tool-page :is(.ab-modal, .abtest-modal) {
  background: rgba(30, 54, 74, .28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
body.dividy-tool-page .record-dialog::backdrop {
  background: rgba(30, 54, 74, .28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
body.dividy-database .record-actions { background: #f3f8fa; border-color: var(--tool-line); }
html.ab-workspace-editor body.dividy-tool-page#devbody { padding: 0 !important; }
html.ab-workspace-editor body.dividy-tool-page#devbody .dev-header {
  color: var(--tool-ink);
  background: var(--tool-glass);
  border-color: var(--tool-edge);
  box-shadow: none;
  z-index: 20;
  overflow: visible;
}
body.dividy-ab-editor #outputviewmode { z-index: 0; }
body.dividy-ab-editor .abtest-toggle { background: rgba(255, 255, 255, .72); border-color: var(--tool-line); border-radius: 14px; }
body.dividy-ab-editor .abtest-toggle-btn { color: var(--tool-muted); background: transparent; border-radius: 10px; min-height: 44px; }
body.dividy-ab-editor .abtest-toggle-btn.active { color: var(--tool-ink); background: linear-gradient(120deg, rgba(79, 118, 246, .2), rgba(119, 242, 161, .3)); box-shadow: 0 2px 8px rgba(37, 71, 96, .06); }
body.dividy-ab-editor :is(.abtest-analysis-btn, .abtest-modal-actions button, .abtest-star-btn) { color: var(--tool-ink); background: var(--tool-paper); border: 1px solid var(--tool-line); }
body.dividy-ab-editor :is(.abtest-apply-btn, #abtestApplyConfirm, .abtest-star-btn.is-starred, .abtest-status-btn:not(.paused)) { color: var(--tool-green); background: linear-gradient(120deg, #77f2a1, #b0f5c8); border: 1px solid rgba(39, 118, 91, .17); }
body.dividy-ab-editor .abtest-status-btn.paused { color: #87560e; background: #fff0cf; border: 1px solid #eed7aa; }
body.dividy-ab-editor .abtest-status-dropdown { background: #f2f8fb; border-color: var(--tool-edge); box-shadow: 0 10px 30px rgba(37, 71, 96, .15); }
body.dividy-ab-editor .abtest-status-dropdown button { color: var(--tool-ink); }
body.dividy-ab-editor .abtest-status-dropdown button:hover { background: rgba(79, 118, 246, .1); }
body.dividy-ab-editor .abtest-indicator { color: var(--tool-muted); }
body.dividy-ab-editor .abtest-indicator span { color: var(--tool-link); background: rgba(79, 118, 246, .1); }
body.dividy-ab-editor :is(.abtest-metric-block h4, .abtest-metrics-table, .abtest-events-title, .abtest-row-label) { color: var(--tool-ink); }
body.dividy-ab-editor .abtest-metrics-table :is(th, td) { border-color: var(--tool-line); }
body.dividy-ab-editor .abtest-metrics-table th { background: #eaf1f8; color: var(--tool-muted); }
body.dividy-ab-editor .abtest-metrics-table td { background: rgba(255, 255, 255, .62); }
body.dividy-ab-editor :is(#abtestAnalysisStatus, #abtestApplyModal .abtest-modal-card > div:not(.abtest-modal-actions)) { color: var(--tool-muted) !important; }
body.dividy-ab-editor .abtest-modal-actions { gap: 10px; flex-wrap: wrap; }
body.dividy-ab-editor .abtest-metrics-scroll { overflow-x: auto; }

/* Parent workspace: retain the original prompt, use its material for every tool. */
body#devbody.project-workspace-shell .workspace-tool-surface { background: var(--tool-background); }
body#devbody.project-workspace-shell .workspace-tool-heading {
  color: var(--tool-ink);
  background: var(--tool-glass);
  border-bottom: 1px solid var(--tool-edge);
  box-shadow: 0 3px 16px rgba(37, 71, 96, .04);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
}
body#devbody.project-workspace-shell .workspace-tool-heading h1 {
  color: var(--tool-ink);
  font: 600 22px/1.2 var(--tool-font);
  letter-spacing: -.025em;
}
body#devbody.project-workspace-shell #workspacePublishSurface { background: var(--tool-background); }
body#devbody.project-workspace-shell .workspace-publish-card {
  color: var(--tool-ink);
  background: var(--tool-glass);
  border: 1px solid var(--tool-edge);
  border-radius: var(--tool-radius);
  box-shadow: var(--tool-shadow);
  padding: 28px;
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
}
body#devbody.project-workspace-shell .workspace-publish-card :is(h1, h2, h3) {
  color: var(--tool-ink);
  font-family: var(--tool-font);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.025em;
}
body#devbody.project-workspace-shell .workspace-publish-card h1 { font-size: clamp(26px, 3vw, 34px); }
body#devbody.project-workspace-shell .workspace-publish-card :is(p, .workspace-publication-explanation) { color: var(--tool-muted); font-size: 14px; line-height: 1.65; }
body#devbody.project-workspace-shell .workspace-publish-card .workspace-publish-note { font-size: 12px; }
body#devbody.project-workspace-shell :is(.workspace-publish-actions button, .workspace-publish-actions a, .workspace-publication-heading button, .workspace-publication-page-actions a) {
  min-height: 44px;
  border-radius: var(--tool-control-radius);
  font: 600 14px/1.35 var(--tool-font);
  color: var(--tool-ink);
  background: var(--tool-paper);
  border: 1px solid var(--tool-line);
  box-shadow: 0 2px 7px rgba(37, 71, 96, .04);
  touch-action: manipulation;
}
body#devbody.project-workspace-shell .workspace-publish-actions :is(button, a):not(.secondary) {
  color: #184e36;
  background: linear-gradient(120deg, #77f2a1, #b0f5c8);
  border-color: rgba(39, 118, 91, .17);
}
body#devbody.project-workspace-shell .workspace-publish-actions button.secondary {
  color: var(--tool-danger);
  background: #fff0f2;
  border-color: rgba(163, 49, 65, .2);
}
body#devbody.project-workspace-shell .workspace-publication-page { border: 1px solid var(--tool-line); border-radius: 13px; background: rgba(255, 255, 255, .72); }
body#devbody.project-workspace-shell .workspace-publication-page.is-current { border-color: rgba(79, 118, 246, .35); background: rgba(255, 255, 255, .94); }
body#devbody.project-workspace-shell .workspace-publication-page-copy { color: var(--tool-ink); }
body#devbody.project-workspace-shell .workspace-publication-page-copy small { color: var(--tool-muted); font-size: 12px; line-height: 1.55; }
body#devbody.project-workspace-shell .workspace-publication-badge { font: 600 12px/1.4 var(--tool-font); }
body#devbody.project-workspace-shell .workspace-publication-badge.is-live { color: var(--tool-green); background: #e4f9ed; }
body#devbody.project-workspace-shell .workspace-publication-error { color: var(--tool-danger); }

/* A/B dialogs must sit above the shared composer, without changing its draft. */
body#devbody.project-workspace-shell.abtest-dialog-open :is(.prompt-bubble-container, #guidedBuilderPanel) {
  visibility: hidden !important;
  pointer-events: none;
}
body.dividy-ab-editor #pagetitle {
  color: var(--tool-ink);
  background: rgba(255, 255, 255, .5);
}
body.dividy-ab-editor #backbtndevtool {
  color: var(--tool-ink);
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--tool-line);
  border-radius: 11px;
  width: 44px;
  height: 44px;
  margin: 0;
  align-items: center;
  justify-content: center;
}
body.dividy-ab-editor #backbtndevtool .material-symbols-outlined { color: inherit; }

/* Small screens: preserve existing single-column layouts and scrolling tables. */
@media (max-width: 720px) {
  body.dividy-tool-page :is(.ai-wrapper, .analytics-wrapper, .ab-wrapper, .db-shell, #tools-section) { padding-left: 16px; padding-right: 16px; margin-top: 20px; }
  html.dividy-workspace-embedded body.dividy-tool-page :is(.ai-wrapper, .analytics-wrapper, .ab-wrapper, .db-shell, #tools-section) { padding-top: 20px !important; }
  body.dividy-tool-page :is(.ai-card, .an-card, .ab-card, .seo-card, .workspace, .ai-panel) { padding: 18px; }
  body.dividy-tool-page :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
  body.dividy-tool-page :is(.ai-panel textarea, .field-choice input, .compact-label select) { font-size: 16px; }
  body.dividy-tool-page :is(.intro, .an-heading, .ab-toolbar) { flex-direction: column; align-items: stretch; gap: 16px; }
  body.dividy-database .intro-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
  body.dividy-tool-page :is(.ab-header-actions, .seo-actions, .an-assistant-submit) { flex-wrap: wrap; }
  body.dividy-seo .seo-top { align-items: stretch; }
  body.dividy-seo .seo-top select { min-width: 0; max-width: 100%; width: 100%; }
  body.dividy-seo .seo-meta-row { padding: 12px; }
  body.dividy-ab-editor :is(.abtest-modal-card, .ab-modal-card) { width: 100%; padding: 18px; }
  body.dividy-tool-page :is(.ab-modal, .abtest-modal) { padding: 12px; }
  body#devbody.project-workspace-shell .workspace-publish-card { padding: 20px; border-radius: 18px; }
  body#devbody.project-workspace-shell .workspace-tool-heading h1 { font-size: 19px; }
}
@media (max-width: 620px) {
  html.dividy-workspace-embedded body.dividy-tool-page { padding-bottom: calc(260px + env(safe-area-inset-bottom, 0px)) !important; }
  html.ab-workspace-editor body.dividy-tool-page#devbody { padding: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.dividy-tool-page :is(.workspace, .ai-panel, .ai-usage-fill, button, .ab-actions a) { animation: none; transition: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.dividy-tool-page :is(.ai-card, .panel, .an-card, .ab-card, .seo-card) { background: linear-gradient(135deg, #e7edf9, #e6f4ed); }
}
