/* components.css — LensGuru V2 component styles */

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header--scrolled { box-shadow: var(--shadow-sm); }

.header__inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  gap: var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}
.header__logo svg { flex-shrink: 0; }
.header__logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  color: var(--color-primary);
}
.header__logo-subtitle {
  display: none;
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0;
}
@media (min-width: 600px) {
  .header__logo-subtitle { display: inline; }
}

.header__nav { display: none; }
@media (min-width: 900px) {
  .header__nav { display: block; }
}
.header__nav-list {
  display: flex;
  gap: var(--space-1);
}
.header__nav-link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.header__nav-link:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}
.header__nav-link.active {
  color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.header__actions { display: flex; align-items: center; gap: var(--space-2); }

/* Theme toggle removed — single light theme */

/* Hamburger */
.header__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.header__hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-interactive), opacity var(--transition-interactive);
}
.header__hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__hamburger.active span:nth-child(2) { opacity: 0; }
.header__hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px) { .header__hamburger { display: none; } }

/* Mobile Menu */
.mobile-menu {
  display: none;
  padding: var(--space-4);
  border-top: 1px solid var(--color-divider);
  background: var(--color-bg);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { display: flex; flex-direction: column; gap: var(--space-1); }
.mobile-menu__link {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: 500;
  transition: background var(--transition-interactive);
}
.mobile-menu__link:hover { background: var(--color-surface-offset); }
@media (min-width: 900px) { .mobile-menu { display: none !important; } }

/* ===== SECTION INDICATORS ===== */
.section-indicators {
  position: fixed;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2);
}
@media (min-width: 1024px) {
  .section-indicators { display: flex; }
}
.section-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  transition: background var(--transition-interactive), transform var(--transition-interactive);
  cursor: pointer;
}
.section-indicator.active {
  background: var(--color-primary);
  transform: scale(1.4);
}
.section-indicator:hover {
  background: var(--color-primary-hover);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(var(--space-16), 10vw, var(--space-32)) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  background: #FFFFFF;
}
.hero__inner {
  max-width: var(--content-default);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero__badge {
  display: none;
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}
.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 55ch;
  margin: 0 auto var(--space-8);
  line-height: 1.5;
}
.hero__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}
.hero__stats {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
  flex-wrap: wrap;
}
.hero__stat { text-align: center; }
.hero__stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.hero__stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero__visual {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(500px, 90vw);
  height: min(500px, 90vw);
  opacity: 0.15;
  z-index: 1;
  animation: hero-rotate 60s linear infinite;
}
@keyframes hero-rotate { to { transform: translate(-50%, -50%) rotate(360deg); } }
.hero__lens-svg { width: 100%; height: 100%; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-interactive), color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive);
}
.btn-lg { padding: var(--space-3) var(--space-6); font-size: var(--text-sm); }
.btn-primary { background: var(--color-primary); color: var(--color-text-inverse); }
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { background: var(--color-primary-active); transform: translateY(0); }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-surface-offset); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-secondary:active { transform: translateY(0); }

