/* Knowledge Base — light modern theme + декоративные элементы */

* { box-sizing: border-box; margin: 0; padding: 0; cursor: default; caret-color: transparent; }
input, textarea, [contenteditable="true"] { cursor: text; caret-color: auto; }
select { cursor: pointer; }
a, button, [role="button"], .category-btn, .article-head, .admin-article-item,
.wizard-option, .back-btn, .tab, .view-toggle button, .must-know-btn, .img-btn,
.add-option-btn, .option-row button, .btn, .brand, .prose img,
.sidebar-collapse-btn, .sidebar-open-fab, .md-toolbar button { cursor: pointer; }

:root {
  --bg: #FAFBFC;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #F4F5F7;
  --bg-hover: #F0F1F4;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --ink: #0F1117;
  --ink-2: #4A5058;
  --ink-3: #7A8089;
  --ink-4: #A8AEB7;
  --hairline: #EAECEF;
  --hairline-2: #D8DCE1;
  --accent: #4F8EFF;
  --accent-hover: #3A7BEE;
  --accent-soft: rgba(79, 142, 255, 0.08);
  --accent-glow: rgba(79, 142, 255, 0.25);
  --violet: #7C5DF5;
  --violet-soft: rgba(124, 93, 245, 0.08);
  --violet-glow: rgba(124, 93, 245, 0.25);
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 2px 8px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.08), 0 2px 6px rgba(16, 24, 40, 0.04);
  --shadow-xl: 0 20px 60px rgba(16, 24, 40, 0.10), 0 4px 12px rgba(16, 24, 40, 0.05);
  --font-display: "Inter", -apple-system, system-ui, sans-serif;
  --font-body: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.85); } }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed;
  top: -20%; left: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(79, 142, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -20%; right: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(124, 93, 245, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==== LAYOUT ==== */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  transition: grid-template-columns 0.35s var(--smooth);
}
.layout.sidebar-hidden { grid-template-columns: 0 1fr; }

.sidebar {
  border-right: 1px solid var(--hairline);
  padding: 36px 24px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  transition: opacity 0.25s, padding 0.25s;
  min-width: 0;
}
.layout.sidebar-hidden .sidebar {
  opacity: 0;
  padding: 0;
  overflow: hidden;
  border-right: none;
  pointer-events: none;
}

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; }
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79, 142, 255, 0.28);
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 8px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 2px;
  transform: rotate(45deg);
}
.brand-name {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex: 1;
}
.brand-badge {
  margin-left: auto;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 600;
}

/* Sidebar collapse button (in brand) */
.sidebar-collapse-btn {
  width: 26px; height: 26px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.sidebar-collapse-btn svg { width: 14px; height: 14px; }

/* Floating open button (when sidebar hidden) */
.sidebar-open-fab {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 200;
  width: 42px; height: 42px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-2);
  border-radius: 10px;
  color: var(--ink-2);
  box-shadow: var(--shadow-md);
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.sidebar-open-fab:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-lg);
}
.sidebar-open-fab.show { display: flex; }
.sidebar-open-fab svg { width: 18px; height: 18px; }

