/* ===================================================
   TestCreator — Styles (merged)
   Приоритет: новый styles.css (Syne + Manrope, CSS-переменные)
   Дополнено: уникальные компоненты из старого style.css
   Light / Dark themes via [data-theme]
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Manrope:wght@400;500;600&display=swap');

/* ===== DARK THEME (default) ===== */
:root,
[data-theme="dark"] {
  --bg:            #0C0D10;
  --bg-surface:    #13141A;
  --bg-card:       #181920;
  --bg-card-hover: #1E2029;
  --border:        rgba(255,255,255,0.07);
  --border-light:  rgba(255,255,255,0.12);
  --text-primary:   #F0F1F5;
  --text-secondary: rgba(240,241,245,0.55);
  --text-muted:     rgba(240,241,245,0.32);
  --accent:        #4285F4;
  --accent-soft:   rgba(66,133,244,0.12);
  --accent-mid:    rgba(66,133,244,0.25);
  --accent-glow:   rgba(66,133,244,0.4);
  --green:         #0F9D58;
  --green-bg:      rgba(15,157,88,0.14);
  --yellow:        #FBBC04;
  --nav-bg:        rgba(12,13,16,0.85);
  --shadow-sm:  0 2px 12px rgba(0,0,0,0.35);
  --shadow:     0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.6);
  --icon-sun-display:  block;
  --icon-moon-display: none;

  /* Совместимость со старыми компонентами */
  --bg-body:           #0C0D10;
  --bg-elevated:       #181920;
  --bg-elevated-subtle:#13141A;
  --text-main:         #F0F1F5;
  --border-subtle:     rgba(255,255,255,0.07);
  --accent-strong:     #3b82f6;
  --danger:  #f97373;
  --warning: #fb923c;
  --success: #22c55e;
  --shadow-soft: 0 18px 45px rgba(0,0,0,0.55);
  --success-color: #22c55e;
  --error-color:   #f97373;
  --primary-color: #4285F4;
  --text-muted-compat: rgba(240,241,245,0.32);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg:            #F4F5F9;
  --bg-surface:    #FFFFFF;
  --bg-card:       #FFFFFF;
  --bg-card-hover: #EEF2FF;
  --border:        rgba(0,0,0,0.07);
  --border-light:  rgba(0,0,0,0.13);
  --text-primary:   #111827;
  --text-secondary: rgba(17,24,39,0.58);
  --text-muted:     rgba(17,24,39,0.38);
  --accent:        #1A6FEE;
  --accent-soft:   rgba(26,111,238,0.08);
  --accent-mid:    rgba(26,111,238,0.2);
  --accent-glow:   rgba(26,111,238,0.3);
  --green:         #0B8A49;
  --green-bg:      rgba(11,138,73,0.1);
  --yellow:        #B45309;
  --nav-bg:        rgba(244,245,249,0.9);
  --shadow-sm:  0 2px 12px rgba(0,0,0,0.07);
  --shadow:     0 8px 32px rgba(0,0,0,0.1);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.12);
  --icon-sun-display:  none;
  --icon-moon-display: block;

  /* Совместимость со старыми компонентами */
  --bg-body:           #F4F5F9;
  --bg-elevated:       #FFFFFF;
  --bg-elevated-subtle:#f9fafb;
  --text-main:         #111827;
  --border-subtle:     #e5e7eb;
  --accent-strong:     #1d4ed8;
  --danger:  #dc2626;
  --warning: #ea580c;
  --success: #16a34a;
  --shadow-soft: 0 18px 45px rgba(15,23,42,0.12);
  --success-color: #16a34a;
  --error-color:   #dc2626;
  --primary-color: #1A6FEE;
  --text-muted-compat: #4b5563;
}

/* ===== Smooth theme transition ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Manrope', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: 'Syne', sans-serif; line-height: 1.15; }
h4, h5, h6  { line-height: 1.3; }

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.5rem; }

p { margin-top: 0; margin-bottom: 1em; color: var(--text-secondary); }

ul, ol { margin-bottom: 1em; padding-left: 25px; }
li { margin-bottom: 0.5em; }

/* ===== Theme transition class ===== */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease !important;
}