/* ===== SECTIONS ===== */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
}
.section--alt { background: var(--color-surface); }
.container { max-width: var(--content-wide); margin: 0 auto; }
.section__header { text-align: center; margin-bottom: var(--space-10); }
.section__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}
.section__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 50ch;
  margin: 0 auto;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-8);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-interactive);
}
.section--alt .tab-btn {
  background: var(--color-bg);
}
.tab-btn:hover { color: var(--color-text); background: var(--color-surface-offset); }
.tab-btn[aria-selected="true"] {
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* ===== TIER CARDS ===== */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.tier-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-interactive);
}
.tier-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.tier-card[data-tier="basic"]::before { background: var(--color-border); }
.tier-card[data-tier="optimized"]::before { background: var(--color-primary); }
.tier-card[data-tier="personalized"]::before { background: linear-gradient(90deg, var(--color-primary), #6366F1); }
.tier-card[data-tier="maximum"]::before { background: linear-gradient(90deg, var(--color-primary), #F59E0B, #EF4444); }

.tier-card__header { margin-bottom: var(--space-3); }
.tier-card__badge {
  display: inline-flex;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}
.tier-card[data-tier="basic"] .tier-card__badge { background: var(--color-surface-offset); color: var(--color-text-muted); }
.tier-card[data-tier="optimized"] .tier-card__badge { background: var(--color-primary-highlight); color: var(--color-primary); }
.tier-card[data-tier="personalized"] .tier-card__badge { background: color-mix(in oklch, #6366F1 12%, var(--color-surface)); color: #6366F1; }
.tier-card[data-tier="maximum"] .tier-card__badge { background: color-mix(in oklch, #F59E0B 12%, var(--color-surface)); color: #D97706; }

.tier-card__model {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.tier-card__tech {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.tier-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}
.tier-card__features {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-4);
}
.tier-card__features li {
  font-size: var(--text-sm);
  padding: var(--space-1) 0;
  padding-left: var(--space-5);
  position: relative;
  color: var(--color-text);
}
.tier-card__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.6;
}
.tier-card__price {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.tier-card__price strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
  margin-top: var(--space-1);
}

/* ===== COMPARISON TABLE ===== */
.table-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-track { background: var(--color-surface-offset); }
.table-scroll::-webkit-scrollbar-thumb { background: rgba(162, 35, 142, 0.3); border-radius: 3px; }

.data-table {
  width: 100%;
  min-width: 640px;
  font-size: var(--text-sm);
}
.data-table thead { background: var(--color-surface-offset); }
.data-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.data-table td {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-divider);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.data-table tbody tr {
  transition: background var(--transition-interactive);
}
.data-table tbody tr:hover { background: var(--color-surface-2); }
.data-table .row-highlight { background: var(--color-primary-highlight); }
.data-table .row-highlight:hover { background: color-mix(in oklch, var(--color-primary) 12%, var(--color-surface)); }
.data-table .price-cell { font-weight: 500; color: var(--color-text); }
.data-table .price-null { color: var(--color-text-faint); }
.data-table .brand-cell { font-weight: 600; }
.data-table .cheapest-cell { color: var(--color-primary); font-weight: 700; }

.table-title {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.table-title svg { color: var(--color-primary); flex-shrink: 0; }

/* ===== BRAND TECHNOLOGY CARDS ===== */
.brand-tech-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.bt-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-interactive);
}
.bt-card:hover { box-shadow: var(--shadow-sm); }

.bt-card__header {
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  user-select: none;
}
.bt-card__header:hover { background: var(--color-surface-offset); }

.bt-card__header-left { flex: 1; min-width: 0; }

.bt-card__name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--color-text);
}
.bt-card__brief {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}
.bt-card__meta {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}
.bt-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.bt-card__meta-item svg { flex-shrink: 0; }

.bt-card__chevron {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: transform var(--transition-interactive);
  margin-top: var(--space-1);
}
.bt-card.expanded .bt-card__chevron { transform: rotate(180deg); }

.bt-card__body {
  display: none;
  padding: 0 var(--space-5) var(--space-5);
  border-top: 1px solid var(--color-divider);
}
.bt-card.expanded .bt-card__body { display: block; }

.bt-card__detail {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  padding-top: var(--space-4);
}
.bt-card__detail p { margin-bottom: var(--space-3); }
.bt-card__detail strong { color: var(--color-text); }

.bt-card__products {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.bt-card__products strong { color: var(--color-text); }

/* ===== GENERAL TECH SECTION ===== */
.general-tech-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .general-tech-grid { grid-template-columns: repeat(2, 1fr); }
}

.gt-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.gt-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}
.gt-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}
.gt-card__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}
.gt-card__tiers {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.gt-tier {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
}
.gt-tier__badge {
  flex-shrink: 0;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  white-space: nowrap;
}
.gt-tier__text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* SVG diagrams */
.gt-card__diagram {
  margin: var(--space-4) 0;
  display: flex;
  justify-content: center;
}
.gt-card__diagram svg {
  max-width: 100%;
  height: auto;
}

/* ===== RESEARCH / PUBLICATIONS ===== */
.pub-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.pub-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.pub-card__title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
  line-height: 1.4;
}
.pub-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}
.pub-card__meta span {
  display: inline;
}
.pub-card__findings {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}
.pub-card__takeaway {
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-highlight);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-xs);
  line-height: 1.5;
}
.pub-card__takeaway strong {
  color: var(--color-primary);
  display: block;
  margin-bottom: var(--space-1);
}
.pub-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}
.pub-card__link:hover { text-decoration: underline; }

