/* CryptoDesk — professional design system
   Dark default · light theme · RTL-ready · zero dependencies */

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0c10;
  --bg-soft: #0e1218;
  --surface: #12161f;
  --surface-2: #171c27;
  --surface-3: #1d2330;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e8edf5;
  --text-2: #9aa6b8;
  --text-3: #6b7689;
  --accent: #22d3ee;
  --accent-2: #67e8f9;
  --accent-ink: #062028;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --up: #34d399;
  --up-soft: rgba(52, 211, 153, 0.14);
  --down: #fb7185;
  --down-soft: rgba(251, 113, 133, 0.14);
  --warn: #fbbf24;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4), 0 16px 48px rgba(0, 0, 0, 0.35);
  --glow: radial-gradient(ellipse 80% 55% at 50% -10%, rgba(34, 211, 238, 0.14), transparent 60%);
  --header-bg: rgba(10, 12, 16, 0.82);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fb;
  --bg-soft: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --surface-3: #e9eef5;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --accent: #0891b2;
  --accent-2: #06b6d4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(8, 145, 178, 0.1);
  --up: #059669;
  --up-soft: rgba(5, 150, 105, 0.12);
  --down: #e11d48;
  --down-soft: rgba(225, 29, 72, 0.1);
  --warn: #d97706;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.08), 0 16px 48px rgba(15, 23, 42, 0.1);
  --glow: radial-gradient(ellipse 80% 55% at 50% -10%, rgba(8, 145, 178, 0.1), transparent 60%);
  --header-bg: rgba(246, 248, 251, 0.86);
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-2); }
code { font-family: var(--mono); font-size: 0.9em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent-soft); color: var(--text); }

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

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

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.up { color: var(--up); }
.down { color: var(--down); }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.logo-on-light { display: none; }
[data-theme="light"] .logo-on-dark { display: none; }
[data-theme="light"] .logo-on-light { display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }
.brand-tag { font-size: 0.68rem; color: var(--text-3); font-weight: 500; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-inline-start: 0.5rem;
}

