/* ============================================================
   SpykeVision — review site styles
   Mobile-first, Apple-inspired light theme
   ============================================================ */

:root {
  --bg:        #f2f2f7;
  --surface:   #ffffff;
  --surface-2: #f5f5f7;
  --border:    #e2e2e7;
  --text:      #1c1c1e;
  --text-2:    #3a3a3c;
  --text-3:    #8e8e93;
  --accent:    #007aff;
  --accent-dk: #0062cc;
  --green:     #34c759;
  --orange:    #ff9500;
  --red:       #ff3b30;
  --purple:    #af52de;
  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.08), 0 20px 48px rgba(0,0,0,.10);
  --maxw:      1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
  --header-bg: rgba(255,255,255,.8);
}

[data-theme="dark"] {
  --bg:        #0d0d0f;
  --surface:   #1c1c1e;
  --surface-2: #2c2c2e;
  --border:    #38383a;
  --text:      #f2f2f7;
  --text-2:    #ebebf5cc;
  --text-3:    #ebebf599;
  --shadow:    0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.4), 0 20px 48px rgba(0,0,0,.45);
  --header-bg: rgba(28,28,30,.85);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-dk); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 4px;
  height: 56px;
}
.brand {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 19px; color: var(--text);
  letter-spacing: -.02em;
}
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,122,255,.15);
}
.brand .logo-mark {
  width: 25px; height: 25px; flex: none; display: block;
  filter: drop-shadow(0 1px 2px rgba(10,132,255,.25));
}
.brand .wm { display: inline-flex; gap: 0; align-items: baseline; }
.brand .wm .v { color: var(--accent); }
/* beta pill badge — elevated oval like "Hot" in nav refs */
.beta-tag {
  display: inline-block;
  background: var(--text);
  color: var(--surface);
  font-size: 8px;
  font-weight: 800;
  padding: 2px 7px 3px;
  border-radius: 999px;
  vertical-align: super;
  margin-left: 4px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: lowercase;
}
.brand .wm .beta-tag { position: relative; top: -5px; }
.hot-tag { background: var(--red) !important; }


.site-footer .brand .logo-mark { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin-left: auto; }
.nav-links a {
  color: var(--text-2); font-weight: 500; font-size: 15px;
  padding: 8px 14px; border-radius: 10px; transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { color: var(--accent); }
.flag-svg { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); display: block; flex-shrink: 0; }
.lang-dropdown-wrap { position: relative; }
.lang-dropdown-btn {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  font-size: 18px; padding: 4px 6px; border-radius: 8px;
  color: var(--text-2); transition: background .15s;
}
.lang-dropdown-btn:hover { background: var(--surface-2); }
.lang-chevron { color: var(--text-3); transition: transform .2s; }
.lang-dropdown-btn[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.lang-dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 6px; min-width: 140px; z-index: 100; list-style: none;
}
.lang-dropdown-menu.open { display: block; }
.lang-dropdown-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 7px; font-size: 14px; font-weight: 500;
  color: var(--text); text-decoration: none; transition: background .12s;
}
.lang-dropdown-menu a:hover { background: var(--surface-2); }
.lang-dropdown-menu a.lang-active { color: var(--accent); font-weight: 700; }

.btn-support-nav {
  background: none; border: 1.5px solid var(--accent); color: var(--accent);
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 4px 18px; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s; letter-spacing: .03em;
}
.btn-support-nav:hover { background: var(--accent); color: #fff; }


.nav-toggle {
  display: none; width: 40px; height: 40px; border: none; background: none;
  cursor: pointer; border-radius: 10px; align-items: center; justify-content: center;
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--text);
  border-radius: 2px; position: relative; transition: .25s;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px; transition: .25s;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.open span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.article-hero { padding: 56px 0 32px; }
.hero { padding: 72px 0 48px; text-align: center; }
.hero .eyebrow {
  color: var(--accent); font-weight: 600; font-size: 15px;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px;
}
.hero h1 {
  font-size: 52px; line-height: 1.07; letter-spacing: -.03em;
  font-weight: 700; margin-bottom: 20px; text-wrap: balance;
}
.hero p {
  font-size: 21px; color: var(--text-3); max-width: 640px; margin: 0 auto 32px;
  line-height: 1.45;
}
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 16px; padding: 13px 28px; border-radius: 999px;
  transition: transform .15s, background .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(0,122,255,.3);
}
.btn:hover { background: var(--accent-dk); color: #fff; transform: translateY(-1px); }
.btn.ghost {
  background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.btn.ghost:hover { background: var(--surface-2); }

/* ---------- Section heading ---------- */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { font-size: 30px; letter-spacing: -.02em; font-weight: 700; }
.section-head a { font-size: 15px; font-weight: 500; }

/* ---------- Review cards ---------- */
.grid {
  display: grid; gap: 22px;
  grid-template-columns: 1fr;
}
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media {
  aspect-ratio: 16/10; background: linear-gradient(135deg,#1c1c2e,#2d2d44);
  position: relative; overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,.92); color: var(--text);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  letter-spacing: .02em; backdrop-filter: blur(8px);
}
.card-media .score {
  position: absolute; bottom: 14px; right: 14px;
  background: var(--accent); color: #fff;
  font-size: 17px; font-weight: 800; width: 50px; height: 50px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,122,255,.4);
}
.card-media .card-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--red); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(255,59,48,.4);
}
.card-body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card-cat { color: var(--accent); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.card-body h3 { font-size: 21px; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 10px; }
.card-body p { color: var(--text-3); font-size: 15px; margin-bottom: 16px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; }
.card-meta .author { display: flex; align-items: center; gap: 7px; font-weight: 500; color: var(--text-2); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),var(--purple)); display: inline-block; }

