/* ==========================================================================
   Emundia.si – Floating Liquid Glass Layouts (Mobile-First)
   ========================================================================== */

/* Floating Frosted Glass Header (Scrolling Content Visibly Blurs Beneath) */
.site-header {
  position: sticky;
  top: var(--space-2);
  z-index: var(--z-header);
  padding-inline: var(--space-3);
  pointer-events: none;
}

@media (min-width: 768px) {
  .site-header {
    top: var(--space-3);
    padding-inline: var(--space-6);
  }
}

.site-header__inner {
  pointer-events: auto;
  min-height: 3.85rem;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 0.35rem var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--shadow-md), var(--glass-highlight);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

@media (min-width: 768px) {
  .site-header__inner {
    padding-inline: var(--space-4);
    gap: var(--space-3);
  }
}

.site-header.is-scrolled .site-header__inner {
  box-shadow: var(--shadow-lg), var(--shadow-glow), var(--glass-highlight);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-gradient);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.brand__tld {
  color: var(--accent-primary);
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

.nav-link {
  padding: 0.42rem 0.72rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--dur-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--glass-bg-subtle);
  border-color: var(--glass-border);
}

.nav-link.is-active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(139, 92, 246, 0.2));
  border-color: rgba(125, 211, 252, 0.52);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.search-trigger-pill {
  display: none;
  align-items: center;
  gap: var(--space-2);
  height: 34px;
  padding: 0 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.25s var(--ease-out),
    background 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    color 0.2s ease;
}

.search-trigger-pill:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(56, 189, 248, 0.75);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

[data-theme="light"] .search-trigger-pill:hover {
  border-color: rgba(14, 165, 233, 0.75);
  background: rgba(14, 165, 233, 0.1);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.22);
  color: var(--text-primary);
}

.kbd {
  display: none;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: inline-flex;
  }

  .mobile-menu-btn {
    display: none;
  }
}

@media (min-width: 1180px) {
  .nav-link {
    padding: 0.45rem 0.85rem;
    font-size: var(--text-sm);
  }

  .search-trigger-pill {
    display: inline-flex;
  }

  .mobile-search-btn {
    display: none;
  }
}

@media (min-width: 1260px) {
  .kbd {
    display: inline-flex;
  }
}

/* Main Content Wrapper */
.site-main {
  padding-top: var(--space-6);
  padding-bottom: var(--space-16);
  min-height: calc(100dvh - var(--header-height) - 240px);
}

@media (min-width: 768px) {
  .site-main {
    padding-top: var(--space-8);
  }
}

/* Section Headers */
.section {
  margin-bottom: var(--space-12);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

@media (min-width: 640px) {
  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: var(--space-1);
}

.section-head__title {
  font-size: var(--text-2xl);
}

.section-head__subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

/* Hero Bento Layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
  }
}

.hero-card {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .hero-card {
    padding: var(--space-8);
  }
}

.hero-card__title {
  font-size: var(--text-4xl);
  line-height: 1.08;
  margin-top: var(--space-3);
}

.hero-card__lead {
  color: var(--text-secondary);
  font-size: var(--text-base);
  max-width: 54ch;
  margin-top: var(--space-4);
}

.hero-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--shadow-sm), var(--glass-highlight);
}

.hero-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.55rem var(--space-3);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.hero-search__input:focus {
  outline: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.hero-stats > div {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
}

.hero-stat__num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
}

.hero-stat__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Horizontal Scrollable Pills Rail */
.chips-rail {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  overflow-x: auto;
  padding: 4px 2px var(--space-3);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips-rail::-webkit-scrollbar {
  display: none;
}

/* Filter Toolbar */
.filter-bar {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .filter-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

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

/* Responsive Grids */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .reviews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (min-width: 640px) {
  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.category-tile {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.category-tile--has-media {
  padding: 0;
}

.category-tile__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
}

.category-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ease-out);
}

@media (hover: hover) {
  .category-tile:hover .category-tile__media img {
    transform: scale(1.05);
  }
}

.category-tile__content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-3);
}

.category-hero__banner {
  margin-top: var(--space-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  aspect-ratio: 16 / 9;
  max-height: 360px;
  width: 100%;
}

.category-hero__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.category-tile__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(125, 211, 252, 0.5);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-tile__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.category-tile__subs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: var(--space-2);
}

/* Category Hero Banner */
.category-hero {
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .category-hero {
    padding: var(--space-8);
  }
}

.category-hero__seo-pill {
  align-self: flex-start;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  word-break: break-all;
}

