/*
Theme Name: Apex Review
Theme URI: https://apexwolf.co
Author: WOLF-OPS
Author URI: https://apexwolf.co
Description: Premium dark review theme for affiliate sites. Content-first, mobile-first, built for speed. Features scroll-driven animations, container queries, native CSS nesting, and view transitions.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apex-review
Tags: dark, review, affiliate, one-column, custom-colors, custom-logo, featured-images, full-width-template, threaded-comments, translation-ready
*/

/* ==========================================================================
   0. VIEW TRANSITIONS
   ========================================================================== */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 200ms ease-out both fade-out;
}
::view-transition-new(root) {
  animation: 300ms ease-in both fade-in;
}

@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* ==========================================================================
   1. CUSTOM PROPERTIES
   ========================================================================== */

:root {
  /* Base palette */
  --bg: #0D0D14;
  --surface: #141420;
  --surface-hover: #1a1a2e;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  /* Text */
  --text: #F0F0F5;
  --text-secondary: #8888AA;
  --text-muted: #555577;

  /* Accent — override per site */
  --accent: #E8722A;
  --accent-rgb: 232, 114, 42;
  --accent-light: #f0935a;
  --accent-dark: #c45e1e;
  --accent-gradient: linear-gradient(135deg, var(--accent), var(--accent-light));

  /* Semantic */
  --pro: #2ECC71;
  --pro-bg: rgba(46, 204, 113, 0.08);
  --con: #E74C3C;
  --con-bg: rgba(231, 76, 60, 0.08);
  --warning: #F39C12;
  --info: #3498DB;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;
  --fs-4xl: 2.5rem;
  --lh-tight: 1.2;
  --lh-base: 1.75;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --content-width: 780px;
  --wide-width: 1100px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 4px 20px rgba(var(--accent-rgb), 0.2);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Header */
  --header-height: 64px;

  color-scheme: dark;
}

/* Light mode overrides */
:root[data-theme="light"] {
  --bg: #F5F5FA;
  --surface: #FFFFFF;
  --surface-hover: #EDEDF5;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --text: #1a1a2e;
  --text-secondary: #555577;
  --text-muted: #8888AA;
  --pro-bg: rgba(46, 204, 113, 0.1);
  --con-bg: rgba(231, 76, 60, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

  color-scheme: light;
}

/* ==========================================================================
   2. RESET / NORMALIZE
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-xl));
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);

  &:hover {
    color: var(--accent-light);
  }
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--text);
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1 { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-2xl); font-weight: 700; }
h4 { font-size: var(--fs-xl); font-weight: 600; }
h5 { font-size: var(--fs-lg); font-weight: 600; }
h6 { font-size: var(--fs-base); font-weight: 600; }

@media (max-width: 768px) {
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-xl); }
}

p {
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

.label {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  margin-bottom: var(--space-xl);
}

blockquote {
  border-left: 4px solid var(--accent);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-xl) 0;
  background: var(--surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  padding-top: var(--header-height);
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--wide {
  max-width: var(--wide-width);
}

/* ==========================================================================
   5. HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(13, 13, 20, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: transform var(--duration-base) var(--ease-out);

  &.header--hidden {
    transform: translateY(-100%);
  }

  & .header-inner {
    max-width: var(--wide-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  & .site-branding {
    display: flex;
    align-items: center;
    gap: var(--space-sm);

    & .site-logo {
      height: 32px;
      width: auto;
    }

    & .site-title {
      font-size: var(--fs-lg);
      font-weight: 800;
      color: var(--text);
      letter-spacing: -0.01em;
      view-transition-name: site-title;

      & span {
        color: var(--accent);
      }
    }
  }

  & .header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }
}

:root[data-theme="light"] .site-header {
  background: rgba(245, 245, 250, 0.85);
}

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--duration-fast), background var(--duration-fast);

  &:hover {
    color: var(--text);
    background: var(--surface-hover);
  }

  & .icon-sun { display: none; }
  & .icon-moon { display: block; }
}

:root[data-theme="light"] .theme-toggle {
  & .icon-sun { display: block; }
  & .icon-moon { display: none; }
}

/* Primary navigation */
.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);

  & a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color var(--duration-fast), background var(--duration-fast);

    &:hover,
    &[aria-current="page"] {
      color: var(--text);
      background: var(--surface-hover);
    }
  }
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);

  & span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: background var(--duration-fast);

    &::before,
    &::after {
      content: '';
      position: absolute;
      left: 0;
      width: 100%;
      height: 2px;
      background: currentColor;
      transition: transform var(--duration-base) var(--ease-out);
    }
    &::before { top: -6px; }
    &::after { top: 6px; }
  }

  &[aria-expanded="true"] span {
    background: transparent;
    &::before { transform: rotate(45deg) translate(4px, 4px); }
    &::after { transform: rotate(-45deg) translate(4px, -4px); }
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .primary-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg);
    border-top: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--duration-base) var(--ease-out);
    gap: 0;
    overflow-y: auto;
    z-index: 999;

    &.nav--open {
      transform: translateX(0);
    }

    & a {
      font-size: var(--fs-lg);
      padding: var(--space-lg) var(--space-lg);
      border-bottom: 1px solid var(--border);
      color: var(--text);
      font-weight: 600;

      &:last-child {
        border-bottom: none;
      }

      &:hover,
      &[aria-current="page"] {
        color: var(--accent);
        background: rgba(var(--accent-rgb), 0.08);
      }
    }
  }
}