/* ===== Layout ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }

/* Legacy layout (совместимость со старыми страницами) */
.main-container { flex-grow: 1; }
.content-wrapper {
  max-width: 1040px;
  margin: 2.5rem auto 3.5rem;
  padding: 0 1.5rem;
}

/* ===== Buttons (новые) ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--accent-glow); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-primary);
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 9px 18px; font-size: 14px; border-radius: 10px; }

/* Legacy button (совместимость) */
.button {
  display: inline-block;
  background-color: var(--accent);
  color: white;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.07);
  text-align: center;
  line-height: 1.2;
}
.button:hover, .button:focus {
  background-color: var(--accent-strong);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}
.button.button-success { background-color: var(--green); }
.button.button-success:hover { background-color: #0b8a49; }
.button:disabled, .button[disabled] {
  background-color: var(--text-muted);
  color: rgba(255,255,255,0.6);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.button.button-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-light);
  box-shadow: none;
}
.button.button-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-mid);
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.06);
}
.theme-toggle:active { transform: scale(0.95); }

.icon-sun  { display: var(--icon-sun-display); }
.icon-moon { display: var(--icon-moon-display); }

.theme-toggle--mobile {
  width: auto; height: auto;
  padding: 0; border: none; background: none;
  gap: 6px;
}
.theme-label {
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
}

/* ===== Section Headers ===== */
.section-header { text-align: center; margin-bottom: 60px; }

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

/* ===== Appear Animation ===== */
.appear {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1), transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.appear.visible { opacity: 1; transform: translateY(0); }

/* ===== NAVIGATION ===== */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.2s ease;
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-img {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--border);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.lang-switcher { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.lang-btn { color: var(--text-muted); font-weight: 600; padding: 4px 2px; transition: color 0.15s ease; }
.lang-btn:hover, .lang-btn.active { color: var(--text-primary); }
.lang-divider { color: var(--border-light); }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.mobile-menu-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }

.mobile-link {
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.mobile-link:hover { color: var(--text-primary); background: var(--border); }

.mobile-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 80px 0 0;
  overflow: hidden;
  min-height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 80%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-glow--1 {
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, var(--accent-mid), transparent 70%);
  top: -100px; left: 50%;
  transform: translateX(-60%);
}
.hero-glow--2 {
  width: 400px; height: 300px;
  background: radial-gradient(ellipse, rgba(15,157,88,0.15), transparent 70%);
  top: 60px; right: -80px;
}

.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 60px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
  max-width: 760px;
}

.hero-title mark {
  background: none;
  color: var(--accent);
  position: relative;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 52px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 20px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
  flex-wrap: nowrap;
}

.stat { padding: 0 28px; text-align: center; }
.stat-num { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 4px; }
.stat-divider { width: 1px; height: 40px; background: var(--border-light); flex-shrink: 0; }