.section-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  margin-bottom: 12px;
  font-weight: 600;
  padding-left: 4px;
}
.categories { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.category-btn {
  text-align: left;
  background: none;
  border: none;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s var(--smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.category-btn:hover { background: var(--bg-hover); color: var(--ink); }
.category-btn.active {
  background: linear-gradient(135deg, var(--accent-soft), var(--violet-soft));
  color: var(--accent);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(79, 142, 255, 0.15);
}
.category-count {
  font-size: 11px;
  color: var(--ink-3);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.category-btn.active .category-count { background: rgba(79, 142, 255, 0.15); color: var(--accent); }

.sidebar-footer { padding-top: 16px; border-top: 1px solid var(--hairline); font-size: 12px; color: var(--ink-4); }

/* ==== MAIN ==== */
.main { padding: 36px 48px 96px; max-width: 900px; width: 100%; }
.layout.sidebar-hidden .main { max-width: 1000px; margin: 0 auto; padding: 36px 56px 96px; }

.search-wrap { position: relative; margin-bottom: 32px; }
.search-wrap svg {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink-3);
  transition: color 0.2s;
}
.search-wrap:focus-within svg { color: var(--accent); }
.search-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  font-size: 14.5px;
  font-family: var(--font-body);
  border: 1px solid var(--hairline-2);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  color: var(--ink);
  transition: all 0.25s var(--smooth);
  box-shadow: var(--shadow-sm);
}
.search-input::placeholder { color: var(--ink-4); }
.search-input:focus {
  outline: none;
  border-color: rgba(79, 142, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(79, 142, 255, 0.12), var(--shadow-md);
}

.results { display: flex; flex-direction: column; }

.article {
  border-bottom: 1px solid var(--hairline);
  animation: fadeUp 0.35s var(--smooth) both;
  transition: background 0.2s;
  border-radius: var(--radius-md);
  margin: 0 -12px;
  padding: 0 12px;
}
.article:nth-child(1) { animation-delay: 0.02s; }
.article:nth-child(2) { animation-delay: 0.06s; }
.article:nth-child(3) { animation-delay: 0.10s; }
.article:nth-child(4) { animation-delay: 0.14s; }
.article:nth-child(5) { animation-delay: 0.18s; }
.article:hover { background: rgba(79, 142, 255, 0.02); }
.article.expanded {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  border-bottom-color: transparent;
  margin-top: 4px;
  margin-bottom: 4px;
}
.article-head { padding: 24px 0; cursor: pointer; }
.article-head:hover .article-title { color: var(--accent); }
.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }
.article-title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--ink);
  transition: color 0.2s;
}
.article-excerpt {
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article.expanded .article-excerpt { display: none; }
.article-expanded { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--smooth); }
.article.expanded .article-expanded { max-height: none; overflow: visible; }
.article-expanded > .inner { padding: 8px 0 28px; border-top: 1px solid var(--hairline); animation: fadeIn 0.3s ease-out; }

/* ==== PROSE ==== */
.prose { color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }
.prose > *:first-child { margin-top: 20px; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--font-body);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 1.8em 0 0.6em;
  line-height: 1.3;
}
.prose h1 { font-size: 22px; }
.prose h2 { font-size: 18px; }
.prose h3 { font-size: 16px; }
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol { margin-bottom: 1em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }
.prose code {
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: var(--font-mono);
  color: var(--violet);
  border: 1px solid var(--hairline);
}
.prose pre {
  background: var(--bg-subtle);
  color: var(--ink-2);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 1em;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--hairline);
}
.prose pre code { background: none; padding: 0; color: inherit; border: none; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--ink-2);
  font-style: italic;
  margin-bottom: 1em;
}
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; transition: opacity 0.2s; }
.prose a:hover { opacity: 0.75; }
.prose hr { border: none; border-top: 1px solid var(--hairline); margin: 2em 0; }
.prose table {
  border-collapse: collapse;
  margin-bottom: 1em;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.prose th, .prose td {
  border-bottom: 1px solid var(--hairline);
  padding: 10px 14px;
  text-align: left;
  font-size: 13.5px;
}
.prose tr:last-child td { border-bottom: none; }
.prose th {
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-subtle);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 16px 0;
  display: block;
  border: 1px solid var(--hairline);
  cursor: zoom-in;
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
  background: var(--bg-subtle);
  min-height: 40px;
  box-shadow: var(--shadow-sm);
}
.prose img:hover { transform: scale(1.008); box-shadow: var(--shadow-md); }
.prose figure { margin: 16px 0; }
.prose figure img { margin: 0 0 8px; }
.prose figcaption { font-size: 12px; color: var(--ink-3); text-align: center; font-style: italic; }

/* ==== ДЕКОРАТИВНЫЕ ЭЛЕМЕНТЫ ==== */
/* Маркер-выделение */
.prose mark {
  background: linear-gradient(180deg, transparent 55%, rgba(250, 204, 21, 0.55) 55%);
  padding: 0 3px;
  color: inherit;
  border-radius: 2px;
}

