/* ============================================
   Freudin Ψ - Components Stylesheet
   Reusable UI Components — Warm Light Theme
   --------------------------------------------
   ВАЖНО: все имена классов сохранены из
   предыдущей (тёмной) версии. Изменены
   только значения и визуальный язык:
   мягкие тени, округлые радиусы, без
   неоновых свечений и сине-фиолетовых
   градиентов.
   ============================================ */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full); /* по брифу кнопки — full-rounded */
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  border: none;
  outline: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 3px solid rgba(111, 132, 101, 0.45);
  outline-offset: 2px;
}

/* Button Variants */
.btn-primary {
  background: var(--cta); /* терракота — единственный «громкий» цвет */
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(192, 105, 62, 0.28);
}

.btn-primary:hover {
  background: var(--cta-hover);
  box-shadow: 0 8px 24px rgba(192, 105, 62, 0.34);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary);
  box-shadow: none;
}

.btn-secondary:hover {
  border-color: var(--primary-dark);
  background: var(--bg-tint-sage);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-surface-light);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
}

/* Button with icon */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn-icon.btn-sm {
  width: 36px;
  height: 36px;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Тонкая шалфейная линия сверху при hover (вместо неонового градиента) */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card:hover::before {
  opacity: 1;
}

.card-glow {
  position: relative;
}

.card-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--primary);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition-base);
  filter: blur(14px);
}

.card-glow:hover::after {
  opacity: 0.12; /* мягкое шалфейное свечение, не неон */
}

/* Card variants */
.card-feature {
  padding: var(--space-2xl);
  text-align: center;
}

.card-feature .feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  background: var(--bg-tint-sage);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.card-feature h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.25rem;
}

.card-feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Profile Card */
.card-profile {
  padding: 0;
  overflow: hidden;
}

.card-profile-image {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.card-profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-profile:hover .card-profile-image img {
  transform: scale(1.05);
}

.card-profile-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  background: var(--success);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.card-profile-body {
  padding: var(--space-lg);
}

.card-profile h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.card-profile .title {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
}

.card-profile .meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: var(--space-sm);
}

.card-profile .tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* Article Card */
.card-article {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-article-image {
  height: 200px;
  overflow: hidden;
}

.card-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-article:hover .card-article-image img {
  transform: scale(1.05);
}

.card-article-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-article .category {
  display: inline-block;
  background: var(--bg-tint-sage);
  color: var(--primary-dark);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.card-article h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.card-article .excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
  flex: 1;
}

.card-article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(111, 132, 101, 0.14);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236E675D' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: var(--space-xs);
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: var(--space-xs);
}

/* ---- Search ---- */
.search-box {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 1rem 1.25rem;
  padding-left: 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(111, 132, 101, 0.14), var(--shadow-md);
}

.search-box .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

/* ---- Tags / Badges ---- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-tint-sage);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: #E2EADB;
}

.tag-outline {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
}

.tag-outline:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
}

/* ---- Alert / Toast ---- */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid rgba(95, 138, 110, 0.3);
  color: var(--success);
}

.alert-error {
  background: var(--danger-bg);
  border: 1px solid rgba(168, 84, 72, 0.3);
  color: var(--danger);
}

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-sm);
  margin-bottom: var(--space-xl);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary-dark);
}

.breadcrumbs .sep {
  color: var(--text-dim);
}

/* ---- Page Header ---- */
.page-header {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-2xl);
  background: var(--gradient-mesh);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Grid Layouts ---- */
.grid-specialists {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: var(--space-xl);
}

.grid-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
  gap: var(--space-xl);
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: var(--space-xl);
}

/* ---- Auth Pages ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--header-height) var(--space-lg) var(--space-xl);
  background: var(--gradient-mesh);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: var(--space-3xl);
}

.auth-card .logo {
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.auth-card h1 {
  text-align: center;
  margin-bottom: var(--space-xs);
  font-size: 1.75rem;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: var(--space-2xl);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-xl);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary-dark);
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ---- Specialist Profile Page ---- */
.profile-header {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-2xl);
  background: var(--gradient-mesh);
  border-bottom: 1px solid var(--border-subtle);
}

.profile-header-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: start;
}

