/* ==========================================================================
   statisticsonly.fans — design system
   ========================================================================== */

:root {
  --bg: #0a0e1a;
  --bg-soft: #0f1626;
  --surface: #131c30;
  --surface-2: #1a2540;
  --border: #233152;
  --border-soft: #1b2740;

  --text: #eef2fb;
  --text-soft: #aab4cc;
  --text-mute: #6b7790;

  --accent: #00aff0;          /* OnlyFans-style blue */
  --accent-2: #34e3c4;        /* teal */
  --accent-3: #ff5e9a;        /* pink */
  --accent-glow: rgba(0, 175, 240, 0.18);

  --good: #34e3c4;
  --warn: #ffd166;
  --bad: #ff6b6b;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --maxw: 1180px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 600px at 15% -8%, rgba(0, 175, 240, 0.14), transparent 60%),
    radial-gradient(900px 600px at 95% 0%, rgba(255, 94, 154, 0.10), transparent 55%),
    radial-gradient(800px 700px at 50% 110%, rgba(52, 227, 196, 0.08), transparent 60%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; color: var(--text-soft); }

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

.muted { color: var(--text-mute); }
.soft { color: var(--text-soft); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 26, 0.78);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  font-size: 1.12rem;
}
.brand:hover { color: var(--text); }
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}
.brand b { color: var(--accent); font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border);
  color: var(--text); border-radius: 8px;
  width: 42px; height: 38px; font-size: 1.2rem; cursor: pointer;
}

.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-picker { display: inline-flex; align-items: center; gap: 6px; }
.lang-picker .globe { color: var(--text-soft); font-size: 0.95rem; line-height: 1; }
.lang-picker select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 30px 7px 12px;
  font: inherit; font-size: 0.86rem; font-weight: 500;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23aab4cc' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.lang-picker select:hover { border-color: var(--accent); }