/* featured card spans full width on larger screens */
.card.featured .card-media { aspect-ratio: 16/9; }


/* ---------- Article ---------- */
.article-page { max-width: 820px; padding-top: 40px; }
.article-page .prose { max-width: 100%; }
.article-page--wide { max-width: 1120px; }
.article-page--wide .prose { max-width: 100%; }
.article-page--wide .chart-section,
.article-page--wide .contrast-card { max-width: 100%; }

/* Wide page: light chart theme */
.article-page--wide .chart-section {
  background: #fff;
  border: 1px solid #e2e2e7;
  color: #1c1c1e;
}
.article-page--wide .cs-title strong { color: #1c1c1e; }
.article-page--wide .cs-title span   { color: #6e6e73; }
.article-page--wide .chart-divider   { border-top-color: #e2e2e7; }
.article-page--wide .chart-table-wrap::-webkit-scrollbar-thumb { background: #c7c7cc; }
.article-page--wide .data-table { color: #1c1c1e; }
.article-page--wide .data-table th {
  background: #f2f2f7;
  color: #3a3a3c;
  border-bottom: 2px solid #e2e2e7;
}
.article-page--wide .data-table th:hover { background: #e5e5ea; }
.article-page--wide .data-table td {
  color: #1c1c1e;
  border-bottom: 1px solid #f0f0f5;
}
.article-page--wide .data-table tbody tr:hover td { background: #f8f8fb; }
.article-page--wide .data-table .label-col { color: #1c1c1e; }

/* Wide page: dark theme overrides */
[data-theme="dark"] .article-page--wide .chart-section,
[data-theme="dark"] .article-page--wide .cs-data-card {
  background: #1c1c1e;
  border-color: #38383a;
  color: #f2f2f7;
}
[data-theme="dark"] .article-page--wide .cs-title strong { color: #f2f2f7; }
[data-theme="dark"] .article-page--wide .cs-title span   { color: #ebebf599; }
[data-theme="dark"] .article-page--wide .chart-divider   { border-top-color: #38383a; }
[data-theme="dark"] .article-page--wide .chart-table-wrap::-webkit-scrollbar-thumb { background: #48484a; }
[data-theme="dark"] .article-page--wide .data-table { color: #f2f2f7; }
[data-theme="dark"] .article-page--wide .data-table th {
  background: #2c2c2e;
  color: #ebebf5cc;
  border-bottom: 2px solid #38383a;
}
[data-theme="dark"] .article-page--wide .data-table th:hover { background: #3a3a3c; }
[data-theme="dark"] .article-page--wide .data-table td {
  color: #f2f2f7;
  border-bottom: 1px solid #2c2c2e;
}
[data-theme="dark"] .article-page--wide .data-table tbody tr:hover td { background: #2c2c2e; }
[data-theme="dark"] .article-page--wide .data-table .label-col { color: #f2f2f7; }
[data-theme="dark"] .cs-table-label { color: #ebebf5cc; }
[data-theme="dark"] .cs-table-label span { color: #ebebf599; }
[data-theme="dark"] .cs-view-toggle { background: #2c2c2e; }
[data-theme="dark"] .cs-tab { color: #ebebf599; }
[data-theme="dark"] .cs-tab--active { background: #3a3a3c; color: #f2f2f7; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
[data-theme="dark"] .cs-exp-btn { background: #2c2c2e; border-color: #38383a; color: #ebebf5cc; }
[data-theme="dark"] .cs-exp-btn:hover { background: #3a3a3c; }
[data-theme="dark"] .cs-chip { background: #2c2c2e; border-color: #38383a; color: #ebebf599; }
[data-theme="dark"] .cs-chip:hover { border-color: #6e6e73; color: #f2f2f7; }
[data-theme="dark"] .cs-stat-card { background: #2c2c2e; }
[data-theme="dark"] .cs-stat-val { color: #f2f2f7; }
[data-theme="dark"] .cs-stat-lbl { color: #ebebf599; }
[data-theme="dark"] .cs-bar-zoom { color: #ebebf5cc; }
[data-theme="dark"] .cs-bar-val { color: #f2f2f7; }
[data-theme="dark"] .cs-bar-track { background: #2c2c2e; }

/* Chart / Table toggle */
.cs-title {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
}
.cs-view-toggle {
  display: inline-flex;
  gap: 3px;
  margin-top: 10px;
  background: #f2f2f7;
  border-radius: 8px;
  padding: 3px;
}
.cs-tab {
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #6e6e73;
  cursor: pointer;
  letter-spacing: .02em;
}
.cs-tab--active {
  background: #fff;
  color: #1c1c1e;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.cs-exp-btn {
  margin-top: 10px;
  border: 1px solid #e2e2e7;
  background: #f2f2f7;
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #6e6e73;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .15s, color .15s, border-color .15s;
}
.cs-exp-btn:hover { background: #e8e8ed; }
.cs-exp-btn.on {
  background: #1c1c1e;
  color: #fff;
  border-color: #1c1c1e;
}

/* Inline table section (wide mode) */
.cs-table-section { display: none; padding: 0 20px; }
.cs-data-card .cs-table-section { display: block; }
.cs-table-label {
  font-size: 12px;
  font-weight: 700;
  color: #3a3a3c;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 16px 0 6px;
}
.cs-table-label span {
  font-weight: 400;
  text-transform: none;
  color: #6e6e73;
  margin-left: 6px;
  letter-spacing: 0;
}

/* Horizontal bars view (wide mode) */
.cs-bars-section { display: none; padding: 20px 24px 8px; }

/* Aperture chip selector */
.cs-aperture-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid #e2e2e7;
  background: #fff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #6e6e73;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.cs-chip:hover { border-color: #c7c7cc; color: #3a3a3c; }
.cs-chip--active { border-color: #1c1c1e; background: #1c1c1e; color: #fff; }
.cs-chip--active .color-dot { opacity: 1; }

/* Stat highlight cards */
.cs-stat-cards {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.cs-stat-card {
  flex: 1;
  background: #f5f5f7;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.cs-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: #1c1c1e;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.cs-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6e6e73;
  margin-top: 4px;
}
.cs-stat-zoom {
  font-size: 11px;
  color: #aeaeb2;
  margin-top: 2px;
}

/* Bar rows */
.cs-bar-rows { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; }
.cs-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.cs-bar-zoom {
  flex: 0 0 44px;
  font-weight: 600;
  color: #3a3a3c;
  text-align: right;
  font-size: 12px;
}
.cs-bar-val {
  flex: 0 0 90px;
  text-align: right;
  color: #1c1c1e;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.cs-bar-track {
  flex: 1;
  height: 18px;
  background: #f2f2f7;
  border-radius: 4px;
  overflow: hidden;
}
.cs-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease;
}

/* Full-bleed hero with cover image as background */
.article-hero-fb {
  position: relative;
  width: 100%;
  min-height: 56vh;
  background-size: cover;
  background-position: center center;
  background-color: #0a0a1f;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0;
}
.article-hero-fb--plain {
  min-height: 0;
  background: var(--bg);
}
.article-hero-overlay {
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,.90) 0%, rgba(0,0,0,.50) 55%, rgba(0,0,0,.0) 100%);
  padding: 72px 0 48px;
}
.article-hero-fb--plain .article-hero-overlay {
  background: none;
  padding: 44px 0 24px;
}
.article-hero-fb .eyebrow {
  color: var(--accent); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px;
}
.article-hero-fb:not(.article-hero-fb--plain) .eyebrow { color: #fff; opacity: .75; }
.article-hero-fb h1 {
  font-size: 40px; line-height: 1.1; letter-spacing: -.03em; margin-bottom: 14px;
}
.article-hero-fb:not(.article-hero-fb--plain) h1 { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero-summary {
  font-size: 17px; line-height: 1.5; margin-bottom: 20px; max-width: 600px;
  color: var(--text-2);
}
.article-hero-fb:not(.article-hero-fb--plain) .hero-summary { color: rgba(255,255,255,.75); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--text-3); font-size: 14px; }
.article-meta .author { display: flex; align-items: center; gap: 9px; color: var(--text-2); font-weight: 500; }
.article-hero-fb:not(.article-hero-fb--plain) .article-meta,
.article-hero-fb:not(.article-hero-fb--plain) .article-meta .author { color: rgba(255,255,255,.7); }
.meta-sep { opacity: .4; }

.article-layout { display: block; }
.toc {
  background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 20px 24px; margin: 0 0 28px;
}
.toc h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 14px; }
.toc ul { list-style: none; display: grid; gap: 2px; margin-bottom: 2px; }
.toc a { color: var(--text-2); font-size: 13px; font-weight: 500; line-height: 1.3; }
.toc a:hover { color: var(--accent); }
/* Multi-column layout so the long TOC stays compact on wide articles */
.toc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 32px; align-items: start;
}
.toc-group { break-inside: avoid; margin-bottom: 8px; }
.toc-group-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); margin: 0 0 5px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
/* Floating sidebar TOC stays single-column regardless of grid markup */
.toc-float .toc-grid { display: block; }
.toc-float .toc-group { margin-bottom: 8px; }

/* Floating section nav — desktop only, appears after scrolling past hero */
.toc-float {
  position: fixed;
  top: 96px;
  left: calc(50vw - 712px);
  width: 160px;
  max-height: min(520px, calc(100vh - 130px));
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 14px 14px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.toc-float.visible { opacity: 1; pointer-events: auto; }
.toc-float h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); margin-bottom: 10px;
}
.toc-float ul { list-style: none; display: grid; gap: 8px; margin-bottom: 4px; }
.toc-float a {
  color: var(--text-3); font-size: 12.5px; font-weight: 500;
  line-height: 1.3; display: block;
  border-left: 2px solid transparent; padding-left: 8px; margin-left: -8px;
  transition: color .15s, border-color .15s;
}
.toc-float a:hover { color: var(--accent); }
.toc-float a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 650; }
/* Only show floating TOC when there's room beside the column */
@media (max-width: 1439px) { .toc-float { display: none; } }

.prose { max-width: 720px; margin: 0 auto; }
.prose h2 {
  font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 52px 0 16px; scroll-margin-top: 80px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.prose h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 32px 0 10px; }
.prose h4 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; color: var(--text); }
.prose p { margin: 16px 0; color: var(--text-2); line-height: 1.7; }
.prose ul, .prose ol { margin: 14px 0 14px 24px; color: var(--text-2); }
.prose li { margin: 8px 0; line-height: 1.6; }
.prose strong { color: var(--text); font-weight: 700; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 44px 0; }
.prose img { border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.prose figure { margin: 32px 0; }
.prose figure img { width: 100%; }
.prose figcaption { text-align: center; color: var(--text-3); font-size: 14px; margin-top: 10px; }

/* Photo gallery — grid of clickable images */
.prose .gallery {
  display: grid; gap: 10px; margin: 28px 0;
  grid-template-columns: 1fr 1fr; align-items: start;
}
.prose .gallery figure { margin: 0; display: flex; flex-direction: column; }
.prose .gallery figcaption { font-size: 12px; margin-top: 6px; text-align: center; }
.prose .gallery img {
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  width: 100%; object-fit: cover; aspect-ratio: 4/3; display: block;
  cursor: zoom-in;
}
.prose .gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Odd-count galleries — hero image + thumbnail strip */
.prose .gallery.carousel { display: block; }
.car-container { display: flex; align-items: center; gap: 6px; }
.car-main { flex: 1; min-width: 0; }
.car-main figure { margin: 0; }
.car-btn {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--surface-2); color: var(--text);
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s; opacity: 0.4;
}
.car-btn:hover { opacity: 0.9; }
.car-thumbs {
  display: flex; gap: 6px; overflow-x: auto;
  justify-content: center;
  padding: 8px 0 4px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.car-thumb {
  flex-shrink: 0; width: 72px; height: 54px;
  border: 2px solid transparent; border-radius: 6px;
  overflow: hidden; cursor: pointer; padding: 0; background: none;
  opacity: 0.5; transition: border-color .15s, opacity .15s;
}
.car-thumb.active { border-color: var(--accent); opacity: 1; }
.car-thumb:hover:not(.active) { opacity: 0.75; }
.car-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  aspect-ratio: unset; box-shadow: none; border-radius: 0; cursor: pointer;
}

@media (max-width: 600px) {
  .prose .gallery, .prose .gallery.cols-3 { grid-template-columns: 1fr 1fr; }
  .car-btn { width: 28px; height: 28px; font-size: 16px; }
  .car-thumb { width: 58px; height: 44px; }
}

/* Lightbox overlay */
.lb-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px;
}
.lb-overlay.open { display: flex; }
.lb-overlay img {
  max-width: 90vw; max-height: 82vh;
  border-radius: 10px; box-shadow: 0 16px 60px rgba(0,0,0,.55);
  object-fit: contain; display: block;
}
.lb-caption {
  color: rgba(255,255,255,.75); font-size: 13px; margin-top: 12px;
  text-align: center; max-width: 80%;
}
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.14); border: none; border-radius: 50%;
  width: 50px; height: 50px; font-size: 22px; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: background .15s;
  -webkit-backdrop-filter: blur(6px);
}
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-btn.prev { left: 16px; }
.lb-btn.next { right: 16px; }
.lb-close {
  position: absolute; top: 14px; right: 16px;
  background: rgba(255,255,255,.14); border: none; border-radius: 50%;
  width: 42px; height: 42px; font-size: 20px; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lb-counter {
  position: absolute; bottom: 16px;
  color: rgba(255,255,255,.5); font-size: 12px; letter-spacing: .04em;
}
@media (max-width: 600px) {
  .lb-btn { width: 40px; height: 40px; font-size: 18px; }
  .lb-btn.prev { left: 6px; }
  .lb-btn.next { right: 6px; }
}

/* callout / note */
.note {
  background: #eef4ff; border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 24px 0;
  font-size: 16px; color: #1c1c1e;
}
.note strong { color: var(--accent-dk); }
[data-theme="dark"] .note { background: rgba(0,122,255,.14); color: #e5e5ea; }
[data-theme="dark"] .note strong { color: #6ab0ff; }

/* spec table — label on top (small/gray), value below (large/bold) */
.spec-table {
  width: 100%; border-collapse: collapse; margin: 28px 0;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.spec-table tr { display: block; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { display: block; padding: 0; border: none; }
.spec-table td:first-child {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3); margin-bottom: 5px;
}
.spec-table td:last-child { font-size: 17px; color: var(--text); font-weight: 500; }
.spec-table tbody tr { transition: background .15s; }
.spec-table tbody tr:hover { background: var(--surface-2); }

/* pros & cons */
.proscons { display: grid; gap: 16px; margin: 24px 0; grid-template-columns: 1fr; }
.pc-box { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 20px; }
.pc-box h4 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pc-box.pros h4 { color: var(--green); }
.pc-box.cons h4 { color: var(--red); }
.pc-box ul { list-style: none; margin: 0; }
.pc-box li { position: relative; padding-left: 26px; margin: 9px 0; font-size: 15px; color: var(--text-2); }
.pc-box.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.pc-box.cons li::before { content: "✕"; position: absolute; left: 0; color: var(--red); font-weight: 800; }

/* conclusion card */
.conclusion {
  position: relative; margin: 40px 0;
  padding: 36px 32px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.conclusion-label {
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.conclusion h3 { margin: 0 0 14px; font-size: 25px; letter-spacing: -.02em; line-height: 1.2; }
.conclusion > p { color: var(--text-2); font-size: 16px; line-height: 1.65; margin: 0 0 24px; }
.conclusion-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.btn-donate, .btn-official, .btn-subscribe {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px 28px; border-radius: 999px; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none; border: none;
  transition: background .15s, transform .1s, border-color .15s, color .15s;
}
.btn-donate { background: var(--accent); color: #fff; }
.btn-donate:hover { background: var(--accent-dk); transform: translateY(-1px); }
.btn-official {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-official:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-subscribe {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-subscribe:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.subscribe-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px); z-index: 200;
}
.subscribe-backdrop.open { display: block; }
.subscribe-modal {
  display: none; position: fixed; inset: 0; margin: auto;
  width: min(480px, 95vw); max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 36px 32px 32px; z-index: 201;
}
.subscribe-modal.open { display: block; }
.subscribe-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface-2); border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 14px; cursor: pointer;
  color: var(--text-3); transition: color .15s, background .15s;
}
.subscribe-close:hover { background: var(--border); color: var(--text); }
.subscribe-modal-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.subscribe-modal-sub { font-size: 14px; color: var(--text-3); margin-bottom: 24px; }

.ratings { display: grid; gap: 14px; margin: 24px 0; }
.rating-row { display: grid; grid-template-columns: 130px 1fr 46px; align-items: center; gap: 12px; }
.rating-row .label { font-size: 14px; color: var(--text-2); font-weight: 500; }
.rating-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.rating-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg,var(--accent),var(--purple)); }
.rating-row .val { font-size: 14px; font-weight: 700; text-align: right; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 40px 0; background: var(--surface); }
.footer-inner { display: flex; flex-direction: column; gap: 20px; }
.footer-inner .brand { font-size: 17px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--text-3); font-size: 15px; font-weight: 500; }
.footer-links a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 16px; align-items: center; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: color .15s, transform .15s;
}
.footer-social a:hover { color: var(--accent); transform: translateY(-2px); }
.copyright { color: var(--text-3); font-size: 13px; }
.footer-support-btn {
  align-self: flex-start; padding: 8px 20px; font-size: 13px; font-weight: 600;
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-2); cursor: pointer; transition: border-color .15s, color .15s;
}
.footer-support-btn:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="dark"] .footer-support-btn { background: #fff; color: #000; border-color: #fff; }
[data-theme="dark"] .footer-support-btn:hover { background: #e5e5ea; border-color: #e5e5ea; color: #000; }
.heart-icon { display: inline; vertical-align: middle; flex-shrink: 0; }

/* ---------- Comments ---------- */
.comments {
  margin: 0 auto 40px; padding: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.comments-title {
  font-size: 24px; letter-spacing: -.02em; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
/* White framed box around the form/thread, matching .ba-compare */
#cusdis_thread {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-height: 320px;
}
/* Cusdis: mark all fields as required */
#cusdis_thread label::after { content: ' *'; color: var(--red); font-size: 12px; }
#cusdis_thread input, #cusdis_thread textarea {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text);
}
#cusdis_thread textarea { min-height: 120px !important; }
#cusdis_thread input:focus, #cusdis_thread textarea:focus {
  outline: none; border-color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .proscons { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid .card.featured { grid-column: 1 / -1; flex-direction: row; }
  .grid .card.featured .card-media { flex: 0 0 56%; aspect-ratio: auto; }
  .grid .card.featured .card-body { justify-content: center; padding: 36px; }
  .grid .card.featured h3 { font-size: 28px; }
  .grid .card.featured .card-body p { font-size: 17px; }
  .article-hero-fb h1 { font-size: 48px; }
}

/* ---------- Coming Soon list ---------- */
.cs-list { display: flex; flex-direction: column; gap: 18px; }
.cs-card {
  display: flex; align-items: stretch;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  border-left: 4px solid var(--accent);
}
.cs-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cs-media { position: relative; flex: none; width: 260px; }
.cs-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px);
  font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  letter-spacing: .05em; white-space: nowrap;
}
.cs-body { flex: 1; padding: 22px 24px; }
.cs-body h3 { font-size: 19px; margin: 6px 0 8px; letter-spacing: -.01em; color: var(--text); }
.cs-body p { color: var(--text-3); font-size: 15px; margin-bottom: 12px; }

/* ---------- Subscribe ---------- */
.subscribe-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 0; margin: 40px 0; }
.subscribe-inner { display: flex; gap: 40px; align-items: center; }
.subscribe-text { flex: 1; }
.subscribe-text h3 { font-size: 22px; margin: 0 0 8px; letter-spacing: -.01em; }
.subscribe-text p { color: var(--text-3); margin: 0; }
.subscribe-form { flex: 1; }
@media (max-width: 640px) { .subscribe-inner { flex-direction: column; gap: 20px; } }

/* MailerLite form overrides — match site style */
.ml-embedded [class*="Wrapper"],
.ml-embedded [class*="Container"],
.ml-embedded [class*="embedBody"] { border-radius: var(--radius) !important; box-shadow: none !important; }
.ml-embedded input[type="email"],
.ml-embedded input[type="text"],
.ml-embedded textarea { border-radius: var(--radius) !important; font-family: inherit !important; font-size: 15px !important; }
.ml-embedded button,
.ml-embedded [class*="Submit"] button,
.ml-embedded [class*="btn"] { border-radius: var(--radius) !important; font-family: inherit !important; font-weight: 600 !important; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; gap: 24px; grid-template-columns: 1fr; }
.contact-card {
  background: linear-gradient(135deg,#0a84ff,#4040c0);
  border-radius: var(--radius); padding: 28px 28px 32px; color: #fff;
  position: relative; overflow: hidden;
}
.contact-card::after {
  content:''; position:absolute; right:-30px; bottom:-40px;
  width:180px; height:180px; border-radius:50%;
  background:rgba(255,255,255,.08);
}
.contact-name { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.contact-line { font-size: 15px; opacity: .85; margin-bottom: 6px; }
.contact-email {
  display: inline-block; color: #fff; font-weight: 600; font-size: 16px;
  text-decoration: underline; text-underline-offset: 3px; margin-bottom: 4px;
}
.contact-forum { color: rgba(255,255,255,.9); font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.contact-form { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 15px; font-weight: 500; color: var(--text-2); }
.form-group input, .form-group textarea {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 16px;
  color: var(--text); font-family: var(--font);
  transition: border-color .15s, box-shadow .15s; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,122,255,.15);
}
.form-status { font-size: 15px; font-weight: 500; min-height: 22px; }
@media (min-width: 760px) {
  .contact-wrap { grid-template-columns: 1fr 1.4fr; }
}

/* ---------- Theme toggle ---------- */
.scroll-top, .scroll-bottom {
  position: fixed; right: 16px; z-index: 150;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); opacity: 0; pointer-events: none;
  transition: opacity .2s, background .15s, transform .15s;
}
.scroll-top { top: 80px; }
.scroll-bottom { bottom: 24px; }
.scroll-top.visible, .scroll-bottom.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: var(--surface-2); transform: translateY(-2px); }
.scroll-bottom:hover { background: var(--surface-2); transform: translateY(2px); }

.theme-toggle {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%);
  z-index: 150; display: flex; flex-direction: column; align-items: center;
  gap: 5px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 10px 10px; cursor: pointer;
  box-shadow: var(--shadow-lg); transition: background .2s, border-color .2s;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-icon { font-size: 18px; line-height: 1; }
.theme-label { font-size: 10px; font-weight: 600; color: var(--text-3); letter-spacing: .04em; writing-mode: vertical-rl; text-orientation: mixed; }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .lang-dropdown-wrap { margin-left: auto; }
  .nav-links {
    position: fixed; inset: 56px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: .22s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 12px; font-size: 17px; border-radius: 10px; }
  .btn-support-nav { margin: 8px 12px 4px; font-size: 16px; padding: 11px 14px; border-radius: 10px; text-align: left; }
  .hero { padding: 44px 0 28px; }
  .hero h1 { font-size: 33px; line-height: 1.12; }
  .hero p { font-size: 17px; }
  .section-head h2 { font-size: 24px; }
  .article-hero-fb h1 { font-size: 28px; }
  .article-hero-fb { min-height: 44vh; }
  .article-hero-overlay { padding: 48px 0 32px; }
  .prose h2 { font-size: 23px; }
  body { font-size: 16px; }
  .cs-card { flex-direction: column; }
  .cs-media { width: 100%; }
  .cs-img { height: 180px; }
  .theme-toggle { right: 12px; top: auto; bottom: 80px; transform: none; }
}

/* ── Draft / Preview mode ──────────────────────────────── */

/* Draft cards hidden by default; shown only in preview mode */
.card[data-draft="true"] { display: none; }

/* Draft badge on cards */
.draft-badge {
  display: inline-block;
  background: #ff9f0a22;
  color: #ff9f0a;
  border: 1px solid #ff9f0a55;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

/* Preview bar — top strip shown to owner in preview mode */
#previewBar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: #ff9f0a;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.preview-bar-exit {
  color: #000;
  text-decoration: none;
  background: rgba(0,0,0,.12);
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 700;
}
.preview-bar-exit:hover { background: rgba(0,0,0,.22); }

/* Push page content down when preview bar is showing */
.preview-mode body { padding-top: 40px; }

/* Draft banner inside review page */
.draft-banner {
  background: #ff9f0a18;
  border-bottom: 1px solid #ff9f0a44;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #ff9f0a;
}
.draft-banner-edit {
  color: #ff9f0a;
  text-decoration: none;
  border: 1px solid #ff9f0a66;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.draft-banner-edit:hover { background: #ff9f0a22; }

/* Draft overlay — full-screen block for non-preview visitors on a draft page */
.draft-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.draft-overlay-box {
  text-align: center;
  max-width: 360px;
}
.draft-overlay-icon { font-size: 48px; margin-bottom: 16px; }
.draft-overlay-box h2 { font-size: 24px; margin-bottom: 10px; }
.draft-overlay-box p  { color: var(--text-2); margin-bottom: 24px; }

/* ── YouTube embed ─────────────────────────────────────── */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  margin: 28px 0;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Local video player ────────────────────────────────── */
figure.video-local {
  margin: 28px 0;
}
figure.video-local video {
  width: 100%;
  border-radius: 10px;
  display: block;
  background: #000;
  max-height: 70vh;
}
figure.video-local figcaption,
figure.video-r2 figcaption {
  text-align: center;
  font-size: 0.82em;
  color: var(--text-2);
  margin-top: 8px;
}
figure.video-r2 {
  margin: 28px 0;
}
figure.video-r2 video {
  width: 100%;
  border-radius: 10px;
  display: block;
  background: #000;
  max-height: 70vh;
}

/* ── Spoiler / collapsible ─────────────────────────────── */
.prose details.spoiler {
  margin: 22px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  overflow: hidden;
}
.prose details.spoiler > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.prose details.spoiler > summary::-webkit-details-marker { display: none; }
.prose details.spoiler > summary::before {
  content: '▶';
  font-size: 0.75em;
  transition: transform 0.2s ease;
}
.prose details.spoiler[open] > summary::before { transform: rotate(90deg); }
.prose details.spoiler[open] > summary {
  border-bottom: 1px solid var(--border);
}
.prose details.spoiler > summary:hover { color: var(--accent-dk); }
.prose details.spoiler > *:not(summary) {
  margin-left: 16px;
  margin-right: 16px;
}
.prose details.spoiler > figure:last-child { margin-bottom: 16px; }
.prose details.spoiler figure.video-local,
.prose details.spoiler figure.video-r2 { margin: 16px; }

/* ── Before / After slider ─────────────────────────────── */
figure.ba {
  margin: 28px 0;
}
figure.ba img-comparison-slider {
  --divider-width: 3px;
  --divider-color: #0a84ff;
  --default-handle-color: #0a84ff;
  --default-handle-width: 44px;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  width: 100%;
}
figure.ba img-comparison-slider img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
figure.ba figcaption {
  text-align: center;
  font-size: 0.82em;
  color: var(--text-2);
  margin-top: 8px;
}

/* ── Interactive Charts (Chart.js) ─────────────────────── */
.chart-section {
  background: #141414;
  border-radius: var(--radius);
  padding: 24px 0 20px;
  margin: 32px 0;
  font-size: 14px;
  overflow-x: hidden;
}
.cs-title,
.chart-table-wrap { padding-left: 20px; padding-right: 20px; }
.cs-title {
  text-align: center;
  margin-bottom: 20px;
}
.cs-title strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cs-title span {
  display: block;
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}
.chart-row {
  display: flex;
  gap: 24px;
  align-items: stretch;
}
.chart-row .chart-main {
  flex: 1 1 auto;
  width: auto;
}
.chart-main {
  width: 100%;
  min-width: 0;
  position: relative;
  height: 480px;
}
.chart-side {
  flex: 0 0 240px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.chart-side canvas {
  flex: 1 1 0;
  min-height: 0;
}
.chart-divider {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 24px 0;
}
.chart-table-wrap {
  overflow-x: auto;
  position: relative;
}
/* removed scroll-fade overlay (caused visual trail when scrolling) */
.chart-table-wrap::-webkit-scrollbar { height: 4px; }
.chart-table-wrap::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #ccc;
}
.data-table th {
  background: #1e1e1e;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .05em;
  padding: 12px 14px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border-bottom: 2px solid #2a2a2a;
}
.data-table th:hover { background: #2a2a2a; }
.data-table th.sort-asc::after  { content: ' ↑'; color: #4FC3F7; }
.data-table th.sort-desc::after { content: ' ↓'; color: #4FC3F7; }
.data-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid #222;
  color: #ccc;
}
.data-table.compact th { padding: 6px 10px; }
.data-table.compact td { padding: 5px 10px; font-size: 13px; }
#tbl-dble .label-col { text-align: center; font-weight: 400; color: inherit; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #1e1e1e; }
.data-table .label-col { text-align: left; white-space: nowrap; color: #fff; font-weight: 600; }
.color-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
@media (max-width: 720px) {
  .chart-row { flex-direction: column; }
  .chart-side { flex: 0 0 auto; width: 100%; }
}

@media (max-width: 600px) {
  .chart-main { height: 300px; }
}

/* Mobile: compact tables so they fit without excessive scrolling */
@media (max-width: 600px) {
  .chart-section { padding: 16px 12px 16px; }
  .cs-title strong { font-size: 12px; letter-spacing: .03em; }
  .cs-title span { font-size: 11px; }
  .data-table { font-size: 12px; }
  .data-table th { padding: 9px 8px; font-size: 10px; letter-spacing: .02em; }
  .data-table td { padding: 9px 8px; }
}


/* ── Image-enhancer comparison widget ─────────────────────────────────────── */
.enh-compare,
.ba-compare {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 28px 0;
}
.enh-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.enh-label { font-weight: 700; font-size: 15px; color: var(--text); }
.enh-view-toggle {
  display: inline-flex; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px;
}
.enh-vtab {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-3);
  padding: 5px 14px; border-radius: 999px; transition: .15s;
}
.enh-vtab--active { background: var(--accent); color: #fff; }

.enh-stage { position: relative; border-radius: var(--radius-sm); overflow: hidden; }
.enh-slider { width: 100%; display: block; border-radius: var(--radius-sm); }
.enh-slider img { width: 100%; display: block; }

/* Hover comparison */
.enh-hover { position: relative; width: 100%; line-height: 0; cursor: crosshair; }
.enh-hover img { width: 100%; display: block; border-radius: var(--radius-sm); }
.enh-hover-on { position: absolute; inset: 0; opacity: 0; transition: opacity .12s; }
.enh-hover.on .enh-hover-on { opacity: 1; }
.enh-hover-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,.7); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
  padding: 4px 10px; border-radius: 999px; line-height: 1.2;
  pointer-events: none;
}

/* Enhancer selection buttons */
.enh-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.enh-btn {
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 600; padding: 7px 13px;
  border-radius: 999px; transition: .15s;
}
.enh-btn:hover { border-color: var(--accent); color: var(--text); }
.enh-btn--active { background: var(--accent); border-color: var(--accent); color: #fff; }

.enh-caption { margin-top: 12px; font-size: 13px; color: var(--text-3); }
.enh-caption span { color: var(--text-2); font-weight: 600; }

@media (max-width: 600px) {
  .enh-btn { font-size: 12px; padding: 6px 11px; }
  .enh-label { font-size: 14px; }
}