/* Article / Review Detail Layout */
/* Spacing rule: every top-level block inside <main> is separated by
   --space-12 (.section, .article-layout, .lead-section wrapper).
   Inside a block, siblings use --space-6 (cards/panels) or --space-4 (tight). */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
  margin-bottom: var(--space-12);
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
}

.article-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.article-header {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .article-header {
    padding: var(--space-8);
  }
}

.article-header__title {
  font-size: var(--text-3xl);
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--glass-border);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Verdict Box */
.verdict-card {
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .verdict-card {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
}

.verdict-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .verdict-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Pros & Cons */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .pros-cons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pros-box,
.cons-box {
  padding: var(--space-5);
}

.pros-box__title {
  color: var(--score-high);
  margin-bottom: var(--space-3);
  font-size: var(--text-base);
}

.cons-box__title {
  color: var(--danger);
  margin-bottom: var(--space-3);
  font-size: var(--text-base);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

/* Prose Article Content */
.article-prose {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .article-prose {
    padding: var(--space-8);
  }
}

.article-prose h2 {
  font-size: var(--text-xl);
  scroll-margin-top: calc(var(--header-height) + var(--space-5));
  padding-top: var(--space-2);
}

.article-prose h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-3);
  color: var(--text-primary);
}

.article-prose p {
  color: var(--text-secondary);
  line-height: 1.75;
}

.article-prose a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.article-prose a:hover {
  filter: brightness(1.15);
}

.article-prose ul,
.article-prose ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-left: var(--space-5);
  color: var(--text-secondary);
}

.article-prose ul {
  list-style: disc;
}

.article-prose ol {
  list-style: decimal;
}

.article-prose li {
  line-height: 1.7;
}

.article-prose strong {
  color: var(--text-primary);
}

.callout-glass {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--glass-highlight);
  /* Block flow (not flex) so inline <strong>/<code>/text inside a callout stay in one line */
  display: block;
}

.callout-glass > * + * {
  margin-top: var(--space-3);
}

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

.faq-item {
  border-radius: var(--radius-md);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

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

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--accent-primary);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item__body {
  padding: 0 var(--space-5) var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.75;
}

/* ==========================================================
   Data tables (specs-table / compare-table)
   - Key/value tables (no <thead>)  → .specs-table
   - Data matrices (with <thead>)   → .specs-table / .compare-table
   - Enhanced by js/site.js (initTables): wrapper, filter, sort,
     column highlight, copy, scroll shadows, mobile card layout
   ========================================================== */
.specs-table,
.compare-table {
  --tbl-line: color-mix(in srgb, var(--text-primary) 12%, transparent);
  --tbl-zebra: color-mix(in srgb, var(--text-primary) 4%, transparent);
  --tbl-hover: color-mix(in srgb, var(--accent-primary) 10%, transparent);
  --tbl-head: color-mix(in srgb, var(--accent-primary) 16%, transparent);
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-primary);
}

.specs-table th,
.specs-table td,
.compare-table th,
.compare-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--tbl-line);
  transition: background-color var(--dur-fast);
}

.specs-table tbody tr:last-child > *,
.compare-table tbody tr:last-child > * {
  border-bottom: none;
}

/* Header row */
.specs-table thead th,
.compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--tbl-head);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-primary) 55%, transparent);
}

/* Body cells (data matrices) */
.specs-table tbody td,
.compare-table tbody td {
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

.specs-table tbody td:first-child,
.compare-table tbody td:first-child,
.specs-table tbody th,
.compare-table tbody th {
  color: var(--text-primary);
}

.specs-table tbody td:first-child strong,
.compare-table tbody td:first-child strong {
  font-weight: 700;
}

@media (min-width: 641px) {
  .specs-table:has(thead) tbody td:first-child,
  .compare-table tbody td:first-child {
    min-width: 11.5rem;
  }
}

/* Key/value spec tables: label | value */
.specs-table:not(:has(thead)) {
  table-layout: fixed;
}

.specs-table tbody th {
  width: 38%;
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--text-sm);
}

.specs-table:not(:has(thead)) td {
  color: var(--text-primary);
  font-weight: 500;
}

/* Zebra + hover */
.specs-table tbody tr:nth-child(even) > *,
.compare-table tbody tr:nth-child(even) > * {
  background: var(--tbl-zebra);
}

@media (hover: hover) {
  .specs-table tbody tr:hover > *,
  .compare-table tbody tr:hover > * {
    background: var(--tbl-hover);
  }
}

.specs-table tbody tr.is-selected > *,
.compare-table tbody tr.is-selected > * {
  background: color-mix(in srgb, var(--accent-primary) 22%, transparent);
  box-shadow: inset 0 0 0 0 transparent;
}