.profile-avatar {
  width: 200px;
  max-width: 100%;
  height: 200px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  border: 3px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.profile-info h1 {
  margin-bottom: var(--space-sm);
}

.profile-info .title {
  color: var(--primary-dark);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.profile-body {
  padding: var(--space-3xl) 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-3xl);
}

.profile-section {
  margin-bottom: var(--space-3xl);
}

.profile-section:last-child {
  margin-bottom: 0;
}

.profile-section h2 {
  margin-bottom: var(--space-lg);
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.profile-sidebar .card {
  margin-bottom: var(--space-lg);
}

.profile-sidebar .card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-item .icon {
  width: 40px;
  height: 40px;
  background: var(--bg-tint-sage);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  flex-shrink: 0;
}

/* ---- Article Page ---- */
.article-page .page-header {
  text-align: left;
}

.article-page .page-header h1 {
  max-width: 800px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-content {
  max-width: 720px; /* читаемая колонка по брифу */
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
  font-size: 1.05rem;
}

.article-content h2 {
  margin: var(--space-2xl) 0 var(--space-md);
  font-size: 1.5rem;
}

.article-content h3 {
  margin: var(--space-xl) 0 var(--space-sm);
  font-size: 1.25rem;
}

.article-content p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.article-content blockquote {
  border-left: 3px solid var(--primary);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.article-content ul li,
.article-content ol li {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.article-content ul li {
  list-style: disc;
}

.article-content ol li {
  list-style: decimal;
}

/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 247, 241, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: var(--space-xl);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.mobile-menu-links a {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color var(--transition-fast);
}

.mobile-menu.open .mobile-menu-links a {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu.open .mobile-menu-links a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-menu-links a:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-menu-links a:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-menu-links a:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-menu-links a:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-menu-links a:nth-child(6) { transition-delay: 0.3s; }
.mobile-menu.open .mobile-menu-links a:nth-child(7) { transition-delay: 0.35s; }
.mobile-menu.open .mobile-menu-links a:nth-child(8) { transition-delay: 0.4s; }

/* ---- Online Tests (tests.html) ---- */
.tests-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-xl);
}

.test-card {
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.test-card-icon {
  font-size: 2.2rem;
  margin-bottom: var(--space-xs);
}

.test-card h3 {
  font-size: 1.2rem;
}

.test-card-name {
  font-size: 0.85rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.test-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
}

.test-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.test-runner,
.test-result {
  max-width: 720px;
  margin: 0 auto;
}

.test-runner-head {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.test-runner-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.test-progress {
  height: 6px;
  background: var(--bg-surface-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-xs);
}

.test-progress-bar {
  height: 100%;
  background: var(--gradient-psi); /* тональный шалфейный переход */
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.test-progress-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: var(--space-lg);
}

.test-instruction {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.test-question {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-xl);
}

.test-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.test-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.test-option:hover {
  border-color: var(--primary);
  background: var(--bg-tint-sage);
  transform: translateX(4px);
}

.test-option.selected {
  border-color: var(--primary);
  background: var(--bg-tint-sage);
  color: var(--text-primary);
}

.test-option-marker {
  color: var(--primary-dark);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.test-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.test-q-enter-right {
  animation: test-slide-right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.test-q-enter-left {
  animation: test-slide-left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes test-slide-right {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes test-slide-left {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

.test-result-date {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: var(--space-xs);
}

.test-score {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-md);
}

.test-score span {
  font-size: 1.25rem;
  color: var(--text-dim);
  font-weight: 500;
}

.test-scale {
  position: relative;
  display: flex;
  height: 12px;
  border-radius: var(--radius-full);
  overflow: visible;
  gap: 2px;
  margin-bottom: var(--space-sm);
}

.test-scale-seg {
  height: 100%;
  opacity: 0.35;
  border-radius: var(--radius-full);
  transition: opacity var(--transition-base);
}

.test-scale-seg.active {
  opacity: 1;
  box-shadow: 0 0 10px currentColor;
}

.test-scale-marker {
  position: absolute;
  top: -5px;
  width: 3px;
  height: 22px;
  background: var(--text-primary);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 6px rgba(51, 48, 43, 0.35);
}

.test-scale-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-xl);
}

.test-scale-legend-item {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.test-scale-legend-item.active {
  color: var(--text-primary);
  font-weight: 600;
}

.test-scale-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.test-verdict {
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.test-verdict h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.15rem;
}

.test-verdict p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.test-disclaimer {
  padding: var(--space-md) var(--space-lg);
  background: var(--warning-bg);
  border: 1px solid rgba(185, 138, 46, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.test-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ---- FAQ (details/summary) ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.faq-item {
  padding: var(--space-lg) var(--space-xl);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  list-style: none;
  position: relative;
  padding-right: 2rem;
  transition: color var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: 'Ψ';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 1rem;
  transition: transform var(--transition-base), color var(--transition-base);
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
  color: var(--gold);
}

.faq-item summary:hover {
  color: var(--primary-dark);
}

.faq-item p {
  margin-top: var(--space-md);
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---- Loading / Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface-light) 25%, var(--bg-base) 50%, var(--bg-surface-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Particle Canvas — отключён по брифу ---- */
#particles-canvas {
  display: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) var(--bg-base);
}

/* ---- Responsive Components ---- */
@media (max-width: 1024px) {
  /* specialists.html: инлайновая сетка «280px фильтры + контент» — в одну колонку */
  [data-filters] {
    grid-template-columns: 1fr !important;
  }

  /* Липкая карточка фильтров на мобильном мешает — делаем статичной */
  [data-filters] > aside > .card {
    position: static !important;
  }

  .auth-card {
    padding: var(--space-2xl);
  }
}

@media (max-width: 768px) {
  .profile-header-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-avatar {
    margin: 0 auto;
    width: 150px;
    height: 150px;
  }

  .profile-meta {
    justify-content: center;
  }

  .profile-actions {
    justify-content: center;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .grid-specialists,
  .grid-articles {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: var(--space-xl);
  }

  .card-feature {
    padding: var(--space-xl);
  }

  .card-profile-image {
    height: 200px;
  }

  .test-question {
    font-size: 1.1rem;
  }

  .test-score {
    font-size: 2.4rem;
  }

  .test-nav .btn {
    flex: 1 1 auto;
  }

  .faq-item {
    padding: var(--space-md) var(--space-lg);
  }

  .search-box input {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .card {
    padding: var(--space-lg);
  }

  .card-profile-body,
  .card-article-body {
    padding: var(--space-md);
  }

  .auth-card {
    padding: var(--space-lg);
  }

  .test-option {
    padding: var(--space-sm) var(--space-md);
  }

  .test-actions .btn,
  .test-nav .btn {
    width: 100%;
    white-space: normal;
  }

  .test-verdict {
    padding: var(--space-md) var(--space-lg);
  }

  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}
