/* ─── Design Tokens ─── */
:root {
  --bg: #0a0e17;
  --surface: #111827;
  --surface-2: #1a2235;
  --text: #e8edf5;
  --text-secondary: #94a3b8;
  --border: #1e293b;
  --border-light: #253247;
  --primary: #60a5fa;
  --primary-hover: #93c5fd;
  --danger-bg: #2d1520;
  --danger-border: #6b2740;
  --danger-text: #fca5c0;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Prompt", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ─── Focus & Accessibility ─── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

::selection { background: rgba(96, 165, 250, 0.25); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ─── Animation ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.js-reveal {
  animation: none !important;
}

/* ─── Layout ─── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  padding: 28px 20px 60px;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  z-index: 22;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

/* ── Hamburger Button ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  z-index: 22;
  transition: background 0.2s;
}

.hamburger:hover { background: var(--surface); }

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Desktop Nav ── */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.88rem;
  transition: color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.desktop-nav a i { font-size: 0.78rem; }

.desktop-nav a:hover { color: var(--text); background: var(--surface); }
.desktop-nav a.active { color: var(--text); background: var(--surface); }

/* ── Nav Stats ── */
.nav-stats {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(17, 24, 39, 0.7);
  color: var(--text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
}

.nav-stats .stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-stats i { color: var(--primary); font-size: 0.72rem; }
.nav-stats strong { color: var(--text); font-weight: 500; }

/* ── Lang Switch ── */
.lang-group {
  display: inline-flex;
  margin-left: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lang-switch {
  padding: 5px 10px !important;
  border-radius: 0 !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em;
  margin: 0 !important;
  border: none !important;
}

.lang-switch.active {
  background: var(--primary) !important;
  color: #fff !important;
}

/* ── Mobile Overlay ── */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 29;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ── Mobile Menu Drawer ── */
.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 80vw);
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 30;
  padding: 72px 20px 24px;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
}

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

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-menu-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
  transition: color 0.2s, background 0.2s;
}

.mobile-menu-links a i {
  width: 20px;
  text-align: center;
  font-size: 0.88rem;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  color: var(--text);
  background: var(--bg);
}

.mobile-menu-links a.active {
  border-left: 3px solid var(--primary);
  padding-left: 11px;
}

.mobile-menu-extra {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.mobile-menu-extra .nav-stats {
  margin-left: 0;
  width: 100%;
  justify-content: center;
}

.mobile-menu-extra .lang-group {
  margin-left: 0;
  align-self: flex-start;
}

/* ─── Back Button ─── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  margin-bottom: 16px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 400;
  transition: color 0.2s;
}

.btn-back:hover { color: var(--primary); }
.btn-back i { font-size: 0.8rem; }

/* ─── Hero ─── */
.hero {
  margin-bottom: 24px;
  animation: fadeUp 0.4s ease both;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 520px;
}

/* ─── Featured Swiper ─── */
.feature-swiper-wrap {
  margin-bottom: 20px;
  padding: 14px;
}

.feature-swiper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.feature-swiper-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feature-swiper-head h2 i {
  color: #f59e0b;
  font-size: 0.85rem;
}

.feature-swiper-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feature-swiper-prev,
.feature-swiper-next {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.feature-swiper-prev:hover,
.feature-swiper-next:hover {
  color: var(--text);
  border-color: var(--border-light);
}

.feature-slide {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  height: auto;
}

.feature-thumb {
  display: block;
  overflow: hidden;
}

.feature-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.feature-slide:hover .feature-thumb img {
  transform: scale(1.03);
}

.feature-body {
  padding: 12px;
}

.feature-body h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

.feature-body h3 a {
  text-decoration: none;
}

.feature-body h3 a:hover {
  color: var(--primary);
}

.feature-body p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.65;
}

.feature-body .meta {
  margin-top: 9px;
}

.feature-swiper-pagination {
  margin-top: 8px;
  text-align: center;
}

.feature-swiper-pagination .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  background: #475569;
  opacity: 1;
}

.feature-swiper-pagination .swiper-pagination-bullet-active {
  background: var(--primary);
}

/* ─── Panel ─── */
.panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

/* ─── Search ─── */
.toolbar {
  margin-bottom: 20px;
  animation: fadeUp 0.4s ease both;
  animation-delay: 0.05s;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 240px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 0.82rem;
  pointer-events: none;
}

.input {
  width: 100%;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0 12px 0 34px;
  color: var(--text);
  background: var(--bg);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 300;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder { color: #4a5568; }
.input:hover { border-color: var(--border-light); }

.input:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* ─── Buttons ─── */
.btn {
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--primary);
  color: #0a0e17;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

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

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
}

.btn i { font-size: 0.8em; }

/* ─── Card Grid ─── */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s;
  animation: fadeUp 0.4s ease both;
}

.card:nth-child(1) { animation-delay: 0.06s; }
.card:nth-child(2) { animation-delay: 0.10s; }
.card:nth-child(3) { animation-delay: 0.14s; }
.card:nth-child(4) { animation-delay: 0.18s; }
.card:nth-child(5) { animation-delay: 0.22s; }
.card:nth-child(6) { animation-delay: 0.26s; }

.card:hover {
  border-color: var(--border-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.thumb-link { display: block; overflow: hidden; }

.thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-2);
  transition: transform 0.35s ease;
}

.card:hover .thumb { transform: scale(1.03); }

.card-body { padding: 14px 16px 16px; }

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.card-title a {
  text-decoration: none;
  transition: color 0.2s;
}
.card-title a:hover { color: var(--primary); }

.card-desc {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta i { font-size: 0.72rem; }

/* ─── Article Page ─── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  animation: fadeIn 0.35s ease;
}

.reading-progress {
  position: sticky;
  top: 60px;
  z-index: 18;
  width: 100%;
  height: 3px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.reading-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa 0%, #34d399 100%);
  transition: width 0.08s linear;
}

.article-card { overflow: hidden; }

.article-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  background: var(--surface-2);
}

.article-body {
  padding: clamp(16px, 3vw, 28px);
  max-width: 720px;
}

.article-title {
  margin: 0 0 4px;
  font-size: clamp(1.3rem, 1rem + 1.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.article-content {
  line-height: 1.9;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 300;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  font-weight: 500;
  margin-top: 1.5em;
  margin-bottom: 0.6em;
}

.article-content p { margin: 0 0 0.9em; }

.article-content ul,
.article-content ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

.article-content code {
  font-family: "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: rgba(96, 165, 250, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.article-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.article-content img,
.article-content iframe,
.article-content video {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.article-content a {
  color: var(--primary);
  text-underline-offset: 3px;
  text-decoration-color: rgba(96, 165, 250, 0.3);
}
.article-content a:hover { text-decoration-color: var(--primary); }

/* ─── Section Divider ─── */
.section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.section h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section h2 i { color: var(--primary); font-size: 0.9rem; }

/* ─── Script Block ─── */
.script-wrap {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}

.script-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.script-head i { font-size: 0.78rem; }

.script-code {
  margin: 0;
  padding: 14px;
  color: #c9d8f0;
  font-family: "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  white-space: pre;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 360px;
  line-height: 1.7;
}

/* ─── Sidebar ─── */
.article-sticky { display: grid; gap: 12px; }

.side-list { padding: 14px; }

.side-list h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.side-list h3 i { font-size: 0.78rem; color: var(--primary); }

.side-list ul {
  margin: 0; padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

.side-list li {
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}
.side-list li:last-child { border-bottom: none; }

.side-list a {
  display: block;
  padding: 8px 0;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 400;
  transition: color 0.2s;
}
.side-list a:hover { color: var(--primary); }

/* ─── About ─── */
.about-section {
  padding: 22px 24px;
  margin-bottom: 16px;
  animation: fadeUp 0.4s ease both;
}

.about-section:nth-of-type(2) { animation-delay: 0.06s; }
.about-section:nth-of-type(3) { animation-delay: 0.10s; }
.about-section:nth-of-type(4) { animation-delay: 0.14s; }
.about-section:nth-of-type(5) { animation-delay: 0.18s; }

.about-section h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-section h2 i {
  color: var(--primary);
  font-size: 0.9rem;
}

.about-section p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.85;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.about-feature {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.2s;
}

.about-feature:hover {
  border-color: var(--border-light);
}

.about-feature-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(96, 165, 250, 0.1);
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.about-feature h3 {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 500;
}

.about-feature p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.65;
}

.about-cta {
  text-align: center;
}

.about-cta h2 { justify-content: center; }
.about-cta p { max-width: 480px; margin-left: auto; margin-right: auto; }

@media (min-width: 640px) {
  .about-features { grid-template-columns: 1fr 1fr; }
}

/* ─── FAQ ─── */
.faq-panel {
  margin-top: 24px;
  padding: 18px;
  animation: fadeUp 0.4s ease both;
  animation-delay: 0.1s;
}

.faq-panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-panel h2 i { color: var(--primary); font-size: 0.88rem; }

.faq-panel details {
  border-top: 1px solid var(--border);
  padding: 10px 0;
}

.faq-panel summary {
  cursor: pointer;
  font-weight: 400;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s;
  list-style: none;
}

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

.faq-panel summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  transition: background 0.2s;
  vertical-align: middle;
}

.faq-panel details[open] summary::before {
  content: "\2212";
  background: rgba(96, 165, 250, 0.12);
}

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

.faq-panel p {
  margin: 6px 0 0 28px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ─── Infinite Scroll ─── */
.infinite-status {
  margin: 16px 0 8px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.85rem;
}
.infinite-sentinel { height: 1px; }

/* ─── States ─── */
.empty, .error {
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.empty {
  border: 1px dashed var(--border-light);
  color: var(--text-secondary);
}

.error {
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  margin-top: 32px;
}

.footer-inner {
  padding: 20px 0;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.82rem;
}

/* ─── Ads ─── */
.ad-section {
  margin-top: 24px;
  padding: 14px;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.ad-section-inline {
  margin-top: 18px;
  margin-bottom: 8px;
}

.ad-section-top {
  margin-top: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
  background:
    radial-gradient(100% 80% at 50% 0%, rgba(96, 165, 250, 0.14) 0%, rgba(15, 23, 42, 0.1) 60%, rgba(15, 23, 42, 0) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(15, 23, 42, 0.16) 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.ad-section-top .ad-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text);
}

.ad-section-label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-section-slot-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  overflow-y: hidden;
}

.ad-section-slot {
  flex: 0 0 auto;
  max-width: 100%;
}

.ad-section-slot-wrap iframe,
.ad-section-slot-wrap img,
.ad-section-slot-wrap ins,
.ad-section-slot-wrap [id^="container-"] {
  max-width: 100% !important;
}

.ad-section-slot-wrap-fixed {
  overflow: hidden;
  align-items: flex-start;
}

.ad-section-slot-wrap-fixed .ad-section-slot {
  width: var(--ad-native-width);
  min-width: var(--ad-native-width);
  transform-origin: top center;
}

.ad-section-slot-wrap-fixed.is-scaled {
  min-height: var(--ad-scaled-height, auto);
}

.ad-section-slot-wrap-fixed.is-scaled .ad-section-slot {
  transform: scale(var(--ad-scale, 1));
}

.ad-section-wide {
  margin-top: 12px;
}

.ad-section-slot-wrap-wide {
  width: min(100%, 860px);
}

.ad-section-slot-auto {
  width: 100%;
  min-height: 100px;
}

.ad-section-amp {
  width: min(100%, 860px);
  max-width: 100%;
  min-height: 320px;
}

/* ─── Cookie Banner ─── */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 95;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner-inner {
  width: min(100%, 860px);
  margin: 0 auto;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(100% 110% at 50% 0%, rgba(96, 165, 250, 0.18) 0%, rgba(15, 23, 42, 0.22) 62%, rgba(15, 23, 42, 0) 100%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(11, 17, 29, 0.98) 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-banner-text {
  margin: 0;
  flex: 1 1 auto;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.cookie-banner-accept {
  flex: 0 0 auto;
  min-width: 132px;
}

/* ─── Popup ─── */
body.popup-open {
  overflow: hidden;
}

.promo-popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.promo-popup.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.promo-popup-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.promo-popup-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border-light);
  background:
    radial-gradient(110% 80% at 50% 0%, rgba(96, 165, 250, 0.15) 0%, rgba(15, 23, 42, 0.12) 58%, rgba(15, 23, 42, 0) 100%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(11, 17, 29, 0.98) 100%);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.6);
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.24s ease;
}

.promo-popup.is-visible .promo-popup-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.promo-popup-dialog--clickable {
  cursor: pointer;
}

.promo-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.promo-popup-close:hover {
  transform: scale(1.08);
  border-color: var(--primary);
  background: rgba(30, 41, 59, 0.95);
}

.promo-popup-media {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  text-decoration: none;
}

.promo-popup-media img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
}

.promo-popup-content {
  padding: 12px 6px 4px;
}

.promo-popup-content > :first-child {
  margin-top: 0;
}

.promo-popup-content > :last-child {
  margin-bottom: 0;
}

.promo-popup-content h3 {
  margin: 0 0 8px;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.22rem);
  line-height: 1.35;
}

.promo-popup-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.promo-popup-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.promo-popup-snooze-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.45);
  user-select: none;
  cursor: pointer;
}