.main-nav a {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn {
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
/* On English pages this button shows the Persian label "فارسی" —
   the Latin system stack has no Persian glyphs, so force Vazirmatn there. */
html[lang='en'] .lang-btn {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
}

.theme-btn,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.theme-btn:hover,
.nav-toggle:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Main ───────────────────────────────────────────────────────────── */
.site-main { min-height: 60vh; }

.section {
  padding: 2.75rem 0;
}
.section.alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.section-subtitle {
  color: var(--text-2);
  font-size: 0.92rem;
  margin-top: 0.3rem;
  max-width: 52ch;
}

.section-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
}

.section-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.section-link:hover { color: var(--accent-2); }

.table-note {
  color: var(--text-3);
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem 1rem;
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 4.5rem 0 3.75rem;
  background: var(--glow), var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 18ch;
}

.hero-sub {
  margin-top: 0.9rem;
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 46ch;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.hero-meta {
  margin-top: 1.4rem;
  font-size: 0.82rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ── Market cards ───────────────────────────────────────────────────── */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
}

.market-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.market-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.market-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-card-price {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.market-card-change {
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.market-card-change.up { color: var(--up); }
.market-card-change.down { color: var(--down); }

/* ── Tables ─────────────────────────────────────────────────────────── */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  text-align: start;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}

.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: background 0.12s ease;
}
.data-table tbody tr:hover { background: var(--surface-2); }

.data-table th.num,
.data-table td.num { text-align: end; }

.data-table img {
  display: inline-block;
  vertical-align: middle;
  margin-inline-end: 0.45rem;
  border-radius: 50%;
}

.coin-symbol {
  color: var(--text-3);
  font-size: 0.78em;
  font-weight: 600;
  margin-inline-start: 0.25rem;
}

/* Coin logo: local CDN first, letter-avatar fallback underneath the image.
   A broken remote/hosted file simply hides the <img> and the disc remains. */
.coin-ic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--ic, 20px);
  height: var(--ic, 20px);
  border-radius: 50%;
  overflow: hidden;
  vertical-align: middle;
  margin-inline-end: 0.45rem;
  background: linear-gradient(145deg, var(--surface-3, #2a2f3a), var(--surface-2, #1c212b));
  color: var(--text-2, #9aa4b2);
  font-size: calc(var(--ic, 20px) * 0.45);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.coin-ic::after { content: attr(data-sym); }
.coin-ic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}
.coin-name-cell { display: inline-flex; align-items: center; }
.coin-name-text { display: inline-block; }

/* ── Signal badges ──────────────────────────────────────────────────── */
.signal-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
}

.signal-badge.buy {
  color: var(--up);
  background: var(--up-soft);
  border-color: rgba(52, 211, 153, 0.25);
}
.signal-badge.sell {
  color: var(--down);
  background: var(--down-soft);
  border-color: rgba(251, 113, 133, 0.25);
}
.signal-badge.neutral {
  color: var(--text-2);
  background: var(--surface-3);
  border-color: var(--border-strong);
}

/* ── News cards ─────────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.news-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.76rem;
}

.news-source {
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}

.news-time { color: var(--text-3); }

.news-title {
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.news-title a { color: var(--text); }
.news-title a:hover { color: var(--accent); }

.news-summary {
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.55;
  flex: 1;
}

.news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.news-read {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.sponsored-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warn);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

/* ── FAQ ────────────────────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 720px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.faq-item[open] { border-color: var(--border-strong); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1.2rem;
  font-weight: 600;
  font-size: 0.94rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-inline-end: 2px solid var(--text-3);
  border-block-end: 2px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-block-start: -4px;
}
.faq-item[open] summary::after {
  transform: rotate(225deg);
  margin-block-start: 2px;
}

.faq-item p {
  padding: 0 1.2rem 1.1rem;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ── Affiliates / donate / premium ──────────────────────────────────── */
.exchanges-section,
.donate-section,
.premium-section { padding-top: 0; }

.exchange-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.exchange-card {
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 210px;
  max-width: 260px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.exchange-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.exchange-name {
  font-size: 1.02rem;
  font-weight: 700;
}

.affiliate-disclosure {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-bottom: 0.9rem;
}

.aff-note {
  font-size: 0.8rem;
  color: var(--text-2);
}

.aff-name { font-weight: 700; }

.aff-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-weight: 600;
}
.exchange-card .aff-link {
  margin-top: auto;
  width: 100%;
}

.donate-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.donate-coin {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
}

.donate-address {
  font-size: 0.8rem;
  color: var(--text-2);
  word-break: break-all;
}

.premium-price {
  color: var(--text-2);
  margin: 0.4rem 0 1rem;
}

.premium-features {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 420px;
}
.premium-features li {
  position: relative;
  padding-inline-start: 1.4rem;
  color: var(--text-2);
  font-size: 0.92rem;
}
.premium-features li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Ads (subtle, non-intrusive) ────────────────────────────────────── */
.ad-slot {
  margin: 1.25rem 0;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  min-height: 64px;
  text-align: center;
}
/* Unfilled AdSense units carry .ad-empty (set server-side, cleared by
   the layout sync script as soon as an iframe fills the <ins>). */
.ad-slot.ad-empty { display: none; }

.ad-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 0.4rem;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 0 1.75rem;
}

.footer-col h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 0.85rem;
}

.footer-about p {
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 48ch;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-col ul a {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
}
.footer-col ul a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.1rem 0 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.footer-disclaimer,
.footer-rights {
  font-size: 0.78rem;
  color: var(--text-3);
}

/* ── 404 ────────────────────────────────────────────────────────────── */
.error-section {
  text-align: center;
  padding: 5rem 0;
}
.error-section .section-title {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}
.error-section .section-subtitle {
  margin-inline: auto;
  margin-bottom: 1.5rem;
}

/* ── Admin ──────────────────────────────────────────────────────────── */
.admin-section { padding-bottom: 4rem; }

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
}

