@layer base, shadcn;
@import url('shadcn.css');


@layer base {
/* =========================
   templatus — современные стили
   ========================= */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-secondary: #059669;
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-surface-elevated: #ffffff;
  --color-text: #0f172a;
  --color-text-heading: #1e293b;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --color-bg: #0b1120;
  --color-surface: #151c2c;
  --color-surface-elevated: #1e293b;
  --color-text: #f8fafc;
  --color-text-heading: #f1f5f9;
  --color-muted: #94a3b8;
  --color-border: #334155;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.35), 0 4px 6px -4px rgb(0 0 0 / 0.2);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .sm\\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg\\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hidden,
.mobile-menu.hidden {
  display: none !important;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

[data-theme="dark"] .site-header {
  background: rgba(11, 17, 32, 0.85);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text-heading);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--color-primary);
}

.logo i {
  color: var(--color-primary);
  font-size: 1.75rem;
}

.main-nav {
  display: none;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
}

.main-nav a {
  color: var(--color-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.08);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.icon-btn:hover {
  background: var(--color-surface);
  border-color: var(--color-primary-light);
}

.icon-btn:active {
  transform: scale(0.96);
}

.mobile-menu-btn {
  display: inline-flex;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 68px 0 auto 0;
  background: var(--color-surface-elevated);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  z-index: 40;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu a {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--color-text);
  transition: background 0.15s ease;
}

.mobile-menu a:hover {
  background: var(--color-surface);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  text-decoration: none;
}

.btn-secondary {
  background: var(--color-surface-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-primary-light);
  text-decoration: none;
}

.btn-success {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #047857 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
  text-decoration: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at bottom right, rgba(5, 150, 105, 0.06) 0%, transparent 50%);
}

[data-theme="dark"] .hero {
  background: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at bottom right, rgba(5, 150, 105, 0.08) 0%, transparent 50%);
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 auto 1.25rem;
  max-width: 900px;
  color: var(--color-text-heading);
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-muted);
  max-width: 620px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 1.5rem;
  animation: fadeInUp 0.6s ease both 0.3s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge strong {
  color: var(--color-primary);
}

/* Cards */
.card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  animation: fadeInUp 0.5s ease both;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }
.card:nth-child(9) { animation-delay: 0.45s; }

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.35);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18) 0%, rgba(37, 99, 235, 0.06) 100%);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover .card-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--color-text-heading);
}

.card p {
  margin: 0 0 1.25rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.card blockquote {
  margin: 0 0 0.75rem;
  font-style: italic;
  color: var(--color-text);
}


.card figcaption {
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text-heading);
  font-size: 0.95rem;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #ef4444;
}

.checkbox-row,
.radio-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: var(--color-text);
}

.checkbox-row input,
.radio-row input {
  width: auto;
  accent-color: var(--color-primary);
}

/* Wizard */
.wizard {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .wizard {
    grid-template-columns: 1fr 1fr;
  }
}

.wizard-form {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.wizard-preview {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.preview-paper {
  background: #fff;
  color: #0f172a;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 400px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-muted);
}

.step::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.step:last-child::after {
  display: none;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
  transition: all 0.2s ease;
}

.step.active .step-dot,
.step.completed .step-dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.step.active {
  color: var(--color-primary);
}

.step.completed {
  color: var(--color-secondary);
}

.step.completed .step-dot {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* Dynamic lists */
.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dynamic-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--color-bg);
}

.dynamic-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--color-text-heading);
}

/* Ads */
.ad-banner-top,
.ad-sidebar,
.ad-between-steps,
.ad-before-download,
.ad-after-download,
.ad-footer {
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  text-align: center;
  overflow: hidden;
}

.ad-banner-top,
.ad-after-download,
.ad-footer {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 1rem auto;
}

.ad-sidebar {
  width: 300px;
  height: 250px;
  margin: 0 auto;
}

.ad-between-steps {
  width: 100%;
  max-width: 468px;
  height: 60px;
  margin: 1.25rem auto;
}

.ad-before-download {
  width: 300px;
  height: 250px;
  margin: 0 auto 1rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal h3 {
  margin: 0 0 1rem;
  color: var(--color-text-heading);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  width: 0%;
  transition: width 0.1s linear;
}

/* FAQ accordion */
.accordion-item {
  border-bottom: 1px solid var(--color-border);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.125rem 0;
  background: none;
  border: none;
  color: var(--color-text-heading);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
}

.accordion-header:hover {
  color: var(--color-primary);
}

.accordion-header i {
  transition: transform 0.2s ease;
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.accordion-body.open {
  max-height: 500px;
}

.accordion-body p {
  margin: 0 0 1rem;
  color: var(--color-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  background: var(--color-surface);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
}

.footer-col h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--color-text-heading);
}

.footer-col p {
  color: var(--color-muted);
  line-height: 1.6;
}

.footer-col a {
  display: block;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* Utility */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--color-text-heading);
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--color-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-primary);
}

/* Page header */
.page-header {
  padding: 3rem 0 2rem;
  background: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.06) 0%, transparent 60%);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: var(--color-text-heading);
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--color-muted);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto;
}