/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */

.hero {
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;

  &::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08) 0%, transparent 70%);
    pointer-events: none;
  }

  & .hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
    letter-spacing: -0.03em;

    & span { color: var(--accent); }
  }

  & .hero-tagline {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto;
  }
}

/* ==========================================================================
   7. POST GRID
   ========================================================================== */

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;

  /* Scroll-driven animation: cards fade+slide in */
  & > * {
    animation: slide-up var(--duration-slow) var(--ease-out) both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

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

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
    /* Subgrid: cards align internal elements */
    & .post-card {
      display: grid;
      grid-template-rows: subgrid;
      grid-row: span 4; /* image, category, title, meta */
    }
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Post card */
.post-card {
  container-type: inline-size;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base);

  &:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
  }

  & .post-card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;

    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform var(--duration-slow) var(--ease-out);
    }
  }

  &:hover .post-card-image img {
    transform: scale(1.04);
  }

  & .post-card-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  & .post-card-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    line-height: 1.3;

    & a {
      color: var(--text);
      &:hover { color: var(--accent); }
    }
  }

  & .post-card-excerpt {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
  }

  & .post-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
  }
}

/* Category badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  border-radius: var(--radius-full);
  width: fit-content;
}

/* Category badge on image */
.post-card-image .category-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 2;
  background: rgba(var(--accent-rgb), 0.9);
  color: #fff;
  backdrop-filter: blur(4px);
}

/* ==========================================================================
   8. ARTICLE / SINGLE POST
   ========================================================================== */

.article-header {
  padding: var(--space-2xl) 0 var(--space-xl);
  view-transition-name: article-header;

  & .article-category {
    margin-bottom: var(--space-md);
  }

  & .article-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
    max-width: 700px;
  }

  & .article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--fs-sm);
    color: var(--text-muted);

    & .meta-divider {
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: var(--text-muted);
    }

    & .meta-updated {
      color: var(--accent);
      font-weight: 500;
    }
  }
}

.article-featured-image {
  margin-bottom: var(--space-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);

  & img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}

.article-content {
  /* Article typography */
  & h2 {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
  }

  & h3 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
  }

  & p { margin-bottom: var(--space-lg); }

  & ul, & ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
  }

  & ul { list-style: disc; }
  & ol { list-style: decimal; }

  & li {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    &::marker { color: var(--accent); }
  }

  & img {
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
    border: 1px solid var(--border);
  }

  & a {
    text-decoration: underline;
    text-underline-offset: 2px;
    &:hover { text-decoration-color: var(--accent); }
  }

  & table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    font-size: var(--fs-sm);

    & th, & td {
      padding: var(--space-md);
      text-align: left;
      border-bottom: 1px solid var(--border);
    }

    & th {
      font-weight: 600;
      color: var(--text);
      background: var(--surface);
    }

    & td { color: var(--text-secondary); }
  }

  /* Style article differently if it has a comparison table */
  &:has(.comparison-table) {
    max-width: var(--wide-width);
  }
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  padding: var(--space-lg) 0;

  & a {
    color: var(--text-muted);
    &:hover { color: var(--accent); }
  }

  & .breadcrumb-sep {
    font-size: 0.65em;
    opacity: 0.5;
  }
}