.tab-btn {
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.settings-form {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  transition: border-color 0.15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.content-list,
.monetize-info {
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.content-list h3,
.monetize-info h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.content-list ul,
.monetize-info ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.content-list li,
.monetize-info li {
  font-size: 0.88rem;
  color: var(--text-2);
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin: 0;
    padding: 0.6rem 1rem 0.9rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
  }

  .header-inner { position: relative; min-height: 56px; }
  .brand-tag { display: none; }

  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 2rem 0; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .market-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
  .data-table th,
  .data-table td { padding: 0.55rem 0.7rem; }
  .exchange-card { width: 100%; max-width: none; flex-basis: auto; }
}

/* ── Print ──────────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .ad-slot, .theme-btn, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ── Article (internal news page) ───────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--text-2); font-weight: 500; }
.breadcrumb a:hover { color: var(--accent); }

.article-page { padding-top: 2.25rem; }

.article-header {
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.article-title {
  margin-top: 0.75rem;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.article-body {
  max-width: 720px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
}
.article-body p { margin-bottom: 1.1rem; }

.article-source-box {
  max-width: 720px;
  margin-top: 1.75rem;
  padding: 1.15rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}
.article-source-note {
  font-size: 0.88rem;
  color: var(--text-2);
  max-width: 46ch;
}

.article-footer {
  max-width: 720px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.related-news { margin-top: 2.5rem; border-top: 1px solid var(--border); }

/* ── Live market bar ────────────────────────────────────────────────── */
.livebar {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.livebar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 38px;
  padding-block: 0.25rem;
}

.livebar-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.lb-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.75rem;
  white-space: nowrap;
}
.lb-stat[hidden] { display: none; }

.lb-label {
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
}

.lb-value {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.lb-fng-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-2);
}

.lb-fng.fng-extreme-fear .lb-value { color: var(--down); }
.lb-fng.fng-fear .lb-value { color: #fb923c; }
.lb-fng.fng-neutral .lb-value { color: var(--warn); }
.lb-fng.fng-greed .lb-value { color: var(--up); }
.lb-fng.fng-extreme-greed .lb-value { color: #34d399; }

.lb-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--down);
  flex-shrink: 0;
}

.lb-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--down);
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* Ticker */
.ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  width: max-content;
  animation: ticker-scroll 48s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.ticker-sym {
  font-weight: 700;
  color: var(--text-2);
  font-size: 0.7rem;
}

.ticker-price {
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ticker-chg {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
}
.ticker-chg.up { color: var(--up); }
.ticker-chg.down { color: var(--down); }

/* Price flash */
@keyframes flash-up {
  0% { background-color: var(--up-soft); }
  100% { background-color: transparent; }
}
@keyframes flash-down {
  0% { background-color: var(--down-soft); }
  100% { background-color: transparent; }
}

.price-up {
  border-radius: 4px;
  animation: flash-up 0.9s ease-out;
}
.price-down {
  border-radius: 4px;
  animation: flash-down 0.9s ease-out;
}

/* ── News media cards ───────────────────────────────────────────────── */
.news-card { padding: 0; overflow: hidden; }

.news-card:not(.has-media) { padding: 1.2rem 1.3rem; }

.news-card.has-media .news-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1.2rem 1.2rem;
}

.news-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-3);
  overflow: hidden;
}

.news-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover .news-media img { transform: scale(1.03); }

/* Sparkline on market cards */
.sparkline {
  display: block;
  margin-top: 0.35rem;
  opacity: 0.85;
}
.sparkline.up { color: var(--up); }
.sparkline.down { color: var(--down); }

.market-card { gap: 0.2rem; }

/* Article cover image */
.article-cover {
  margin: 0 0 1.5rem;
  max-width: 720px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-3);
}