/* Resume preview improvements */
.resume-preview {
  font-family: var(--font-sans);
  color: #0f172a;
  line-height: 1.6;
}

.resume-preview h2,
.resume-preview h3,
.resume-preview strong,
.resume-preview p {
  color: inherit;
}

.resume-preview-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--color-primary);
}

.resume-preview-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary-light);
  flex-shrink: 0;
  background: var(--color-surface);
}

.resume-preview-title {
  flex: 1;
}

.resume-preview-title h2 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
  color: #0f172a;
}

.resume-preview-title .position {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #2563eb;
  font-weight: 600;
}

.resume-preview-title .contacts {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.resume-preview-section {
  margin-bottom: 1.25rem;
}

.resume-preview-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.35rem;
}

.resume-preview-item {
  margin-bottom: 0.75rem;
}

.resume-preview-item strong {
  color: #0f172a;
}

.resume-preview-period {
  color: #64748b;
  font-size: 0.9rem;
}

.resume-preview-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.resume-preview-tag {
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-primary);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.resume-preview-empty {
  color: #64748b;
  font-style: italic;
}

/* Photo upload */
.photo-upload {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.photo-upload-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px dashed var(--color-border);
  background: var(--color-surface);
  display: none;
}

.photo-upload-preview.visible {
  display: block;
}

.photo-upload-hint {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Responsive helpers */
@media (max-width: 1023px) {
  .wizard-preview {
    position: static;
    max-height: none;
  }
}

@media (max-width: 767px) {
  .hero {
    padding: 3.5rem 0 3rem;
  }
  .section {
    padding: 3rem 0;
  }
  .card {
    padding: 1.25rem;
  }
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .ad-banner-top,
  .ad-sidebar,
  .ad-between-steps,
  .ad-before-download,
  .ad-after-download,
  .ad-footer,
  .wizard-form,
  .step-indicator,
  .modal-overlay {
    display: none !important;
  }
  .wizard {
    display: block;
  }
  .wizard-preview {
    border: none;
    box-shadow: none;
    overflow: visible;
  }
}

/* Focus-visible */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* =========================
   Фильтры и поиск шаблонов
   ========================= */

.template-toolbar {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .template-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.template-search-wrap {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.template-search-wrap i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.template-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.template-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.template-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.template-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-elevated);
  color: var(--color-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.template-filter:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--color-primary);
}

.template-filter.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.templates-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
}

.templates-empty i {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary-light);
}

/* =========================
   Визуальные примеры шагов
   ========================= */

.step-visual {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.sv-card {
  width: 100%;
  max-width: 140px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.sv-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.15);
}

.sv-lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sv-line {
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
}

.sv-line-short {
  width: 60%;
}

.sv-btn {
  height: 14px;
  border-radius: 4px;
  background: var(--color-primary);
  opacity: 0.85;
}

.sv-input {
  width: 100%;
  height: 14px;
  border-radius: 4px;
  background: var(--color-border);
}

.sv-input-half {
  width: 60%;
}

.sv-paper {
  width: 100%;
  max-width: 120px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .sv-paper {
  background: var(--color-surface-elevated);
}

.sv-file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 100%;
  max-width: 150px;
}

.sv-file-icon {
  color: var(--color-primary);
  font-size: 1.25rem;
  line-height: 1;
}

.sv-file-name {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.sv-download-btn {
  padding: 0.35rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

/* =========================
   Страница "О нас"
   ========================= */

.text-center {
  text-align: center;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 auto;
}

/* =========================
   Мои документы / история
   ========================= */

.doc-history-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.doc-history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

@media (max-width: 640px) {
  .doc-history-item {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .doc-history-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.doc-history-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.doc-history-info h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: var(--color-text-heading);
}

.doc-history-subtitle {
  margin: 0 0 0.25rem;
  color: var(--color-text);
  font-size: 0.95rem;
}

.doc-history-date {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.doc-history-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* =========================
   Превью шаблонов в карточках
   ========================= */

.template-preview {
  margin: -0.5rem -0.5rem 1rem;
  padding: 1rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.tp-document {
  width: 90px;
  height: 110px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  padding: 0.6rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

[data-theme="dark"] .tp-document {
  background: var(--color-surface-elevated);
}

.tp-line {
  height: 5px;
  border-radius: 2px;
  background: var(--color-border);
}

.tp-line.short {
  width: 60%;
}

.tp-line.highlight {
  background: var(--color-primary);
  opacity: 0.5;
}

.tp-resume {
  width: 100px;
  height: 110px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  padding: 0.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem;
}

.tp-resume-photo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.2;
}

.tp-resume-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tp-presentation {
  width: 120px;
  height: 75px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.tp-presentation .tp-line {
  background: rgba(255, 255, 255, 0.35);
}

.tp-presentation .tp-line.highlight {
  background: rgba(59, 130, 246, 0.8);
}

/* =========================
   Статьи блога
   ========================= */

.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-body h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-text-heading);
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text);
}
}