/* ==========================================================================
   9. REVIEW CARD (Product Review Block)
   ========================================================================== */

.review-card {
  container-type: inline-size;
  background: var(--surface);
  background-image: linear-gradient(135deg, var(--surface) 0%, rgba(var(--accent-rgb), 0.02) 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;

  /* Scroll-driven entrance */
  animation: slide-up var(--duration-slow) var(--ease-out) both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;

  /* :has() — card with award gets glow */
  &:has(.award-badge) {
    box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.4);
  }

  & .review-card-inner {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
  }

  /* Product image */
  & .review-card-image {
    flex-shrink: 0;
    width: 180px;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);

    & img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      padding: var(--space-sm);
    }
  }

  & .review-card-content {
    flex: 1;
    min-width: 0;
  }

  /* Award badge */
  & .award-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 5px 12px;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-accent);
    /* Anchor positioning for modern browsers */
    anchor-name: --award;
  }

  /* Product name */
  & .product-name {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
  }

  /* Price badge */
  & .price-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
  }

  /* Container query: stack on narrow containers */
  @container (max-width: 500px) {
    & .review-card-inner {
      flex-direction: column;
    }

    & .review-card-image {
      width: 100%;
      aspect-ratio: 16 / 10;
    }

    & .review-card-image img {
      object-fit: cover;
      padding: 0;
    }

    & .award-badge {
      top: var(--space-sm);
      right: var(--space-sm);
    }
  }
}

/* ==========================================================================
   10. RATING BARS
   ========================================================================== */

.rating-section {
  margin: var(--space-lg) 0;
}

.rating-overall {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);

  & .rating-score-big {
    font-size: var(--fs-3xl);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    min-width: 52px;
    text-align: center;
  }

  & .rating-bar-wrap {
    flex: 1;
  }
}

.rating-bar {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;

  & .rating-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    width: var(--score, 0%);

    /* Scroll-driven animation: fill on view */
    animation: fill-bar 600ms var(--ease-out) both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes fill-bar {
  from { width: 0; }
  to { width: var(--score, 0%); }
}

:root[data-theme="light"] .rating-bar {
  background: rgba(0, 0, 0, 0.08);
}

.sub-ratings {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);

  & .sub-rating {
    display: flex;
    align-items: center;
    gap: var(--space-md);

    & .sub-rating-label {
      font-size: var(--fs-sm);
      color: var(--text-secondary);
      min-width: 100px;
      flex-shrink: 0;
    }

    & .rating-bar {
      flex: 1;
      height: 4px;
    }

    & .sub-rating-score {
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--text);
      min-width: 30px;
      text-align: right;
    }
  }
}

/* Rating tooltip anchor positioning */
.rating-score-tooltip {
  anchor-name: --rating-score;
}

.rating-tooltip-popup {
  position: absolute;
  position-anchor: --rating-score;
  top: anchor(bottom);
  left: anchor(center);
  translate: -50% 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.rating-score-tooltip:hover + .rating-tooltip-popup {
  opacity: 1;
}

/* ==========================================================================
   11. PROS / CONS
   ========================================================================== */

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

@media (max-width: 600px) {
  .pros-cons { grid-template-columns: 1fr; }
}

@container (max-width: 500px) {
  .pros-cons { grid-template-columns: 1fr; }
}

.pros-list, .cons-list {
  border-radius: var(--radius-md);
  padding: var(--space-lg);

  & .pros-cons-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }

  & ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  & li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.5;

    &::before {
      flex-shrink: 0;
      margin-top: 2px;
    }
  }
}

.pros-list {
  background: var(--pro-bg);
  border-left: 3px solid var(--pro);

  & .pros-cons-title { color: var(--pro); }

  & li::before {
    content: '✓';
    color: var(--pro);
    font-weight: 700;
  }
}

.cons-list {
  background: var(--con-bg);
  border-left: 3px solid var(--con);

  & .pros-cons-title { color: var(--con); }

  & li::before {
    content: '✕';
    color: var(--con);
    font-weight: 700;
  }
}

/* ==========================================================================
   12. CTA BUTTONS
   ========================================================================== */

.cta-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: var(--space-xl) 0 var(--space-md);
}