.article-cover img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 820px) {
  .livebar-inner { flex-wrap: wrap; padding-block: 0.4rem; }
  .livebar-stats { width: 100%; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
  .ticker { width: 100%; }
  .lb-label { display: none; }
  .lb-fng-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .price-up, .price-down { animation: none; }
}

/* ── Market analysis ─────────────────────────────────────────────────── */
.analysis-preview,
.analysis-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
}

.analysis-preview {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 780px;
}

.analysis-preview-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-3);
}

.analysis-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.analysis-badge.sentiment-bullish { background: rgba(16,185,129,0.14); color: var(--up); }
.analysis-badge.sentiment-bearish { background: rgba(239,68,68,0.14); color: var(--down); }
.analysis-badge.sentiment-neutral { background: rgba(234,179,8,0.14); color: var(--warn); }

.analysis-source {
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.analysis-source.ai-gen { color: var(--accent); }
.analysis-source.ai-stats { color: var(--text-3); }

.analysis-preview-title,
.analysis-card-title {
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 750;
  margin: 0;
}
.analysis-card-title a { color: var(--text); }
.analysis-card-title a:hover { color: var(--accent); }

.analysis-preview-summary,
.analysis-card-summary {
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.75;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.analysis-list {
  display: grid;
  gap: 1.1rem;
}

.analysis-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.2s ease;
}
.analysis-card:hover { border-color: var(--accent); }

.analysis-empty { color: var(--text-3); }

.article-deck {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-top: 0.4rem;
}

/* ── Coin detail ─────────────────────────────────────────────────────── */
.coin-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.coin-detail-id { display: flex; align-items: center; gap: 0.9rem; }
.coin-detail-name { font-size: 1.7rem; font-weight: 800; margin: 0; }
.coin-detail-sym { font-size: 0.95rem; color: var(--text-3); font-weight: 650; }
.coin-detail-rank { color: var(--text-3); font-size: 0.82rem; margin: 0.2rem 0 0; }

.coin-detail-price { text-align: right; }
.coin-detail-price-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.coin-detail-price-change { font-weight: 700; font-size: 1rem; }
.coin-detail-price-change.up { color: var(--up); }
.coin-detail-price-change.down { color: var(--down); }

.coin-signal {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.coin-signal .signal-label { font-weight: 800; letter-spacing: 0.06em; }
.coin-signal[data-signal='buy'] .signal-label { color: var(--up); }
.coin-signal[data-signal='sell'] .signal-label { color: var(--down); }
.coin-signal[data-signal='neutral'] .signal-label { color: var(--warn); }
.coin-signal .signal-meta { color: var(--text-3); font-size: 0.78rem; }

.coin-chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1.3rem;
}
.coin-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}
.coin-chart-title { font-size: 1rem; font-weight: 700; margin: 0; }
.coin-chart-range { display: flex; gap: 0.35rem; }
.range-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 6px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.range-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.coin-chart { min-height: 240px; }
.coin-chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: var(--text-3);
  font-size: 0.85rem;
}
.price-chart { width: 100%; height: auto; display: block; }
.price-chart .chart-axis { fill: var(--text-3); font-size: 11px; }

.coin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.coin-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.coin-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 700;
}
.coin-stat-value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── AI summary box on articles ──────────────────────────────────────── */
.ai-summary-box {
  border: 1px dashed var(--border-strong, var(--border));
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.6rem 0;
}
.ai-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ai-summary-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}
.ai-summary-body {
  margin-top: 0.7rem;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.85;
  white-space: pre-wrap;
}

/* ── Admin extras ────────────────────────────────────────────────────── */
.admin-status {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 0.8rem;
}
.admin-status.error { color: var(--down); border-color: var(--down); }
.ai-writer { max-width: 760px; }
.ai-writer-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.ai-writer-row .form-group { flex: 1; min-width: 180px; }
.draft-item { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.3rem 0; }
.draft-meta { color: var(--text-3); font-size: 0.75rem; }
.badge-local {
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  text-transform: uppercase;
}
.btn-sm { padding: 0.25rem 0.7rem; font-size: 0.78rem; }
textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 640px) {
  .coin-detail-price { text-align: left; }
  .coin-detail-price-value { font-size: 1.5rem; }
}