/* Legacy Hero (совместимость) */
.hero-section {
  background: var(--bg-card);
  padding: 2.4rem 2.4rem 2.6rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 2.4rem;
  border: 1px solid var(--border-light);
}
.hero-section h1 { font-size: 2.35rem; color: var(--text-primary); margin-bottom: 1.2rem; letter-spacing: -0.03em; }
.hero-section .hero-intro { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 1rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-section ul { list-style-type: disc; padding-left: 25px; margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ===== Content Section (legacy) ===== */
.content-section {
  background-color: var(--bg-card);
  padding: 2.3rem 2.4rem 2.4rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 2.2rem;
  border: 1px solid var(--border-light);
}

/* ===== Mockup ===== */
.mockup-window {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.mockup-titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--border);
}
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-light); flex-shrink: 0; }
.mockup-dot:nth-child(1) { background: #FF5F56; }
.mockup-dot:nth-child(2) { background: #FFBD2E; }
.mockup-dot:nth-child(3) { background: #27C93F; }
.mockup-url {
  flex: 1; margin: 0 12px; padding: 4px 12px; font-size: 11px;
  color: var(--text-muted); background: var(--bg-surface);
  border-radius: 6px; border: 1px solid var(--border);
}

.mockup-body { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; padding: 16px; }

.mockup-sheet { background: var(--bg-surface); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.mockup-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--border); border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.form-badge {
  margin-left: auto; font-size: 11px; padding: 2px 8px;
  background: var(--green-bg); color: var(--green);
  border-radius: 100px; font-weight: 600;
}

.mockup-rows { padding: 8px 0; }
.mockup-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; }
.cell {
  padding: 6px 12px; font-size: 12px;
  color: var(--text-secondary); border-bottom: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell.header {
  font-weight: 700; color: var(--text-muted); font-size: 11px;
  background: var(--border); text-transform: uppercase; letter-spacing: 0.05em;
}
.cell.correct { color: var(--green); font-weight: 600; }
.mockup-row.muted .cell { color: var(--text-muted); font-size: 11px; }

.mockup-arrow {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 11px; font-weight: 600;
}
.arrow-line {
  width: 1px; height: 30px;
  background: linear-gradient(to bottom, transparent, var(--accent)); opacity: 0.5;
}

.mockup-form-body { padding: 14px; }
.form-question { background: var(--bg-surface); border-radius: 8px; padding: 12px; }
.form-q-text { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.form-option { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); padding: 4px 0; }
.form-option.active { color: var(--accent); font-weight: 600; }
.radio { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--border-light); flex-shrink: 0; }
.radio.active { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

/* ===== HOW IT WORKS ===== */
.how-it-works {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps { display: flex; align-items: flex-start; gap: 16px; }

.step {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px;
  position: relative;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.3s ease;
}
.step:hover { border-color: var(--accent-mid); transform: translateY(-4px); box-shadow: var(--shadow); }

.step-number {
  font-family: 'Syne', sans-serif;
  font-size: 48px; font-weight: 800;
  color: var(--accent); opacity: 0.1;
  position: absolute; top: 20px; right: 24px; line-height: 1;
}
.step-icon {
  width: 52px; height: 52px;
  background: var(--accent-soft); border: 1px solid var(--accent-mid);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 20px;
}
.step-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.step-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }

.step-connector { padding-top: 60px; flex-shrink: 0; color: var(--accent); opacity: 0.35; }

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 28px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.3s ease;
}
.feature-card:hover { border-color: var(--border-light); background: var(--bg-card-hover); transform: translateY(-3px); box-shadow: var(--shadow); }

.feature-card--large {
  grid-row: span 2; padding: 36px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-soft) 100%);
  border-color: var(--accent-mid);
}
.feature-card--large:hover { border-color: var(--accent); box-shadow: 0 12px 40px var(--accent-soft); }

.feature-icon {
  width: 52px; height: 52px;
  background: var(--accent-soft); border: 1px solid var(--accent-mid);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 20px;
}
.feature-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.feature-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }

.feature-highlight {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
}
.highlight-num { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; color: var(--accent); line-height: 1; }
.highlight-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ===== TABLE FORMAT ===== */
.table-format { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.table-format-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.format-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.format-item { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-secondary); font-weight: 500; }
.format-item svg { flex-shrink: 0; color: var(--accent); }

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
}
.table-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  background: var(--border);
}
.example-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.example-table th {
  padding: 8px 14px; text-align: left; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); background: var(--border); font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.example-table td { padding: 10px 14px; color: var(--text-secondary); border-bottom: 1px solid var(--border); transition: background 0.15s ease; }
.example-table tr:last-child td { border-bottom: none; }
.example-table tr:hover td { background: var(--accent-soft); }

.answer-cell { color: var(--green) !important; font-weight: 600 !important; }
.open-cell   { color: var(--yellow) !important; font-weight: 600 !important; font-style: italic; }