@media (min-width: 768px) {
  .cta-row {
    flex-direction: row;
    gap: var(--space-md);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  font-size: var(--fs-base);
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background var(--duration-fast);
  text-decoration: none;
  min-width: 220px;
  text-align: center;

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

@media (max-width: 767px) {
  .btn {
    width: 100%;
    min-width: unset;
  }
}

.btn--primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);

  &:hover {
    box-shadow: 0 6px 25px rgba(var(--accent-rgb), 0.45);
    color: #fff;
  }
}

.btn--secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border-strong);

  &:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
  }
}

/* Copy link button */
.btn--copy-link {
  padding: 8px 14px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;

  &:hover {
    color: var(--text-secondary);
    border-color: var(--border-strong);
  }

  &.copied {
    color: var(--pro);
    border-color: var(--pro);
  }
}

/* ==========================================================================
   13. VERDICT BOX
   ========================================================================== */

.verdict-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  position: relative;

  &::before {
    content: '"';
    position: absolute;
    top: var(--space-md);
    left: var(--space-lg);
    font-size: 4rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.3;
    font-family: Georgia, serif;
  }

  & .verdict-text {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text);
    padding-left: var(--space-2xl);
    margin-bottom: var(--space-md);
    line-height: 1.6;
  }

  & .verdict-best-for {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    padding-left: var(--space-2xl);

    & strong {
      color: var(--accent);
    }
  }
}

/* ==========================================================================
   14. HOW WE TEST BOX
   ========================================================================== */

.how-we-test {
  background: rgba(var(--accent-rgb), 0.05);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-xl);
  margin: var(--space-2xl) 0;

  & .how-we-test-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-md);
  }

  & p {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    &:last-child { margin-bottom: 0; }
  }
}

/* ==========================================================================
   15. TABLE OF CONTENTS
   ========================================================================== */

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;

  & .toc-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;

    & .toc-toggle {
      font-size: var(--fs-xs);
      color: var(--text-muted);
      transition: transform var(--duration-fast);
    }
  }

  &.toc--collapsed .toc-list {
    display: none;
  }

  &.toc--collapsed .toc-toggle {
    transform: rotate(-90deg);
  }

  & .toc-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  & .toc-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: all var(--duration-fast);

    &:hover {
      color: var(--text);
      background: var(--surface-hover);
    }

    &.toc-active {
      color: var(--accent);
      border-left-color: var(--accent);
      background: rgba(var(--accent-rgb), 0.05);
    }
  }

  & .toc-link--sub {
    padding-left: calc(var(--space-md) + var(--space-lg));
    font-size: var(--fs-xs);
  }
}

/* Desktop sticky TOC sidebar */
@media (min-width: 1024px) {
  .article-with-toc {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: var(--space-2xl);
    max-width: calc(var(--content-width) + 220px + var(--space-2xl));
  }

  .toc--sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-xl));
    align-self: start;
    max-height: calc(100vh - var(--header-height) - var(--space-2xl));
    overflow-y: auto;
    margin: 0;

    &::-webkit-scrollbar { width: 3px; }
    &::-webkit-scrollbar-track { background: transparent; }
    &::-webkit-scrollbar-thumb {
      background: var(--border-strong);
      border-radius: var(--radius-full);
    }
  }
}

/* ==========================================================================
   16. COMPARISON TABLE
   ========================================================================== */