/* Подчёркивание */
.prose u {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* Зачёркивание */
.prose del { color: var(--ink-3); text-decoration-thickness: 1.5px; }

/* Callout-блоки (цветные рамочки) */
.prose .callout {
  margin: 1.2em 0;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  background: var(--bg-subtle);
}
.prose .callout > *:first-child { margin-top: 0; }
.prose .callout > *:last-child { margin-bottom: 0; }
.prose .callout-title {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.prose .callout p { margin-bottom: 0.6em; }
.prose .callout p:last-child { margin-bottom: 0; }
.prose .callout ul, .prose .callout ol { margin-bottom: 0.6em; }

.prose .callout-note      { border-color: #4F8EFF; background: rgba(79, 142, 255, 0.07); }
.prose .callout-note .callout-title      { color: #3B7AE6; }
.prose .callout-tip       { border-color: #10B981; background: rgba(16, 185, 129, 0.07); }
.prose .callout-tip .callout-title       { color: #059669; }
.prose .callout-success   { border-color: #10B981; background: rgba(16, 185, 129, 0.09); }
.prose .callout-success .callout-title   { color: #059669; }
.prose .callout-warning   { border-color: #F59E0B; background: rgba(245, 158, 11, 0.08); }
.prose .callout-warning .callout-title   { color: #D97706; }
.prose .callout-danger    { border-color: #EF4444; background: rgba(239, 68, 68, 0.07); }
.prose .callout-danger .callout-title    { color: #DC2626; }
.prose .callout-important { border-color: #7C5DF5; background: rgba(124, 93, 245, 0.07); }
.prose .callout-important .callout-title { color: #6B4CE6; }

/* ==== BUTTONS ==== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--smooth);
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(79, 142, 255, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79, 142, 255, 0.4); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  background: var(--bg-elevated);
  color: var(--ink-2);
  border-color: var(--hairline-2);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-4); box-shadow: var(--shadow-md); }
.btn-danger {
  background: transparent;
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.25);
}
.btn-danger:hover { border-color: var(--error); background: rgba(239, 68, 68, 0.06); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.empty-state {
  padding: 64px 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  animation: fadeIn 0.4s ease-out;
}
.empty-state strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.loading-text { padding: 32px 0; color: var(--ink-3); font-size: 13.5px; }

/* Pinned */
.must-know-wrap { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--hairline); }
.must-know-btn {
  width: 100%;
  text-align: left;
  background: linear-gradient(135deg, rgba(79, 142, 255, 0.06), rgba(124, 93, 245, 0.06));
  border: 1px solid rgba(79, 142, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.25s var(--smooth);
  display: flex;
  align-items: center;
  gap: 10px;
}
.must-know-btn:hover { border-color: rgba(79, 142, 255, 0.35); box-shadow: 0 4px 16px rgba(79, 142, 255, 0.15); }
.must-know-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(79, 142, 255, 0.35);
}
.must-know-icon { width: 16px; height: 16px; flex-shrink: 0; }
.must-know-btn .count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  background: rgba(79, 142, 255, 0.12);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
  font-weight: 600;
}
.must-know-btn.active .count { background: rgba(255, 255, 255, 0.25); color: white; }

/* Badges */
.badge-scenario, .badge-pinned {
  display: inline-block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 600;
  line-height: 1;
}
.badge-scenario { color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(79, 142, 255, 0.25); }
.badge-pinned { color: var(--violet); background: var(--violet-soft); border: 1px solid rgba(124, 93, 245, 0.25); }

/* Wizard */
.wizard { padding: 8px 0 32px; }
.wizard-step-title {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 14px;
}
.wizard-step-content { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; margin-bottom: 20px; }
.wizard-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.wizard-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s var(--smooth);
  font-family: var(--font-body);
  width: 100%;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.wizard-option:hover { border-color: rgba(79, 142, 255, 0.4); box-shadow: 0 4px 16px rgba(79, 142, 255, 0.15); transform: translateY(-1px); }
.wizard-option::after { content: '→'; color: var(--ink-3); font-size: 14px; transition: transform 0.2s, color 0.2s; }
.wizard-option:hover::after { color: var(--accent); transform: translateX(4px); }
.wizard-option:disabled { opacity: 0.4; cursor: not-allowed; }
.wizard-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.wizard-progress {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 6px 0;
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--accent); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 17, 23, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
  animation: fadeIn 0.25s ease-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  cursor: default;
  background: white;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 22px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }

/* Admin layout */
.admin-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100vh;
  transition: grid-template-columns 0.35s var(--smooth);
}
.admin-layout.sidebar-collapsed { grid-template-columns: 0 1fr; }
.admin-sidebar {
  border-right: 1px solid var(--hairline);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-elevated);
  transition: opacity 0.25s, transform 0.35s var(--smooth);
  min-width: 0;
}
.admin-layout.sidebar-collapsed .admin-sidebar { opacity: 0; transform: translateX(-20px); pointer-events: none; padding: 0; }
.admin-sidebar .brand { margin-bottom: 24px; }
.admin-sidebar-top { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-sidebar-top .btn { flex: 1; }
.admin-article-list { flex: 1; overflow-y: auto; margin: 0 -20px; padding: 0 20px; }
.admin-article-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--hairline);
  padding: 12px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
  border-radius: var(--radius-sm);
}
.admin-article-item:hover { color: var(--ink); background: var(--bg-hover); }
.admin-article-item.active { color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--violet-soft)); }
.admin-article-item-cat {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin-top: 3px;
  font-weight: 500;
}
.admin-article-item.active .admin-article-item-cat { color: var(--accent); opacity: 0.8; }

.editor-main { height: 100vh; overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 40px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-md);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.sidebar-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.sidebar-toggle svg { width: 16px; height: 16px; }

.editor-toolbar-status {
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); flex-shrink: 0; }
.status-dot.unsaved { background: var(--warning); box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); animation: pulse 2s ease-in-out infinite; }
.status-dot.saved { background: var(--success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.status-dot.error { background: var(--error); box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.editor-toolbar-actions { display: flex; gap: 8px; flex-shrink: 0; }
.editor-content { padding: 36px 40px 80px; max-width: 1100px; width: 100%; margin: 0 auto; flex: 1; }

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  color: var(--ink-3);
  padding: 40px 20px;
}
.welcome h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}
.welcome p { max-width: 440px; margin-bottom: 28px; font-size: 14px; line-height: 1.6; }

.field { margin-bottom: 26px; }
.field-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 10px;
  font-weight: 600;
}
.field-input {
  width: 100%;
  border: 1px solid var(--hairline-2);
  background: var(--bg-elevated);
  font-family: var(--font-body);
  color: var(--ink);
  padding: 11px 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.field-input:focus { outline: none; border-color: rgba(79, 142, 255, 0.5); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.field-input::placeholder { color: var(--ink-4); }
.title-input { font-size: 22px !important; font-weight: 600; letter-spacing: -0.015em; padding: 14px 16px !important; line-height: 1.35; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.pin-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  font-size: 13.5px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}
.pin-toggle:hover { border-color: var(--ink-4); }
.pin-toggle.checked { border-color: rgba(124, 93, 245, 0.4); background: linear-gradient(135deg, var(--accent-soft), var(--violet-soft)); box-shadow: 0 0 0 3px rgba(124, 93, 245, 0.08); }
.pin-toggle input { width: 16px; height: 16px; accent-color: var(--violet); cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.pin-toggle strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; font-size: 13.5px; }
.pin-toggle small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; line-height: 1.5; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); margin-bottom: 24px; padding: 0; }
.tab {
  background: transparent;
  border: none;
  padding: 11px 16px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab:hover { color: var(--ink); background: var(--bg-hover); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.content-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.content-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Markdown toolbar в админке */
.md-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: none;
  margin-bottom: 0;
}
.md-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-2);
  border-radius: 5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
  white-space: nowrap;
}
.md-toolbar button:hover { color: var(--ink); border-color: var(--ink-4); background: var(--bg-hover); }
.md-toolbar button[data-md="highlight"]:hover { color: #B45309; border-color: #F59E0B; background: rgba(250, 204, 21, 0.15); }
.md-toolbar button[data-md="underline"]:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.md-toolbar button[data-md="strike"]:hover { color: var(--ink-3); border-color: var(--ink-3); }
.md-toolbar button[data-md="tip"]:hover { color: #059669; border-color: #10B981; background: rgba(16, 185, 129, 0.08); }
.md-toolbar button[data-md="warning"]:hover { color: #D97706; border-color: #F59E0B; background: rgba(245, 158, 11, 0.08); }
.md-toolbar button[data-md="danger"]:hover { color: #DC2626; border-color: #EF4444; background: rgba(239, 68, 68, 0.08); }
.md-toolbar button[data-md="important"]:hover { color: #6B4CE6; border-color: #7C5DF5; background: rgba(124, 93, 245, 0.08); }
.md-toolbar + .content-textarea { border-radius: 0 0 var(--radius-md) var(--radius-md) !important; margin-top: 0 !important; }

.content-textarea {
  width: 100%;
  min-height: 500px;
  resize: vertical;
  font-family: var(--font-mono) !important;
  font-size: 13px !important;
  line-height: 1.75;
  border: 1px solid var(--hairline-2) !important;
  border-radius: var(--radius-md);
  padding: 20px !important;
  background: var(--bg-elevated);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.4s;
  box-shadow: var(--shadow-sm);
  margin-top: 6px;
}
.content-textarea:focus { outline: none; border-color: rgba(79, 142, 255, 0.5) !important; box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.content-textarea.just-inserted { background: rgba(79, 142, 255, 0.06); border-color: var(--accent) !important; }

.preview-pane {
  padding: 28px 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  min-height: 500px;
  animation: fadeIn 0.3s ease-out;
  box-shadow: var(--shadow-sm);
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}
.view-toggle button {
  background: transparent;
  border: none;
  padding: 7px 16px;
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  font-weight: 500;
}
.view-toggle button:hover { color: var(--ink); }
.view-toggle button.active { background: var(--bg-hover); color: var(--ink); }

.img-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-md);
  color: var(--ink-2);
  transition: all 0.15s;
  font-family: var(--font-body);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.img-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.img-btn:disabled { opacity: 0.5; cursor: wait; }

.field-hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 10px;
  line-height: 1.6;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border-left: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.field-hint strong { color: var(--ink-2); font-weight: 600; }
.field-hint kbd {
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--hairline-2);
  color: var(--ink-2);
}

.drop-active { outline: 2px dashed var(--accent) !important; outline-offset: -6px; background: var(--accent-soft) !important; }

.upload-status {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 13px;
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  animation: fadeUp 0.25s var(--spring);
  font-weight: 500;
}
.upload-status.show { display: block; }

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--ink);
  animation: fadeUp 0.25s var(--spring);
  line-height: 1.5;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast strong { display: block; margin-bottom: 3px; font-size: 13.5px; font-weight: 600; }

/* Steps editor */
.step-card { border: 1px solid var(--hairline-2); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 14px; background: var(--bg-elevated); box-shadow: var(--shadow-sm); }
.step-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-id { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); background: var(--bg-subtle); padding: 3px 8px; border-radius: 4px; border: 1px solid var(--hairline); }
.step-kind { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 600; }
.step-card-actions { margin-left: auto; display: flex; gap: 6px; }
.step-row { margin-bottom: 12px; }
.step-row label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 6px; font-weight: 600; }
.step-row input, .step-row select, .step-row textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  background: var(--bg-elevated);
  color: var(--ink);
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.step-row input:focus, .step-row select:focus, .step-row textarea:focus { outline: none; border-color: rgba(79, 142, 255, 0.5); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.step-row textarea { min-height: 80px; resize: vertical; font-family: var(--font-mono); font-size: 12.5px; }
.option-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.option-row input, .option-row select { padding: 8px 10px; border: 1px solid var(--hairline-2); border-radius: var(--radius-sm); font-size: 12.5px; font-family: var(--font-body); background: var(--bg-elevated); color: var(--ink); box-shadow: var(--shadow-sm); }
.option-row button { background: none; border: 1px solid var(--hairline-2); border-radius: 4px; padding: 5px 10px; cursor: pointer; color: var(--error); font-size: 12px; }
.option-row button:hover { border-color: var(--error); background: rgba(239, 68, 68, 0.06); }
.add-option-btn { background: none; border: 1px dashed var(--hairline-2); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12.5px; color: var(--ink-3); cursor: pointer; width: 100%; transition: all 0.15s; }
.add-option-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.step-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.start-select { padding: 8px 12px; border: 1px solid var(--hairline-2); border-radius: var(--radius-sm); font-size: 13px; background: var(--bg-elevated); color: var(--ink); box-shadow: var(--shadow-sm); }
.empty-steps { padding: 40px 32px; text-align: center; color: var(--ink-3); font-size: 13.5px; border: 1px dashed var(--hairline-2); border-radius: var(--radius-md); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: fadeUp 0.4s var(--spring);
}
.login-card .brand { margin-bottom: 28px; }
.login-title { font-family: var(--font-body); font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 6px; }
.login-subtitle { color: var(--ink-3); font-size: 13px; margin-bottom: 28px; }
.login-card .field { margin-bottom: 18px; }
.login-card .btn { width: 100%; margin-top: 6px; }
.form-error { color: var(--error); font-size: 12.5px; margin-top: 12px; min-height: 18px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(16, 24, 40, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 24, 40, 0.28); }

@media (max-width: 900px) {
  .layout, .admin-layout, .admin-layout.sidebar-collapsed { grid-template-columns: 1fr; }
  .layout.sidebar-hidden { grid-template-columns: 1fr; }
  .layout.sidebar-hidden .sidebar { opacity: 1; padding: 24px 20px; overflow: visible; border-bottom: 1px solid var(--hairline); pointer-events: auto; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--hairline); padding: 24px 20px; }
  .sidebar-collapse-btn, .sidebar-open-fab { display: none !important; }
  .brand { margin-bottom: 24px; }
  .categories { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 8px; scrollbar-width: none; }
  .categories::-webkit-scrollbar { display: none; }
  .category-btn { width: auto; white-space: nowrap; flex-shrink: 0; }
  .category-count { display: none; }
  .sidebar-footer { display: none; }
  .main, .layout.sidebar-hidden .main { padding: 24px 20px 64px; max-width: 100%; }
  .admin-sidebar { display: none; }
  .editor-toolbar { padding: 12px 20px; }
  .editor-content { padding: 24px 20px 60px; }
  .field-row { grid-template-columns: 1fr; }
  .title-input { font-size: 18px !important; }
  .content-textarea { min-height: 400px; padding: 16px !important; }
  .article-title { font-size: 16px; }
  .lightbox { padding: 16px; }
}
/* ===== ARTICLE VIEW MODE (статья на весь экран) ===== */
body.article-open .main {
  max-width: 1400px;
  padding: 36px 56px 96px;
}

.article-view {
  animation: fadeUp 0.35s var(--smooth);
}

.article-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-md);
  padding: 9px 16px;
  margin-bottom: 28px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s var(--smooth);
  box-shadow: var(--shadow-sm);
}
.article-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(-2px);
  box-shadow: var(--shadow-md);
}

.article-view-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.article-view-meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-4);
}