/* ===== CTA ===== */
.cta-section { padding: 80px 0; }
.cta-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-soft) 100%);
  border: 1px solid var(--accent-mid);
  border-radius: 28px; padding: 64px 48px;
  text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 0 80px var(--accent-soft);
}
.cta-glow {
  position: absolute;
  width: 400px; height: 300px;
  background: radial-gradient(ellipse, var(--accent-soft), transparent 70%);
  top: -100px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.cta-content { position: relative; z-index: 1; }
.cta-title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin-bottom: 16px; }
.cta-desc { font-size: 17px; color: var(--text-secondary); margin-bottom: 32px; max-width: 460px; margin-left: auto; margin-right: auto; }
.cta-note { margin-top: 16px; font-size: 13px; color: var(--text-muted); }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--bg-surface); }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 32px; padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.footer-nav { display: flex; align-items: center; gap: 4px; }
.footer-link { padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--text-muted); border-radius: 8px; transition: color 0.15s ease; }
.footer-link:hover { color: var(--text-primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-copy { font-size: 13px; color: var(--text-muted); }
.footer-legal { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.footer-legal-link { color: var(--text-muted); transition: color 0.15s ease; }
.footer-legal-link:hover { color: var(--text-secondary); }

/* ==========================================================================
   Компоненты из старого style.css (уникальные, не перекрывают новые)
   ========================================================================== */

/* ---- Вспомогательные блоки ---- */
.parent-container {
  display: flex;
  justify-content: center;
}
.contact-whatsapp {
  display: flex;
  align-items: center;
  gap: 8px;
}
.video-container {
  display: flex;
  justify-content: center;
}
.video-container iframe { max-width: 100%; }

/* ---- Таблица-пример в справке ---- */
.table-example {
  margin: 1.25rem 0;
  overflow-x: auto;
}
.table-example table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background-color: var(--bg-elevated-subtle);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.table-example thead {
  background: linear-gradient(90deg, var(--accent-soft), rgba(15,157,88,0.08));
}
.table-example th,
.table-example td {
  padding: 0.55rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table-example th { font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.table-example tbody tr:nth-child(even) { background-color: var(--accent-soft); }

/* ---- Заметки / предупреждения ---- */
.note-required {
  background: rgba(250,204,21,0.1);
  border: 1px solid rgba(234,179,8,0.4);
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin: 1rem 0;
}
.note-required strong { color: var(--yellow); }

/* ---- Формы (legacy) ---- */
.form-element { margin-bottom: 1.5rem; }
.form-element label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 1rem;
}
.form-element input[type="text"],
.form-element input[type="email"],
.form-element input[type="password"],
.form-element textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-element input:focus,
.form-element textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.form-actions { text-align: center; margin-top: 1.5rem; }
.form-actions .button + .button { margin-left: 1rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
  align-items: flex-start;
}

/* ---- Выбранный файл ---- */
.selected-file-info {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--text-secondary);
  background-color: var(--bg-card);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  text-align: center;
  min-height: 1.5em;
  border: 1px dashed var(--border-light);
}
.selected-file-info:empty { display: none; }
.selected-file-info.file-picked-error {
  color: var(--danger);
  background-color: rgba(220,53,69,0.08);
  border-color: var(--danger);
}

/* ---- Preview panel ---- */
.preview-panel {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 12px;
}
.preview-panel ul { margin: 0.5rem 0 0; padding-left: 20px; color: var(--text-secondary); }

/* ---- Limits info ---- */
.limit-info { border-radius: 8px; padding: 1rem; margin-bottom: 1rem; border: 2px solid; }
.limit-ok      { background: var(--bg-card); border-color: var(--success-color); }
.limit-warning { background: var(--bg-card); border-color: var(--yellow); }
.limit-exceeded{ background: var(--bg-card); border-color: var(--error-color); }

.limit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.subscription-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.questions-count { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }

.limit-info .alert { padding: 0.75rem 1rem; border-radius: 6px; }
.limit-info .alert-success  { background: rgba(22,163,74,0.1);  border: 1px solid rgba(22,163,74,0.3);  color: var(--text-primary); }
.limit-info .alert-warning  { background: rgba(251,188,4,0.1);  border: 1px solid rgba(251,188,4,0.3);  color: var(--text-primary); }
.limit-info .alert-danger   { background: rgba(220,53,69,0.1);  border: 1px solid rgba(220,53,69,0.3);  color: var(--text-primary); }
.limit-info .alert strong   { display: block; margin-bottom: 0.25rem; }
.limit-info .alert p        { margin: 0.25rem 0; }
.limit-info .btn-sm         { padding: 0.25rem 0.75rem; font-size: 0.875rem; margin-left: 0.5rem; }

/* ---- User info ---- */
.user-info-block {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}
.user-info-block p { margin: 0; color: var(--text-primary); font-size: 1rem; }
.user-info-block strong { color: var(--accent); }

/* ---- Flash Messages ---- */
.flash-messages { list-style-type: none; padding: 0; margin: 0 0 1.5rem 0; }
.flash-messages li {
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  color: white;
  font-weight: 500;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.flash-messages li.flash-success,
.flash-messages li.flash-success_html { background-color: var(--green); border-color: rgba(0,0,0,0.15); }
.flash-messages li.flash-error   { background-color: var(--danger); border-color: rgba(0,0,0,0.15); }
.flash-messages li.flash-warning { background-color: var(--warning); border-color: rgba(0,0,0,0.15); }
.flash-messages li.flash-info    { background-color: var(--accent);  border-color: rgba(0,0,0,0.15); }
.flash-messages li a.alert-link { color: white !important; font-weight: bold; text-decoration: underline; margin-left: 0.5rem; }
.flash-messages li a.alert-link:hover { text-decoration: none; }

/* ---- Loading Spinner ---- */
.loading-indicator {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-in;
}
.loading-indicator-container {
  width: 50%;
  max-height: 50vh;
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}
.loading-indicator .spinner {
  border: 5px solid var(--border);
  width: 60px; height: 60px;
  border-radius: 50%;
  border-left-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.5rem;
}
.loading-indicator p { font-size: 1.2rem; color: var(--text-primary); font-weight: 500; margin: 0; text-align: center; padding: 0 1rem; }

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ---- Checkbox ---- */
#is-survey-checkbox {
  width: 25px; height: 25px;
  appearance: none; -webkit-appearance: none;
  background-color: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-right: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
#is-survey-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}
#is-survey-checkbox:checked::after {
  content: '✔';
  font-size: 15px;
  color: white;
  position: absolute;
  left: 4px; top: 0px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 15px;
}
.checkbox-container label { cursor: pointer; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 960px) {
  .steps { flex-direction: column; max-width: 560px; margin: 0 auto; }
  .step-connector { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-card--large { grid-column: span 2; grid-row: span 1; }
  .table-format-inner { grid-template-columns: 1fr; gap: 40px; }
  .mockup-body { grid-template-columns: 1fr; gap: 12px; }
  .mockup-arrow { flex-direction: row; }
  .arrow-line { width: 30px; height: 1px; background: linear-gradient(to right, transparent, var(--accent)); opacity: 0.5; }
}

@media (max-width: 700px) {
  .nav-links, .nav-right { display: none; }
  .mobile-menu-btn { display: flex; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 0; min-height: auto; }
  .hero-stats { flex-direction: column; width: 100%; max-width: 280px; padding: 20px; }
  .stat { padding: 12px 0; }
  .stat-divider { width: 80%; height: 1px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--large { grid-column: span 1; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-legal { flex-wrap: wrap; }
  .cta-card { padding: 40px 24px; }
  .mockup-row { grid-template-columns: 2fr 1fr 1fr; }
  .mockup-row .cell:last-child { display: none; }
  .content-wrapper { padding: 1rem; }
  .content-section { padding: 1.5rem; }
  .loading-indicator-container { width: 90%; max-height: 70vh; }
  .form-actions .button { display: block; width: 100%; margin-bottom: 0.75rem; }
  .form-actions .button + .button { margin-left: 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 38px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline { width: 100%; justify-content: center; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
}