.comparison-table-wrap {
  overflow-x: auto;
  margin: var(--space-2xl) 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;

  /* Scroll-driven entrance */
  animation: slide-up var(--duration-slow) var(--ease-out) both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  white-space: nowrap;

  & thead {
    & th {
      padding: var(--space-md) var(--space-lg);
      font-weight: 600;
      text-align: left;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      color: var(--text-muted);
      font-size: var(--fs-xs);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      position: sticky;
      top: 0;
      z-index: 2;
    }
  }

  & tbody {
    & tr {
      border-bottom: 1px solid var(--border);
      transition: background var(--duration-fast);

      &:nth-child(even) {
        background: rgba(255, 255, 255, 0.015);
      }

      &:hover {
        background: var(--surface-hover);
      }

      &:last-child { border-bottom: none; }
    }

    & td {
      padding: var(--space-md) var(--space-lg);
      color: var(--text-secondary);
      vertical-align: middle;
    }

    /* Sticky first column */
    & td:first-child {
      position: sticky;
      left: 0;
      z-index: 1;
      background: var(--surface);
      font-weight: 600;
      color: var(--text);
      border-right: 1px solid var(--border);
    }
  }

  /* Product thumbnail */
  & .table-product-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 4px;
  }

  /* Inline score bar */
  & .table-score-bar {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);

    & .mini-bar {
      width: 60px;
      height: 4px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: var(--radius-full);
      overflow: hidden;

      & span {
        display: block;
        height: 100%;
        background: var(--accent-gradient);
        border-radius: var(--radius-full);
      }
    }
  }

  /* Badge chips */
  & .badge-chip {
    display: inline-flex;
    padding: 3px 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
  }

  & .badge-chip--gold {
    background: rgba(255, 193, 7, 0.12);
    color: #FFC107;
  }

  & .badge-chip--silver {
    background: rgba(192, 192, 192, 0.12);
    color: #C0C0C0;
  }

  /* Mini CTA */
  & .table-cta {
    display: inline-flex;
    padding: 6px 14px;
    font-size: var(--fs-xs);
    font-weight: 600;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: transform var(--duration-fast), box-shadow var(--duration-fast);

    &:hover {
      transform: translateY(-1px);
      box-shadow: var(--shadow-accent);
      color: #fff;
    }
  }

  /* Popover on thumbnails */
  & [popover] {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text);
    max-width: 280px;
    font-size: var(--fs-sm);

    &::backdrop {
      background: rgba(0, 0, 0, 0.4);
    }
  }

  & .popover-trigger {
    cursor: pointer;
    &:hover { opacity: 0.8; }
  }
}

:root[data-theme="light"] .comparison-table tbody td:first-child {
  background: #fff;
}

/* Container query for comparison table in narrow contexts */
.comparison-table-wrap {
  container-type: inline-size;
}

@container (max-width: 600px) {
  .comparison-table {
    font-size: var(--fs-xs);

    & thead th,
    & tbody td {
      padding: var(--space-sm) var(--space-md);
    }

    & .table-product-thumb {
      width: 40px;
      height: 40px;
    }
  }
}

/* ==========================================================================
   17. AUTHOR BIO
   ========================================================================== */

.author-bio {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: var(--space-3xl) 0 var(--space-xl);

  & .author-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-strong);
  }

  & .author-info {
    & .author-name {
      font-size: var(--fs-base);
      font-weight: 700;
      margin-bottom: var(--space-xs);
    }

    & .author-desc {
      font-size: var(--fs-sm);
      color: var(--text-secondary);
      line-height: 1.6;
      margin-bottom: 0;
    }
  }
}

@media (max-width: 480px) {
  .author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ==========================================================================
   18. RELATED POSTS
   ========================================================================== */

.related-posts {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--space-2xl);

  & .related-title {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-xl);
  }
}

/* ==========================================================================
   19. PAGINATION
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-2xl) 0;

  & a, & span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-md);
    font-size: var(--fs-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--duration-fast);
  }

  & a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
  }

  & .current {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
  }
}

/* ==========================================================================
   20. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);

  & .footer-inner {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center;
  }

  & .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md) var(--space-lg);

    & a {
      font-size: var(--fs-sm);
      color: var(--text-secondary);
      &:hover { color: var(--accent); }
    }
  }

  & .footer-disclosure {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.6;
  }

  & .footer-copyright {
    font-size: var(--fs-xs);
    color: var(--text-muted);
  }
}

/* ==========================================================================
   21. 404 PAGE
   ========================================================================== */

.error-404 {
  text-align: center;
  padding: var(--space-3xl) 0;

  & .error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.3;
    line-height: 1;
  }

  & .error-title {
    font-size: var(--fs-2xl);
    margin: var(--space-lg) 0 var(--space-md);
  }

  & .error-desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
  }
}

/* ==========================================================================
   22. ARCHIVE / CATEGORY PAGE
   ========================================================================== */

.archive-header {
  padding: var(--space-2xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);

  & .archive-title {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-sm);
  }

  & .archive-desc {
    color: var(--text-secondary);
    max-width: 540px;
  }
}