.promo-popup-snooze-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.promo-popup--image-only .promo-popup-dialog {
  padding-top: 12px;
}

/* ─── Responsive ─── */

/* Mobile: show hamburger, hide desktop nav */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .desktop-nav { display: none; }

  .container, .main-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1 { font-size: 1.35rem; }
  .hero p { font-size: 0.88rem; }

  .feature-swiper-wrap {
    padding: 12px;
  }

  .feature-swiper-head h2 {
    font-size: 0.92rem;
  }

  .card-body { padding: 12px 14px 14px; }
  .card-title { font-size: 0.92rem; }
  .card-desc { font-size: 0.82rem; }

  .article-body { padding: 14px; }

  .script-code {
    padding: 10px;
    font-size: 0.78rem;
    max-height: 260px;
  }

  .promo-popup {
    padding: 12px;
  }

  .promo-popup-dialog {
    padding: 12px;
  }

  .promo-popup-actions {
    justify-content: stretch;
  }

  .promo-popup-snooze-check {
    width: 100%;
    justify-content: center;
  }

  .ad-section {
    margin-top: 16px;
    padding: 10px;
    gap: 8px;
  }

  .ad-section-top {
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .ad-section-label {
    text-align: center;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .ad-section-slot-wrap-wide {
    width: 100%;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .cookie-banner-inner {
    border-radius: 12px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .cookie-banner-text {
    font-size: 0.84rem;
  }

  .cookie-banner-accept {
    width: 100%;
    min-width: 0;
  }

  .btn { height: 40px; font-size: 0.84rem; flex: 1 1 auto; }

  /* Lock body scroll when menu open */
  body.menu-open { overflow: hidden; }
}

@media (max-width: 520px) {
  .promo-popup {
    padding: 10px;
    align-items: flex-end;
  }

  .promo-popup-dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 10px;
    border-radius: 14px;
  }

  .promo-popup-media {
    border-radius: 10px;
  }

  .promo-popup-media img {
    max-height: 48vh;
  }

  .promo-popup-content {
    padding: 10px 4px 2px;
  }
}

/* Desktop: mobile menu stays hidden via visibility:hidden, just keep hamburger hidden */
@media (min-width: 769px) {
  .hamburger { display: none !important; }
}

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

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

  .article-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }

  .article-sticky {
    position: sticky;
    top: 76px;
  }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