.specs-table tbody tr.is-selected > :first-child,
.compare-table tbody tr.is-selected > :first-child {
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

/* Column highlight (set by JS on hover/focus) */
.specs-table .col-hl,
.compare-table .col-hl {
  background: var(--tbl-hover) !important;
}

/* Sortable headers */
.specs-table th[aria-sort],
.compare-table th[aria-sort] {
  cursor: pointer;
  user-select: none;
}

.specs-table th[aria-sort]::after {
  content: '↕';
  margin-left: 0.4em;
  opacity: 0.4;
  font-size: 0.95em;
}

.specs-table th[aria-sort='ascending']::after {
  content: '↑';
  opacity: 1;
  color: var(--accent-primary);
}

.specs-table th[aria-sort='descending']::after {
  content: '↓';
  opacity: 1;
  color: var(--accent-primary);
}

.specs-table th[aria-sort]:hover {
  color: var(--accent-primary);
}

.specs-table th[aria-sort]:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
}

/* Wrapper (added by JS) */
.table-wrap {
  position: relative;
  margin: var(--space-4) 0;
  border: 1px solid var(--tbl-wrap-line, color-mix(in srgb, var(--text-primary) 16%, transparent));
  border-radius: var(--radius-md);
  background: var(--glass-bg-subtle);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid color-mix(in srgb, var(--text-primary) 12%, transparent);
}

.table-toolbar__search {
  position: relative;
  flex: 1 1 200px;
  min-width: 0;
}

.table-toolbar__search input {
  width: 100%;
  padding: 0.5rem 0.8rem 0.5rem 2.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--text-primary) 18%, transparent);
  background: color-mix(in srgb, var(--text-primary) 5%, transparent);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--text-xs);
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.table-toolbar__search input::placeholder {
  color: var(--text-muted);
}

.table-toolbar__search input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 25%, transparent);
}

.table-toolbar__search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.table-toolbar__count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

.table-toolbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--text-primary) 18%, transparent);
  background: color-mix(in srgb, var(--text-primary) 5%, transparent);
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.table-toolbar__btn:hover,
.table-toolbar__btn:focus-visible {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  outline: none;
}

.table-toolbar__btn[hidden] {
  display: none;
}

.table-scroll {
  position: relative;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
}

.table-wrap .specs-table,
.table-wrap .compare-table {
  min-width: 560px;
}

.table-wrap .specs-table:not(:has(thead)) {
  min-width: 0;
}

/* Scroll shadows */
.table-wrap::before,
.table-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.table-wrap::before {
  left: 0;
  background: linear-gradient(90deg, rgba(4, 7, 19, 0.35), transparent);
}

.table-wrap::after {
  right: 0;
  background: linear-gradient(270deg, rgba(4, 7, 19, 0.35), transparent);
}

.table-wrap.has-scroll-left::before,
.table-wrap.has-scroll-right::after {
  opacity: 1;
}

.table-empty {
  padding: var(--space-5);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.table-empty[hidden] {
  display: none;
}

/* Mobile: stacked "cards" for data matrices */
@media (max-width: 640px) {
  .table-wrap .specs-table:has(thead),
  .table-wrap .compare-table {
    min-width: 0;
  }

  .table-wrap table:has(thead) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .table-wrap table:has(thead),
  .table-wrap table:has(thead) tbody,
  .table-wrap table:has(thead) tr,
  .table-wrap table:has(thead) td {
    display: block;
    width: 100%;
  }

  .table-wrap table:has(thead) tbody tr {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--tbl-line);
  }

  .table-wrap table:has(thead) tbody tr:last-child {
    border-bottom: none;
  }

  .table-wrap table:has(thead) tbody tr > * {
    background: transparent !important;
    border: none;
    padding: 0.35rem 0;
  }

  .table-wrap table:has(thead) tbody td:first-child {
    font-family: var(--font-display);
    font-size: var(--text-base);
    padding-bottom: 0.5rem;
  }

  .table-wrap table:has(thead) tbody td:not(:first-child) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .table-wrap table:has(thead) tbody td:not(:first-child)::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-top: 0.12rem;
  }

  .table-wrap::before,
  .table-wrap::after {
    display: none;
  }

  .specs-table tbody th {
    width: 42%;
  }
}

@media print {
  .table-toolbar {
    display: none;
  }
}

/* Article Sidebar */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .article-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
    /* Tall sidebars (TOC + reviews + CTA) scroll inside the viewport instead of being clipped */
    max-height: calc(100dvh - var(--header-height) - var(--space-8));
    overflow-y: auto;
    scrollbar-width: thin;
    overscroll-behavior: contain;
  }
}

.article-sidebar > * { flex-shrink: 0; }