.lang-picker select option { background: var(--bg-soft); color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #04121c;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px var(--accent-glow); color: #04121c; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 36px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(52, 227, 196, 0.08);
  border: 1px solid rgba(52, 227, 196, 0.25);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 { max-width: 16ch; margin-left: auto; margin-right: auto; }
.hero h1 .grad {
  background: linear-gradient(110deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lead { max-width: 60ch; margin: 18px auto 28px; font-size: 1.12rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.updated-note { margin-top: 20px; font-size: 0.82rem; color: var(--text-mute); }

/* ---------- Section ---------- */
section { padding: 52px 0; }
.section-head { max-width: 70ch; margin-bottom: 30px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .kicker {
  color: var(--accent); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 10px;
}
.section-head p { font-size: 1.05rem; }

/* ---------- Stat hero grid ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.8;
}
.stat-card .num {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}
.stat-card .num .unit { color: var(--accent-2); }
.stat-card .label { font-size: 0.92rem; color: var(--text-soft); margin-top: 6px; font-weight: 500; }
.stat-card .sub { font-size: 0.78rem; color: var(--text-mute); margin-top: 8px; }

/* ---------- Cards / panels ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.panel h3 { margin-bottom: 6px; }
.panel .panel-sub { font-size: 0.85rem; color: var(--text-mute); margin-bottom: 18px; }

.chart-wrap { position: relative; height: 300px; }
.chart-wrap.tall { height: 360px; }

/* ---------- Mini fact cards ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.fact .big { font-size: 1.8rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.fact .txt { font-size: 0.9rem; color: var(--text-soft); margin-top: 6px; }
.fact:nth-child(3n+2) { border-left-color: var(--accent-2); }
.fact:nth-child(3n+3) { border-left-color: var(--accent-3); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 460px; }
thead th {
  text-align: left; padding: 14px 18px;
  background: var(--surface-2);
  color: var(--text); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
tbody td { padding: 13px 18px; border-top: 1px solid var(--border-soft); color: var(--text-soft); }
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody td:first-child { color: var(--text); font-weight: 600; }
.rank { color: var(--accent) !important; font-weight: 800 !important; }

/* ---------- Bars (inline) ---------- */
.barlist { display: flex; flex-direction: column; gap: 14px; }
.barrow { display: grid; grid-template-columns: 130px 1fr 54px; align-items: center; gap: 12px; font-size: 0.9rem; }
.barrow .name { color: var(--text-soft); }
.barrow .track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.barrow .fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.barrow .val { text-align: right; color: var(--text); font-weight: 600; }

/* ---------- Callout / disclaimer ---------- */
.callout {
  background: rgba(0, 175, 240, 0.06);
  border: 1px solid rgba(0, 175, 240, 0.25);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.callout.warn { background: rgba(255, 209, 102, 0.06); border-color: rgba(255, 209, 102, 0.28); }
.callout h3 { color: var(--text); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, rgba(0,175,240,0.12), rgba(52,227,196,0.10));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: 46px;
  text-align: center;
}

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.post-card .thumb {
  height: 140px;
  background: linear-gradient(130deg, var(--accent), var(--accent-3));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
}
.post-card .pc-body { padding: 20px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card .tag { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-2); font-weight: 700; }
.post-card h3 { margin: 8px 0; font-size: 1.12rem; color: var(--text); }
.post-card p { font-size: 0.9rem; flex: 1; }
.post-card .meta { font-size: 0.8rem; color: var(--text-mute); margin-top: 10px; }

/* ---------- Article ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 48px 22px 20px; }
.article .tag { color: var(--accent-2); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.article h1 { margin: 14px 0 12px; }
.article .byline { color: var(--text-mute); font-size: 0.9rem; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article h2 { margin-top: 40px; }
.article h3 { margin-top: 28px; color: var(--text); }
.article p, .article li { color: var(--text-soft); font-size: 1.05rem; }
.article ul, .article ol { padding-left: 22px; margin-bottom: 1.2rem; }
.article li { margin-bottom: 8px; }
.article blockquote {
  margin: 24px 0; padding: 14px 22px;
  border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}
.article .stat-pop {
  display: block; font-size: 2.2rem; font-weight: 800; color: var(--accent-2); letter-spacing: -0.02em;
}

/* ---------- Page header (subpages) ---------- */
.page-head { padding: 56px 0 18px; }
.page-head h1 { margin-bottom: 8px; }
.page-head .lead { font-size: 1.08rem; max-width: 60ch; }

.legal { max-width: 820px; margin: 0 auto; padding: 10px 0 30px; }
.legal h2 { margin-top: 36px; font-size: 1.4rem; }
.legal h3 { margin-top: 24px; }
.legal p, .legal li { color: var(--text-soft); }
.legal ul { padding-left: 22px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
  padding: 50px 0 30px;
  margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-mute); }
.footer-grid a { display: block; color: var(--text-soft); font-size: 0.92rem; margin-bottom: 9px; }
.footer-grid a:hover { color: var(--accent); }
.footer-about p { font-size: 0.9rem; }
.footer-bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.84rem; color: var(--text-mute);
}

/* ---------- Confidence badges ---------- */
.badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  vertical-align: middle;
}
.badge-verified { color: #04121c; background: var(--accent-2); }
.badge-est { color: var(--warn); background: rgba(255, 209, 102, 0.12); border: 1px solid rgba(255, 209, 102, 0.4); }
.badge-proj { color: var(--text-soft); background: rgba(91, 107, 143, 0.18); border: 1px solid var(--border); }

.src {
  font-size: 0.78rem;
  color: var(--text-mute);
  margin-top: 12px;
}
.src strong { color: var(--text-soft); font-weight: 600; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 10px 0 0; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
}
.tl-item { position: relative; padding: 0 0 26px 4px; }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-year { font-weight: 800; color: var(--accent-2); font-size: 0.92rem; letter-spacing: 0.02em; }
.tl-item h4 { margin: 2px 0 4px; font-size: 1.02rem; color: var(--text); }
.tl-item p { margin: 0; font-size: 0.92rem; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
}
.faq summary {
  list-style: none; cursor: pointer;
  padding: 16px 0; font-weight: 600; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-bottom: 1px solid var(--border-soft); }
.faq .faq-body { padding: 14px 0 18px; }
.faq .faq-body p { margin: 0; font-size: 0.95rem; }

/* ---------- Definition / nuance box ---------- */
.note-inline {
  font-size: 0.82rem; color: var(--text-mute);
  border-left: 2px solid var(--accent); padding-left: 12px; margin: 14px 0 0;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] .fact { border-left: none; border-right: 3px solid var(--accent); }
[dir="rtl"] .fact:nth-child(3n+2) { border-right-color: var(--accent-2); }
[dir="rtl"] .fact:nth-child(3n+3) { border-right-color: var(--accent-3); }
[dir="rtl"] .post-card .tag { text-align: right; }
[dir="rtl"] .article blockquote { border-left: none; border-right: 3px solid var(--accent); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
[dir="rtl"] .note-inline { border-left: none; border-right: 2px solid var(--accent); padding-left: 0; padding-right: 12px; }
[dir="rtl"] .timeline { padding-left: 0; padding-right: 30px; }
[dir="rtl"] .timeline::before { left: auto; right: 7px; }
[dir="rtl"] .tl-item::before { left: auto; right: -30px; }
[dir="rtl"] .tl-item { padding: 0 4px 26px 0; }
[dir="rtl"] thead th { text-align: right; }
[dir="rtl"] tbody td { text-align: right; }
[dir="rtl"] .barrow .val { text-align: left; }
[dir="rtl"] .lang-picker select { padding: 7px 12px 7px 30px; background-position: left 12px center; }
[dir="rtl"] .faq summary { text-align: right; }
[dir="rtl"] .legal ul, [dir="rtl"] .article ul, [dir="rtl"] .article ol { padding-left: 0; padding-right: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .post-grid, .facts { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 8px 22px 18px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; width: 100%; border-bottom: 1px solid var(--border-soft); }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .stat-grid, .grid-2, .grid-3, .post-grid, .facts { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 22px; }
  .barrow { grid-template-columns: 96px 1fr 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