/* ==========================================================================
   23. BACK TO TOP + SCROLL PROGRESS
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out),
              background var(--duration-fast);
  box-shadow: var(--shadow-md);

  &.visible {
    opacity: 1;
    transform: translateY(0);
  }

  &:hover {
    background: var(--surface-hover);
    color: var(--accent);
  }

  & svg.progress-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    width: 50px;
    height: 50px;
    transform: rotate(-90deg);

    & circle {
      fill: none;
      stroke-width: 2;
    }

    & .progress-ring-bg {
      stroke: var(--border);
    }

    & .progress-ring-fill {
      stroke: var(--accent);
      stroke-dasharray: 141.37;
      stroke-dashoffset: 141.37;
      stroke-linecap: round;
      transition: stroke-dashoffset 100ms linear;
    }
  }
}

/* ==========================================================================
   24. TOAST NOTIFICATION
   ========================================================================== */

.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: var(--space-sm) var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--pro);
  border-radius: var(--radius-full);
  color: var(--pro);
  font-size: var(--fs-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast), transform var(--duration-base) var(--ease-out);
  z-index: 9999;

  &.toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ==========================================================================
   25. SEARCH FORM
   ========================================================================== */

.search-form {
  display: flex;
  gap: var(--space-sm);

  & .search-field {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: var(--fs-base);

    &::placeholder { color: var(--text-muted); }
    &:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
    }
  }

  & .search-submit {
    padding: var(--space-md) var(--space-lg);
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
  }
}

/* ==========================================================================
   26. ACCESSIBILITY
   ========================================================================== */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

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

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   27. WORDPRESS CORE ALIGNMENT
   ========================================================================== */

.alignwide {
  max-width: var(--wide-width);
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: var(--space-lg);
  margin-bottom: var(--space-md);
}

.alignright {
  float: right;
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.wp-caption {
  max-width: 100%;

  & .wp-caption-text {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-sm) 0;
  }
}

/* ==========================================================================
   28. COMMENTS SECTION
   ========================================================================== */

.comments-area {
  max-width: var(--content-width);
  margin: var(--space-3xl) auto;
  padding: 0 var(--space-lg);

  & .comments-title {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--text);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--border);
  }
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;

  & .comment {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    container-type: inline-size;

    &:has(.comment-reply-link:hover) {
      border-color: rgba(var(--accent-rgb), 0.3);
    }
  }

  & .comment .children {
    list-style: none;
    padding-left: var(--space-xl);
    margin-top: var(--space-md);
    border-left: 2px solid rgba(var(--accent-rgb), 0.2);

    & .comment {
      background: rgba(var(--accent-rgb), 0.04);
    }
  }
}

@container (max-width: 500px) {
  .comment .children {
    padding-left: var(--space-md);
  }
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);

  & .comment-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);

    & img {
      border-radius: 50%;
      width: 40px;
      height: 40px;
    }

    & .fn {
      font-weight: 700;
      color: var(--text);
      font-size: var(--fs-sm);
    }
  }

  & .comment-metadata {
    font-size: var(--fs-xs);
    color: var(--text-muted);

    & a {
      color: var(--text-muted);
      &:hover { color: var(--accent); }
    }
  }
}

.comment-content {
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  font-size: var(--fs-sm);

  & p:last-child { margin-bottom: 0; }
}

.comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  transition: opacity var(--duration-fast);

  &:hover { opacity: 0.7; }
}

/* Comment form */
.comment-respond {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);

  & .comment-reply-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-lg);
  }
}

.comment-form {
  & label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
  }

  & input[type="text"],
  & input[type="email"],
  & input[type="url"],
  & textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-family: var(--font-body);
    transition: border-color var(--duration-fast);
    margin-bottom: var(--space-md);

    &:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
    }
  }

  & textarea {
    min-height: 150px;
    resize: vertical;
  }

  & .form-submit input[type="submit"] {
    display: inline-flex;
    padding: 12px 32px;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 700;
    font-size: var(--fs-sm);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform var(--duration-fast), box-shadow var(--duration-fast);

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
    }
  }
}

/* Helpful vote button (for product cards) */
.helpful-vote {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-muted);

  & button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--duration-fast);

    &:hover {
      color: var(--accent);
      border-color: var(--accent);
      background: rgba(var(--accent-rgb), 0.08);
    }

    &.voted {
      color: var(--accent);
      border-color: var(--accent);
      background: rgba(var(--accent-rgb), 0.1);
    }
  }
}

/* ==========================================================================
   29. PRINT
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .toc,
  .back-to-top,
  .cta-row,
  .btn--copy-link,
  .toast {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .article-content a::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }
}
