/* PREVIY: bold creator workspace. Theme is set on <html> before the first render. */
:root {
  color-scheme: light;
  --bg-page: #f4f3ee;
  --bg-surface: #fffefa;
  --bg-surface-2: #ebeae4;
  --bg-muted: #e5e4dd;
  --bg-subtle: #f8f7f2;
  --input-bg: #fffefa;
  --btn-secondary-bg: #fffefa;
  --text-primary: #171919;
  --text-secondary: #4a5050;
  --text-muted: #707676;
  --border: #d8d8d0;
  --border-strong: #bfc1b7;
  --border-soft: #e6e5df;
  --border-dashed: #afb3a8;
  --accent: #c9ff27;
  --accent-hover: #b5ee00;
  --accent-text: #547000;
  --accent-ink: #182000;
  --accent-ring: rgba(181, 238, 0, 0.38);
  --accent-soft-bg: #efffc5;
  --accent-soft-bg-strong: #e3ff8a;
  --accent-soft-border: #a6ce17;
  --youtube-red: #ff0033;
  --cta: var(--youtube-red);
  --cta-hover: #d9002b;
  --cta-ink: #3a000c;
  --cta-ring: rgba(255, 0, 51, 0.35);
  --hot: var(--youtube-red);
  --hot-soft: rgba(255, 0, 51, 0.1);
  --panel-bg: #171919;
  --panel-text: #f8f8f2;
  --editor-backdrop: #202322;
  --modal-backdrop: rgba(16, 19, 18, 0.66);
  --shadow-sm: 0 4px 0 rgba(23, 25, 25, 0.06);
  --shadow-md: 0 18px 50px rgba(23, 25, 25, 0.17);
  --shadow-drawer: 14px 0 40px rgba(23, 25, 25, 0.25);
  --shadow-float: 0 8px 22px rgba(23, 25, 25, 0.18);
  --warn-text: #8b5a00;
  --error-bg: rgba(255, 0, 51, 0.09);
  --error-text: #b00023;
  --success-bg: #e3f8dc;
  --success-text: #306a32;
  color: var(--text-primary);
  background: var(--bg-page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg-page: #171919;
  --bg-surface: #202322;
  --bg-surface-2: #292d2b;
  --bg-muted: #303532;
  --bg-subtle: #1a1d1c;
  --input-bg: #171919;
  --btn-secondary-bg: #252927;
  --text-primary: #f7f8f1;
  --text-secondary: #c1c8c1;
  --text-muted: #98a19a;
  --border: #393e3a;
  --border-strong: #545b55;
  --border-soft: #303532;
  --border-dashed: #596159;
  --accent-text: #d6ff56;
  --accent-ink: #182000;
  --accent-ring: rgba(201, 255, 39, 0.3);
  --accent-soft-bg: rgba(201, 255, 39, 0.13);
  --accent-soft-bg-strong: rgba(201, 255, 39, 0.2);
  --accent-soft-border: #87a927;
  --hot: var(--youtube-red);
  --hot-soft: rgba(255, 0, 51, 0.16);
  --panel-bg: #101211;
  --editor-backdrop: #111312;
  --modal-backdrop: rgba(0, 0, 0, 0.76);
  --shadow-sm: 0 4px 0 rgba(0, 0, 0, 0.15);
  --shadow-md: 0 20px 56px rgba(0, 0, 0, 0.38);
  --shadow-drawer: 14px 0 40px rgba(0, 0, 0, 0.55);
  --shadow-float: 0 8px 22px rgba(0, 0, 0, 0.35);
  --warn-text: #ffd76b;
  --error-bg: rgba(255, 0, 51, 0.16);
  --error-text: #ff99ad;
  --success-bg: rgba(67, 137, 68, 0.22);
  --success-text: #abeca2;
}

/* Общие кнопки сайта, блога и публичных документов. */
.primary-button, .secondary-button, .ghost-button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.primary-button {
  min-height: 48px;
  background: var(--accent);
  box-shadow: 3px 3px 0 var(--accent-ink);
  color: var(--accent-ink);
  padding: 0 18px;
  text-decoration: none;
}
.primary-button:hover:not(:disabled) { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--accent-ink); background: var(--accent-hover); }
.primary-button:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--accent-ink); }
.primary-button:disabled { opacity: 0.58; box-shadow: none; }
.primary-button.cta-button { background: var(--cta); box-shadow: 3px 3px 0 var(--cta-ink); color: #fff; }
.primary-button.cta-button:hover:not(:disabled) { box-shadow: 2px 2px 0 var(--cta-ink); background: var(--cta-hover); }
.primary-button.cta-button:active:not(:disabled) { box-shadow: 0 0 0 var(--cta-ink); }
.cta-button:focus-visible { outline: 3px solid var(--cta); outline-offset: 2px; box-shadow: 0 0 0 3px var(--cta-ring); }