/* ── Persian typeface (Vazirmatn — de-facto standard Persian web font) ─ */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html[lang='fa'],
[dir='rtl'] {
  --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
}

html[lang='fa'] body,
[dir='rtl'] body {
  font-family: var(--font);
  font-feature-settings: 'ss01';
  line-height: 1.9;
}

/* ── Analysis: glance + headings ─────────────────────────────────────── */
.glance-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.3rem;
}
.glance-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 0.8rem;
}
.glance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
}
.glance-item { display: flex; flex-direction: column; gap: 0.25rem; }
.glance-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.glance-value { font-weight: 750; font-size: 1.02rem; }
.glance-item .sparkline { margin-top: 0.15rem; }

.article-h3 {
  font-size: 1.12rem;
  font-weight: 750;
  margin: 1.6rem 0 0.5rem;
  color: var(--text);
}
.analysis-chart-box { max-width: 720px; }

/* ── Video desk ──────────────────────────────────────────────────────── */
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.video-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-3);
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.video-card:hover .video-thumb img { transform: scale(1.04); }
.video-thumb.no-img::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-3);
}

.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(10, 12, 16, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  padding-left: 3px;
  opacity: 0.9;
  transition: transform 0.2s ease;
}
.video-card:hover .video-play,
.video-hero:hover .video-play { transform: translate(-50%, -50%) scale(1.08); }
.video-play-lg { width: 64px; height: 64px; font-size: 1.3rem; }

.video-score {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-variant-numeric: tabular-nums;
}
[dir='rtl'] .video-score { right: auto; left: 0.55rem; }

.video-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.95rem 1.1rem 1.15rem;
}
.video-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-3);
}
.video-channel { font-weight: 750; color: var(--text-2); }
.video-badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.video-card-title { font-size: 0.98rem; line-height: 1.5; font-weight: 700; margin: 0; }
.video-card-title a { color: var(--text); }
.video-card-title a:hover { color: var(--accent); }
.video-take { font-size: 0.82rem; color: var(--text-2); margin: 0; line-height: 1.7; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}
.video-featured-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.video-hero {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
}
.video-hero-thumb { width: 100%; min-width: 0; min-height: 100%; }
.video-hero-body {
  padding: 1.5rem 1.6rem 1.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: flex-start;
}
[dir='rtl'] .video-hero-body { padding: 1.5rem 0 1.6rem 1.6rem; }
.video-hero-title { font-size: 1.45rem; line-height: 1.4; font-weight: 800; margin: 0; }
.video-hero-title a { color: var(--text); }
.video-hero-take { font-size: 0.92rem; color: var(--text-2); line-height: 1.8; margin: 0; }
.video-hero-summary {
  font-size: 0.88rem;
  color: var(--text-3);
  line-height: 1.8;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-page-header { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.55rem; }
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  margin-bottom: 1.6rem;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1.3rem;
  max-width: 780px;
}
.video-block-title { font-size: 1.05rem; font-weight: 800; margin: 0 0 0.8rem; display: flex; align-items: center; gap: 0.6rem; }
.video-block-body { font-size: 0.95rem; }
.video-opinion { border-left: 3px solid var(--accent); }
[dir='rtl'] .video-opinion { border-left: none; border-right: 3px solid var(--accent); }
.video-opinion-headline {
  font-size: 1.06rem;
  font-weight: 750;
  color: var(--accent);
  margin: 0 0 0.6rem;
  line-height: 1.6;
}

/* Comments */
.comments-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.comment-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
}
.comment-head { display: flex; align-items: baseline; gap: 0.7rem; margin-bottom: 0.3rem; }
.comment-head time { font-size: 0.72rem; color: var(--text-3); }
.comment-text { margin: 0; font-size: 0.9rem; line-height: 1.8; color: var(--text-2); white-space: pre-wrap; }
.comments-empty { color: var(--text-3); font-size: 0.88rem; }