/* Sidebar: list of brand reviews */
.sidebar-reviews { padding: var(--space-5); }
.sidebar-reviews__list { margin-top: var(--space-3); display: flex; flex-direction: column; gap: 0.25rem; }
/* Tier groups (collapsible) */
.sidebar-reviews__group { margin-top: var(--space-2); border-top: 1px solid color-mix(in srgb, var(--text-primary) 10%, transparent); padding-top: var(--space-2); }
.sidebar-reviews__group:first-of-type { margin-top: var(--space-3); }
.sidebar-reviews__group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 0.35rem 0.5rem; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 700; color: var(--text-primary);
}
.sidebar-reviews__group > summary::-webkit-details-marker { display: none; }
.sidebar-reviews__group > summary::after { content: "▸"; margin-left: var(--space-2); color: var(--text-muted); transition: transform var(--dur-fast); }
.sidebar-reviews__group[open] > summary::after { transform: rotate(90deg); }
.sidebar-reviews__group > summary:hover { background: var(--glass-bg-subtle); }
.sidebar-reviews__group > summary > span:first-child { flex: 1; }
.sidebar-reviews__count { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }
.sidebar-reviews__group .sidebar-reviews__list { margin-top: var(--space-1); }
.sidebar-review {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0.4rem 0.5rem; border-radius: var(--radius-sm);
  color: var(--text-primary); border-left: 2px solid transparent;
  transition: all var(--dur-fast);
}
.sidebar-review:hover { background: var(--glass-bg-subtle); border-left-color: var(--accent-primary); }
.sidebar-review[aria-current="page"] { background: var(--glass-bg-subtle); border-left-color: var(--accent-primary); pointer-events: none; }
.sidebar-review__logo {
  flex: 0 0 54px; height: 30px; padding: 4px 6px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 8px;
  font-size: 0.65rem; font-weight: 800; color: #0f172a; text-align: center; line-height: 1;
}
.sidebar-review__logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.sidebar-review__name { flex: 1; min-width: 0; font-size: var(--text-sm); font-weight: 600; line-height: 1.25; }
.sidebar-review__score {
  flex: 0 0 auto; font-size: var(--text-xs); font-weight: 700;
  padding: 0.15rem 0.45rem; border-radius: 999px;
  color: var(--score-high); border: 1px solid color-mix(in srgb, var(--score-high) 40%, transparent);
}

.toc-card {
  padding: var(--space-5);
}

.toc-list {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toc-link {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  transition: all var(--dur-fast);
}

.toc-link:hover {
  color: var(--accent-primary);
  background: var(--glass-bg-subtle);
  border-left-color: var(--accent-primary);
}

/* Compare table: see "Data tables" block above. */
.compare-scroll {
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

/* Newsletter Glass Banner */
.newsletter-banner {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .newsletter-banner {
    padding: var(--space-8);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

@media (min-width: 520px) {
  .newsletter-form {
    flex-direction: row;
    max-width: 440px;
  }
}

.newsletter-form .glass-input {
  flex: 1;
}

/* Floating Translucent Glass Footer */
.site-footer {
  border-top: 1px solid var(--glass-border-strong);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28);
  padding: var(--space-10) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

@media (min-width: 960px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
  }
}

@media (min-width: 640px) and (max-width: 959px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  padding-top: var(--space-5);
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ==========================================================
   Blog articles (imported WordPress posts)
   ========================================================== */
.article-hero {
  padding: 0;
  overflow: hidden;
}

.article-hero img,
.article-prose .article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.article-hero img {
  border-radius: 0;
  max-height: 460px;
  object-fit: cover;
}

.article-prose .article-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.article-prose .article-figure figcaption {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

.article-prose h4 {
  font-size: var(--text-base);
  color: var(--text-primary);
}

.article-prose blockquote {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-strong);
  border-left: 3px solid var(--accent-primary);
  box-shadow: var(--glass-highlight);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.article-prose blockquote .callout-title {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
}

.article-prose .article-table {
  overflow-x: auto;
}

.article-prose .wp-block-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .article-prose .wp-block-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.article-prose hr {
  border: 0;
  border-top: 1px solid var(--glass-border);
  width: 100%;
}

/* Compact header on small phones: keep everything inside the viewport */
@media (max-width: 480px) {
  .site-header__inner { gap: 6px; padding-inline: 10px; }
  .header-actions { gap: 0.25rem; }
  .header-actions .icon-btn { width: 36px; height: 36px; }
  .header-cta-btn { padding-inline: 0.8rem; }
  .brand { gap: 0.4rem; font-size: 1.02rem; }
}

@media (max-width: 359px) {
  .brand > span:not(.brand__mark) { display: none; }
}