.article-view-title {
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 32px;
  color: var(--ink);
}

.article-view-body .prose {
  font-size: 15.5px;
  line-height: 1.8;
}
.article-view-body .prose h1 { font-size: 26px; }
.article-view-body .prose h2 { font-size: 21px; }
.article-view-body .prose h3 { font-size: 18px; }

@media (max-width: 900px) {
  body.article-open .main {
    max-width: 100%;
    padding: 24px 20px 64px;
  }
  .article-view-title { font-size: 22px; }
  .article-view-body .prose { font-size: 14.5px; }
}
/* ===== СХЕМА ПОДТИПОВ ===== */
.subtype-tree {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
  padding: 20px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
}
.subtype-tree-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.subtype-node {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-2);
  color: var(--ink);
  transition: all 0.2s;
}
.subtype-node.current { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.35); color: #B45309; }
.subtype-node.non-target { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.25); color: #B91C1C; }
.subtype-node.target { background: rgba(79, 142, 255, 0.08); border-color: rgba(79, 142, 255, 0.25); color: var(--accent); }
.subtype-node.small { font-size: 12px; font-weight: 400; padding: 6px 10px; }

@media (max-width: 640px) {
  .subtype-tree { grid-template-columns: 1fr; }
}

/* ===== ССЫЛКИ МЕЖДУ СТАТЬЯМИ ===== */
.prose a.article-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0 1px;
}
.prose a.article-link:hover {
  text-decoration-style: solid;
  background: var(--accent-soft);
  border-radius: 3px;
}
/* ===== SPLIT VIEW в редакторе ===== */
.content-area { display: grid; grid-template-columns: 1fr; gap: 16px; }
.content-area[data-view="preview"] .content-area-edit { display: none; }
.content-area[data-view="edit"] .content-area-preview { display: none; }
.content-area[data-view="split"] { grid-template-columns: 1fr 1fr; }
.content-area[data-view="split"] .content-area-edit,
.content-area[data-view="split"] .content-area-preview { min-width: 0; }
.content-area[data-view="split"] .content-textarea { min-height: 500px; height: 500px; }
.content-area[data-view="split"] .preview-pane { min-height: 500px; max-height: 500px; overflow-y: auto; }
.content-area[data-view="split"] .content-textarea { border-radius: var(--radius-md) !important; }