/* ===== TECHNOLOGIES (old — keep for compat) ===== */
.tech-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: var(--space-4);
}
.tech-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
}
.tech-card__level {
  display: inline-flex;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: var(--space-3);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.tech-card__name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.tech-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===== BRANDS (by region) ===== */
.brands-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.brands-region__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
  letter-spacing: -0.01em;
}
.brands-region__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-3);
}
.brand-card-compact {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: box-shadow var(--transition-interactive);
}
.brand-card-compact:hover { box-shadow: var(--shadow-sm); }
.brand-card-compact__top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.brand-card-compact__flag {
  font-size: var(--text-base);
  line-height: 1;
}
.brand-card-compact__name {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}
.brand-card-compact__segment {
  margin-left: auto;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.segment--budget {
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}
.segment--mid {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.segment--premium {
  background: color-mix(in oklch, #6366F1 12%, var(--color-surface));
  color: #6366F1;
}
.brand-card-compact__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Legacy brand-card (keep for compat) */
.brand-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}
.brand-card__flag {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}
.brand-card__name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.brand-card__country {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.brand-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===== MATERIALS ===== */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: var(--space-4);
}
.material-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
}
.material-card__lens {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  height: 80px;
}
.material-card__lens-shape {
  background: linear-gradient(135deg, var(--color-primary-highlight), rgba(162, 35, 142, 0.2));
  border: 2px solid var(--color-primary);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.8;
}
.material-card__index {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}
.material-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.material-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ===== COMPARISON TOOL ===== */
.comparison-controls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.comparison-controls__group label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
  outline: none;
}

.comparison-result { min-height: 200px; }

.comparison-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-4);
}
.comp-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
}
.comp-card--best {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.comp-card--best::after {
  content: 'Лучшая цена';
  position: absolute;
  top: calc(-1 * var(--space-2));
  right: var(--space-3);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.comp-card__brand {
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}
.comp-card__model {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.comp-card__prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.comp-card__price-item {
  padding: var(--space-2);
  background: var(--color-surface-offset);
  border-radius: var(--radius-sm);
  text-align: center;
}
.comp-card__price-idx {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: block;
}
.comp-card__price-val {
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  display: block;
}

/* ===== PRICE DISCLAIMER ===== */
.price-disclaimer {
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
  line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
  padding: var(--space-8) var(--space-4);
  border-top: 1px solid var(--color-divider);
  background: #E8E9ED;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
}
.footer__disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 60ch;
}
.footer__links a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer__links a:hover { color: var(--color-primary); }
.footer__links { display: flex; align-items: center; gap: var(--space-2); }
.footer__sep { color: var(--color-text-faint); }
.footer__copyright {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: var(--space-24);
  right: var(--space-4);
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition-interactive), transform var(--transition-interactive), background var(--transition-interactive);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* ===== CHATBOT ===== */
.chat-fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-4);
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}
.chat-fab:hover { background: var(--color-primary-hover); transform: scale(1.05); }
.chat-fab svg { pointer-events: none; }

.chat-fab__pulse {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-success);
  border: 2px solid var(--color-primary);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Chat Panel */
.chat-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 70;
  width: 100%;
  height: 100%;
  max-width: 420px;
  max-height: 100dvh;
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}
.chat-panel.open {
  transform: translateX(0);
}
@media (min-width: 768px) {
  .chat-panel {
    bottom: var(--space-4);
    right: var(--space-4);
    height: min(680px, calc(100dvh - 2rem));
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
  }
}

.chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface);
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .chat-panel__header {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
}
.chat-panel__header-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
}
.chat-panel__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition-interactive);
}
.chat-panel__close:hover { background: var(--color-surface-offset); }

.chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.chat-panel__messages::-webkit-scrollbar { width: 4px; }
.chat-panel__messages::-webkit-scrollbar-track { background: transparent; }
.chat-panel__messages::-webkit-scrollbar-thumb { background: rgba(162, 35, 142, 0.3); border-radius: 2px; }

.chat-msg {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.6;
  word-break: break-word;
}
.chat-msg--bot {
  align-self: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.chat-msg--typing {
  align-self: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-5);
}
.chat-msg--typing .typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}
.chat-msg--typing .typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: typing-bounce 1.4s infinite ease-in-out both;
}
.chat-msg--typing .typing-dots span:nth-child(1) { animation-delay: 0s; }
.chat-msg--typing .typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.chat-msg--typing .typing-dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat message formatting */
.chat-msg--bot strong { font-weight: 600; }
.chat-msg--bot ul, .chat-msg--bot ol {
  margin: var(--space-2) 0;
  padding-left: var(--space-5);
}
.chat-msg--bot li {
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
}