.comment-form { display: flex; flex-direction: column; gap: 0.85rem; max-width: 560px; }
.comment-form-title { font-size: 1rem; font-weight: 750; margin: 0; }
.comment-form-hint { font-size: 0.82rem; color: var(--text-3); margin: 0; line-height: 1.7; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.comment-status { font-size: 0.85rem; margin: 0; padding: 0.5rem 0.8rem; border-radius: 6px; }
.comment-status.ok { background: var(--up-soft); color: var(--up); }
.comment-status.err { background: var(--down-soft); color: var(--down); }
.comment-count {
  font-size: 0.75rem;
  background: var(--surface-3);
  color: var(--text-2);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-weight: 700;
}

.comment-mod-item { padding: 0.5rem 0; line-height: 1.7; }
.mod-actions { display: flex; gap: 0.5rem; margin-top: 0.35rem; }

@media (max-width: 820px) {
  .video-hero { grid-template-columns: 1fr; }
  .video-hero-body, [dir='rtl'] .video-hero-body { padding: 1.2rem 1.3rem 1.4rem; }
}

/* ---- Share bar ---- */
.share-bar {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.share-inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.share-title {
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-inline-end: 0.4rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: transform 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
}
.share-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.share-x:hover { background: #111; border-color: #444; }
.share-fb:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-in:hover { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.share-tg:hover { background: #229ed9; border-color: #229ed9; color: #fff; }
.share-wa:hover { background: #25d366; border-color: #25d366; color: #fff; }
.share-copy.copied {
  color: var(--up);
  border-color: var(--up);
}
@media (max-width: 640px) {
  .share-title { width: 100%; margin-bottom: 0.2rem; }
}

/* ---- Cookie consent bar ---- */
.consent-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 95;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  padding: 0.75rem 0;
}
.consent-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.consent-inner p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-2);
  max-width: 64ch;
}
.consent-inner a { color: var(--accent); }
.consent-actions { display: flex; gap: 0.5rem; }

/* ---- Legal pages ---- */
.legal-wrap { max-width: 780px; }
.legal-header h1 { margin-bottom: 0.55rem; }
.legal-intro { color: var(--text-2); font-size: 1.03rem; line-height: 1.8; }
.legal-body h2 { margin: 1.8rem 0 0.5rem; font-size: 1.1rem; }
.legal-body p { color: var(--text-2); line-height: 1.8; }
.legal-updated { margin-top: 2.2rem; color: var(--text-3); font-size: 0.85rem; }

/* ---- Monetize admin + affiliate links ---- */
a.aff-link:not(.btn) {
  color: var(--accent);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
a.aff-link:not(.btn):hover { text-decoration-style: solid; }
.btn.aff-link {
  color: var(--accent-ink);
  text-decoration: none;
}
.aff-disclosure {
  margin-top: 1.3rem;
  font-size: 0.78rem;
  color: var(--text-3);
}
.monetize-h { margin-top: 1.6rem; }
.slot-row {
  display: grid;
  grid-template-columns: 92px 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.slot-row textarea { grid-column: 1 / -1; }
.slot-name {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-3);
  text-transform: uppercase;
}
.aff-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.6rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.aff-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.aff-fields > input,
.aff-fields > select {
  flex: 1 1 130px;
  min-width: 110px;
}
.aff-row select.aff-lang {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.88rem;
}
.aff-en {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-2);
  white-space: nowrap;
}
.slot-row input,
.slot-row textarea,
.aff-row input[type='text'],
.aff-row input[type='hidden'] + input {
  width: 100%;
}
.slot-row input,
.aff-row input[type='text'],
.slot-row textarea,
.aff-row input[type='text'] {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.88rem;
}
@media (max-width: 820px) {
  .aff-row { grid-template-columns: 1fr; }
  .slot-row { grid-template-columns: 1fr; }
}