@media (max-width: 1200px) {
  .content-area[data-view="split"] { grid-template-columns: 1fr; }
  .content-area[data-view="split"] .preview-pane { max-height: none; }
}

/* ===== Индикатор разметки ===== */
.markup-indicator {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-3);
  padding: 8px 4px;
  font-variant-numeric: tabular-nums;
  min-height: 20px;
}
.markup-indicator span { display: inline-flex; align-items: center; gap: 4px; }
.markup-indicator .ok { color: #059669; font-weight: 500; }
.markup-indicator .warn { color: #DC2626; font-weight: 500; }
.markup-indicator .neutral { color: var(--ink-4); }
/* ===== WIZARD TONES ===== */
.wizard-step {
  border-left: 4px solid transparent;
  padding-left: 20px;
  border-radius: var(--radius-md);
  animation: fadeUp 0.3s var(--smooth);
}
.wizard-step-tone-green {
  border-left-color: #10B981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.06) 0%, transparent 30%);
}
.wizard-step-tone-orange {
  border-left-color: #F59E0B;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.06) 0%, transparent 30%);
}
.wizard-step-tone-red {
  border-left-color: #EF4444;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.06) 0%, transparent 30%);
}
.wizard-step-tone-gray {
  border-left-color: #6B7280;
  background: linear-gradient(90deg, rgba(107, 114, 128, 0.06) 0%, transparent 30%);
}
.wizard-step-tone-green .wizard-step-title { color: #059669; }
.wizard-step-tone-orange .wizard-step-title { color: #D97706; }
.wizard-step-tone-red .wizard-step-title { color: #DC2626; }
.wizard-step-tone-gray .wizard-step-title { color: #4B5563; }

/* Цветные опции в первом шаге */
.wizard-option.opt-green { border-color: rgba(16, 185, 129, 0.3); }
.wizard-option.opt-green:hover { border-color: #10B981; background: rgba(16, 185, 129, 0.06); }
.wizard-option.opt-green:hover::after { color: #10B981; }
.wizard-option.opt-orange { border-color: rgba(245, 158, 11, 0.3); }
.wizard-option.opt-orange:hover { border-color: #F59E0B; background: rgba(245, 158, 11, 0.06); }
.wizard-option.opt-orange:hover::after { color: #F59E0B; }
.wizard-option.opt-gray { border-color: rgba(107, 114, 128, 0.3); }
.wizard-option.opt-gray:hover { border-color: #6B7280; background: rgba(107, 114, 128, 0.06); }
.wizard-option.opt-gray:hover::after { color: #6B7280; }

@media (max-width: 640px) {
  .wizard-step { padding-left: 14px; }
}