.chat-panel__input {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .chat-panel__input {
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  }
}
.chat-panel__input input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-size: var(--text-sm);
  outline: none;
}
.chat-panel__input input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.chat-panel__input button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-interactive);
}
.chat-panel__input button:hover { background: var(--color-primary-hover); }

/* ===== UTILITY ===== */
.no-data {
  text-align: center;
  padding: var(--space-12);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ===== LENS DETAIL MODAL ===== */
.lens-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.lens-modal--active {
  pointer-events: auto;
  opacity: 1;
}
.lens-modal__overlay {
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.5);
}
.lens-modal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 100%;
  max-height: 100dvh;
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}
.lens-modal--active .lens-modal__panel {
  transform: translateX(0);
}
.lens-modal__close {
  position: sticky;
  top: var(--space-3);
  float: right;
  margin: var(--space-3) var(--space-3) 0 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: var(--color-text-muted);
  transition: background var(--transition-interactive);
}
.lens-modal__close:hover { background: var(--color-surface-offset); color: var(--color-text); }
.lens-modal__body {
  padding: var(--space-6);
  padding-top: var(--space-2);
  clear: both;
}
.lens-modal__brand-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.lens-modal__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}
.lens-modal__tech {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.lens-modal__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}
.lens-modal__features {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-5);
}
.lens-modal__features li {
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  padding-left: var(--space-5);
  position: relative;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-divider);
}
.lens-modal__features li:last-child { border-bottom: none; }
.lens-modal__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.6;
}
.lens-modal__prices {
  margin-bottom: var(--space-5);
}
.lens-modal__prices-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.lens-modal__prices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}
.lens-modal__price-item {
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
}
.lens-modal__price-idx {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: block;
}
.lens-modal__price-val {
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: block;
}
.lens-modal__section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-2);
  margin-top: var(--space-4);
  color: var(--color-text);
}
.lens-modal__pubs {
  list-style: none;
  padding: 0;
}
.lens-modal__pubs li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}
.lens-modal__pubs li:last-child { border-bottom: none; }
.lens-modal__pubs a {
  color: var(--color-primary);
  text-decoration: none;
}
.lens-modal__pubs a:hover { text-decoration: underline; }

/* Clickable lens row in tables */
.data-table tbody tr.clickable-row { cursor: pointer; }
.data-table tbody tr.clickable-row:hover {
  background: var(--color-primary-highlight);
}

/* ===== COATINGS SECTION ===== */
.coatings-overview {
  margin-bottom: var(--space-8);
}
.coatings-overview__card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.coatings-overview__card strong { color: var(--color-text); }
.coatings-overview__layers {
  margin-top: var(--space-4);
  width: 100%;
  font-size: var(--text-xs);
}
.coatings-overview__layers th {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-divider);
}
.coatings-overview__layers td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.coatings-brand-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.coating-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow var(--transition-interactive);
}
.coating-card:hover { box-shadow: var(--shadow-sm); }
.coating-card__name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--color-text);
}
.coating-card__tier {
  display: inline-flex;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: var(--space-2);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.coating-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}
.coating-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.coating-card__feature {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}
.coating-card__feature--yes {
  background: var(--color-success-highlight);
  color: var(--color-success);
}
.coating-card__feature--no {
  background: var(--color-surface-offset);
  color: var(--color-text-faint);
}

/* Segment badge for accessible premium */
.segment--premium-accessible {
  background: color-mix(in oklch, #16A34A 12%, var(--color-surface));
  color: #16A34A;
}

/* ===== COMPARISON RESEARCH METRICS ===== */
.comparison-research {
  margin-top: var(--space-8);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.comparison-research__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.comparison-research__note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  background: var(--color-primary-highlight);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  line-height: 1.5;
}
.metric-bars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.metric-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.metric-bar__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
}
.metric-bar__track {
  height: 24px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}
.metric-bar__fill {
  height: 100%;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  padding-left: var(--space-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-inverse);
  white-space: nowrap;
  min-width: fit-content;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.metric-bar__fill--primary { background: var(--color-primary); }
.metric-bar__fill--success { background: var(--color-success); }
.metric-bar__fill--warning { background: var(--color-warning); }

.research-links {
  list-style: none;
  padding: 0;
}
.research-links li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  line-height: 1.5;
}
.research-links li:last-child { border-bottom: none; }
.research-links a {
  color: var(--color-primary);
  text-decoration: none;
}
.research-links a:hover { text-decoration: underline; }

/* Category description */
.category-desc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.category-desc strong {
  color: var(--color-text);
}

/* ===== SCORING UI ===== */
:root {
  --score-high: #22c55e;
  --score-mid: #eab308;
  --score-low: #f97316;
}

.scoring-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  flex: 1;
}

.filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.filter-group input[type="range"] {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
  height: 18px;
  margin: 0;
}

.filter-group .filter-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.filter-reset {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 600;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  align-self: center;
  transition: background var(--transition-interactive), color var(--transition-interactive);
}

.filter-reset:hover {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.score-badge--high {
  background: var(--score-high);
}

.score-badge--mid {
  background: var(--score-mid);
}

.score-badge--low {
  background: var(--score-low);
}

.score-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
}

.score-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.score-bar__label {
  font-size: 11px;
  color: var(--color-text-muted);
  min-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-bar__track {
  flex: 1;
  height: 8px;
  background: var(--color-surface-offset);
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}

.score-bar__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-bar__fill--high {
  background: var(--score-high);
}

.score-bar__fill--mid {
  background: var(--score-mid);
}

.score-bar__fill--low {
  background: var(--score-low);
}

.score-bar__value {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  min-width: 24px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.personalization-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: var(--space-2);
}

.personalization-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}

.personalization-dot--active {
  background: var(--color-primary);
}

.tier-card__score-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.tier-card__score-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.tier-card__score-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.tier-card.scoring-hidden {
  display: none;
}

.table-row-hidden {
  display: none;
}

.comp-card__comfort {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.comp-card__comfort-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.comp-card__comfort-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ===== METHODOLOGY LINK ===== */
.methodology-link {
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-decoration: none;
  margin-left: var(--space-2);
  opacity: 0.7;
  transition: opacity 0.15s ease;
}
.methodology-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ===== COMFORT BADGE IN TABLES ===== */
.comfort-cell {
  text-align: center;
  vertical-align: middle;
}

.comfort-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  padding: 0 var(--space-2);
  font-variant-numeric: tabular-nums;
}

.comfort-badge--high {
  background: var(--score-high);
}

.comfort-badge--mid {
  background: var(--score-mid);
}

.comfort-badge--low {
  background: var(--score-low);
}

/* ===== METHODOLOGY SECTION ===== */
.methodology-block {
  margin-bottom: var(--space-8);
}

.methodology-block__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.methodology-block__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  max-width: 72ch;
}

.methodology-formula {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  overflow-x: auto;
}

.methodology-formula__eq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text);
}

.methodology-formula__result {
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--text-base);
}

.methodology-formula__term {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-3);
  white-space: nowrap;
}

.methodology-formula__term strong {
  color: var(--color-primary);
}

/* Methodology parameter cards grid */
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.methodology-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.methodology-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.methodology-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.methodology-card__weight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0 var(--space-2);
}

.methodology-card__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.methodology-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.methodology-card__criteria {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3);
}

.methodology-card__criteria li {
  font-size: var(--text-xs);
  color: var(--color-text);
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--color-divider);
  font-variant-numeric: tabular-nums;
}

.methodology-card__criteria li:last-child {
  border-bottom: none;
}

.methodology-card__sources {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.methodology-card__source {
  font-size: 10px;
  color: var(--color-primary);
  text-decoration: none;
  padding: 2px var(--space-2);
  background: rgba(162, 35, 142, 0.08);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.methodology-card__source:hover {
  background: rgba(162, 35, 142, 0.15);
}

/* Methodology levels */
.methodology-levels {
  margin-bottom: var(--space-8);
}

.methodology-levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.methodology-level-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.methodology-level-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.methodology-level-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-text);
  color: var(--color-bg);
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
}

.methodology-level-card__name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.methodology-level-card__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.methodology-level-card__row {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.methodology-level-card__row strong {
  color: var(--color-text);
}

/* Methodology sources */
.methodology-sources {
  margin-bottom: var(--space-4);
}

.methodology-sources-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.methodology-source-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.methodology-source-link:hover {
  background: rgba(162, 35, 142, 0.06);
  border-color: var(--color-primary);
}

.methodology-source-link svg {
  flex-shrink: 0;
  opacity: 0.6;
}

@media (max-width: 640px) {
  .methodology-formula__eq {
    font-size: var(--text-xs);
  }
  .methodology-grid {
    grid-template-columns: 1fr;
  }
  .methodology-levels-grid {
    grid-template-columns: 1fr;
  }
}
