/* ════════════════════════════════════════
   NairaForum — Nairaland-Style Layout v3
   Clean, compact, text-heavy, table-like
   ════════════════════════════════════════ */

:root {
  --green: #2ecc71;
  --green-dark: #27ae60;
  --blue: #3498db;
  --orange: #f39c12;
  --red: #e74c3c;
  --gold: #ffd700;
  --radius: 4px;
  --shadow: 0 1px 4px rgba(0,0,0,0.3);
  --transition: 0.15s ease;
}

[data-theme="dark"] {
  --bg: #0f0f1a;
  --bg2: #161626;
  --bg3: #1e1e32;
  --text: #d8d8e8;
  --text-muted: #7a7a9a;
  --text-link: #4ec9ff;
  --border: #2a2a42;
  --input-bg: #0a0a14;
  --hover: rgba(255,255,255,0.04);
  --row-alt: rgba(255,255,255,0.02);
}

[data-theme="light"] {
  --bg: #f0f0f0;
  --bg2: #ffffff;
  --bg3: #e8e8e8;
  --text: #1a1a2e;
  --text-muted: #666680;
  --text-link: #0066cc;
  --border: #d0d0e0;
  --input-bg: #ffffff;
  --hover: rgba(0,0,0,0.04);
  --row-alt: rgba(0,0,0,0.02);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  overflow-x: hidden;
  width: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 8px; }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--green); color: #000;
  padding: 10px 18px; border-radius: var(--radius);
  font-weight: 700; font-size: 13px; z-index: 9999;
  box-shadow: var(--shadow); transform: translateY(100px);
  opacity: 0; transition: all 0.3s ease;
}
#toast.show { transform: translateY(0); opacity: 1; }

/* ── Header ── */
.site-header {
  background: var(--bg2);
  border-bottom: 3px solid var(--green);
  position: sticky; top: 0; z-index: 500;
  overflow: visible;
}
.header-inner {
  display: flex; align-items: center;
  gap: 10px; padding: 6px 8px;
  position: relative;
}
.logo { font-size: 20px; font-weight: 800; flex-shrink: 0; }
.logo-naira { color: var(--green); }
.logo-forum { color: var(--text); }
.hamburger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 20px; cursor: pointer;
  padding: 4px 6px; order: -1;
}
.nav-links {
  display: flex; align-items: center;
  gap: 4px; margin-left: auto; flex-wrap: nowrap;
}
.nav-links > a {
  color: var(--text); font-size: 12px;
  padding: 4px 7px; border-radius: var(--radius);
  white-space: nowrap;
}
.nav-links > a:hover { background: var(--hover); text-decoration: none; }
.nav-dropdown-lite { position: relative; overflow: visible; }
.nav-dropdown-lite > button {
  background: none;
  border: none;
  color: var(--text);
  font-size: 12px;
  padding: 4px 7px;
  border-radius: var(--radius);
  white-space: nowrap;
  cursor: pointer;
}
.nav-dropdown-lite > button:hover { background: var(--hover); }
.nav-dropdown-menu-lite {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 2px);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  box-shadow: var(--shadow);
  z-index: 601;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nav-dropdown-lite.open .nav-dropdown-menu-lite { display: block; }
.nav-dropdown-lite:hover .nav-dropdown-menu-lite { display: block; }
.nav-dropdown-menu-lite a {
  display: block;
  padding: 7px 14px;
  color: var(--text);
  font-size: 12px;
}
.nav-dropdown-menu-lite a:hover { background: var(--hover); text-decoration: none; }
.btn-new-topic {
  background: var(--green) !important; color: #000 !important;
  font-weight: 700 !important; padding: 4px 10px !important;
  border-radius: var(--radius) !important; font-size: 12px !important;
}
.btn-login { border: 1px solid var(--green) !important; color: var(--green) !important; padding: 4px 10px !important; border-radius: var(--radius) !important; }
.btn-register { background: var(--green) !important; color: #000 !important; font-weight: 700 !important; padding: 4px 10px !important; border-radius: var(--radius) !important; }
.nav-icon-link { position: relative; font-size: 14px; padding: 4px 6px !important; }
.nav-icon-link .badge {
  position: absolute; top: 0; right: 0;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 0 3px; border-radius: 8px; min-width: 14px; text-align: center;
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  vertical-align: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.verified-badge.annual-badge {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #5a2d00;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}
.username-colored {
  font-weight: 700;
}
.password-reveal-wrap { position: relative; display: flex; align-items: center; }
.password-reveal-input { width: 100%; padding-right: 42px !important; box-sizing: border-box; }
.password-reveal-button {
  position: absolute; right: 12px; background: none; border: none;
  cursor: pointer; display: flex; align-items: center; padding: 4px;
}
.password-reveal-button:focus { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
.nav-username { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.nav-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; }

/* Dropdown */
.dropdown, .nav-dropdown-lite { position: relative; z-index: 1; overflow: visible; }
.dropdown.open, .nav-dropdown-lite.open { z-index: 2; }
.dropdown-btn {
  background: none; border: none; color: var(--text);
  cursor: pointer; font-size: 12px;
  display: flex; align-items: center; gap: 4px;
  padding: 4px 7px; border-radius: var(--radius);
}
.dropdown-btn:hover { background: var(--hover); }
.dropdown-menu {
  display: none; position: absolute; right: 0;
  top: calc(100% + 2px); background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 170px; box-shadow: var(--shadow); z-index: 600;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* Show on hover (desktop) or .open class (sticky) */
.dropdown:hover .dropdown-menu { display: block; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 7px 14px;
  color: var(--text); font-size: 12px;
}
.dropdown-menu a:hover { background: var(--hover); text-decoration: none; }
.dropdown-menu hr { border-color: var(--border); margin: 3px 0; }
.mod-link { color: var(--green) !important; }
.logout-link { color: var(--red) !important; }

/* Theme toggle */
.theme-toggle {
  background: none; border: 1px solid var(--border);
  color: var(--text); padding: 3px 6px;
  border-radius: var(--radius); cursor: pointer; font-size: 13px;
}

/* Moderator assignment page */
.assign-mod-page {
  padding: 8px 0 20px;
}
.assign-mod-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.10), rgba(52, 152, 219, 0.08));
}
.assign-mod-eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.assign-mod-hero h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 22px;
}
.assign-mod-hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.assign-mod-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.assign-mod-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg2);
  box-shadow: var(--shadow);
}
.assign-mod-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.assign-mod-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.assign-mod-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.assign-mod-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.assign-mod-actions {
  margin-top: 12px;
}
.assign-mod-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.assign-mod-btn:hover {
  opacity: 0.92;
}

/* Mobile Nav */
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 498; }
@media (max-width: 700px) {
  .hamburger { display: block; }
  .nav-links {
    position: fixed; top: 0; left: -260px; width: 260px;
    height: 100vh; background: var(--bg2);
    border-right: 1px solid var(--border);
    flex-direction: column; align-items: flex-start;
    gap: 1px; padding: 50px 12px 20px;
    overflow-y: auto; z-index: 499;
    transition: left 0.3s ease; margin: 0;
  }
  .nav-links.open { left: 0; }
  .nav-links > a { width: 100%; padding: 9px 12px; font-size: 13px; }
  .nav-overlay.open { display: block; }
  .dropdown { width: 100%; }
  .dropdown-btn { width: 100%; justify-content: flex-start; padding: 9px 12px; }
  .dropdown-menu { position: static; box-shadow: none; border: none; border-left: 2px solid var(--green); margin-left: 10px; }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown.open .dropdown-menu { display: block; }
  .nav-dropdown-lite { width: 100%; }
  .nav-dropdown-lite > button { width: 100%; text-align: left; padding: 9px 12px; }
  .assign-mod-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }
  .assign-mod-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .assign-mod-card {
    padding: 12px;
  }
  .assign-mod-actions {
    margin-top: 10px;
  }
  .nav-dropdown-menu-lite {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--green);
    margin-left: 10px;
    max-height: 220px;
  }
}

/* ── Alerts ── */
.flash-container { position: fixed; top: 55px; right: 10px; z-index: 700; max-width: 340px; }
.alert {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; padding: 10px 12px; border-radius: var(--radius);
  margin-bottom: 6px; font-size: 12px; box-shadow: var(--shadow);
}
.alert-success { background: rgba(46,204,113,0.15); border: 1px solid var(--green); color: var(--green); }
.alert-danger  { background: rgba(231,76,60,0.15);  border: 1px solid var(--red);   color: #ff6b6b; }
.alert-warning { background: rgba(243,156,18,0.15); border: 1px solid var(--orange);color: var(--orange); }
.alert-info    { background: rgba(52,152,219,0.15); border: 1px solid var(--blue);  color: var(--blue); }
.close-alert { background: none; border: none; color: inherit; cursor: pointer; font-size: 12px; opacity: 0.7; }

/* ── Main Layout — Nairaland style full width ── */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 10px;
  padding: 10px 0;
}
/* Hide sidebar on homepage via body class */
body.home-page .main-layout {
  grid-template-columns: 1fr;
}
body.home-page .sidebar {
  display: none;
}
@media (max-width: 800px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 8px; }
.widget {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px;
}
.widget h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 8px; font-weight: 700; }
.cat-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 12px;
}
.cat-link:last-child { border-bottom: none; }
.cat-link:hover { color: var(--green); text-decoration: none; }
.cat-count { background: var(--hover); padding: 1px 5px; border-radius: 8px; font-size: 10px; }
.premium-widget { border-color: var(--gold) !important; }
.premium-widget h4 { color: var(--gold) !important; }
.premium-active-widget { background: rgba(255,215,0,0.06) !important; border-color: var(--gold) !important; text-align: center; }
.btn-premium-small { display: inline-block; padding: 4px 10px; background: var(--gold); color: #000; border-radius: var(--radius); font-weight: 700; font-size: 11px; margin-top: 5px; }
.btn-advertise-small { display: inline-block; padding: 4px 10px; background: var(--orange); color: #000; border-radius: var(--radius); font-weight: 700; font-size: 11px; margin-top: 5px; }

/* ── Stats Bar — Nairaland style ── */
.stats-bar {
  background: var(--bg2); border: 1px solid var(--border);
  padding: 6px 10px; margin-bottom: 8px;
  display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px;
  border-radius: var(--radius);
}
.stat { display: flex; align-items: center; gap: 4px; }
.stat.online strong { color: var(--green); }
.online-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid var(--green); }

/* ── 9japosh CATEGORY TABLE ── */
.section { margin-bottom: 14px; }
.section-title-text {
  display: inline-flex;
  align-items: center;
  flex: 1;                          /* ✅ takes up remaining space */
  white-space: nowrap;
}
.section-title-with-icons {
  display: flex;
  align-items: center;
  justify-content: space-between;  /* ✅ text left, icons right */
  flex-wrap: nowrap;                /* ✅ never wrap to new line */
  gap: 8px;
}
.section-title-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;                   /* ✅ icons never shrink or wrap */
}

.section-title-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;                      /* ✅ smaller on all screens */
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  color: #000;
  transition: transform 0.2s ease, background 0.2s ease;
}

.section-title-icons a:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.2);
}

.section-title-icons svg {
  width: 10px;                      /* ✅ smaller icons */
  height: 10px;
  fill: currentColor;
}



/* Category table — plain text Nairaland style */
.category-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg2); border: 1px solid var(--border);
  border-top: none; margin-bottom: 14px;
}
.category-table tr { border-bottom: 1px solid var(--border); }
.category-table tr:last-child { border-bottom: none; }
.category-table tr:nth-child(even) { background: var(--row-alt); }
.category-table tr:hover { background: var(--hover); }
.cat-name-cell { padding: 7px 10px; vertical-align: middle; }
.cat-name-link { font-size: 13px; font-weight: 700; color: var(--text-link); }
.cat-name-link:hover { text-decoration: underline; }
.cat-desc { font-size: 11px; color: var(--text-muted); }
.cat-stats-cell {
  width: 180px; padding: 7px 10px;
  text-align: right; vertical-align: middle;
  font-size: 11px; color: var(--text-muted); white-space: nowrap;
}
.premium-tag { font-size: 10px; color: var(--gold); font-weight: 700; margin-left: 4px; }

/* ── Topic List — single column title only ── */
.topic-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg2); border: 1px solid var(--border);
  border-top: none; margin-bottom: 14px;
}
.topic-table tr { border-bottom: 1px solid var(--border); }
.topic-table tr:last-child { border-bottom: none; }
.topic-table tr:nth-child(even) { background: var(--row-alt); }
.topic-table tr:hover { background: var(--hover); }
.topic-table td { padding: 7px 10px; vertical-align: middle; font-size: 12px; }
.topic-title-cell { width: 100%; }
.topic-title-link { font-weight: 700; color: var(--text-link); font-size: 13px; }
.topic-title-link:hover { text-decoration: underline; }
.topic-sub { font-size: 11px; color: var(--text-muted); margin-left: 6px; }
.topic-sub a { color: var(--text-muted); }
.topic-sub a:hover { color: var(--green); }
.topic-count-cell { width: 80px; text-align: center; color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.topic-count-cell strong { display: block; font-size: 13px; color: var(--text); }
.topic-last-cell { width: 120px; text-align: right; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.topic-last-cell a { color: var(--text-link); }
.pin-badge { color: var(--gold); font-size: 11px; margin-right: 3px; }
.lock-badge { color: var(--text-muted); font-size: 11px; margin-right: 3px; }
.featured-badge { color: var(--gold); font-size: 11px; }
.tag { background: rgba(52,152,219,0.15); color: var(--blue); padding: 1px 5px; border-radius: 8px; font-size: 10px; margin-left: 3px; }
/* Online users list */
.online-list { background: var(--bg2); border: 1px solid var(--border); border-top: none; padding: 8px 10px; font-size: 12px; color: var(--text-muted); line-height: 1.8; }
.online-list a { color: var(--text-link); font-size: 12px; }

/* Trending */
.trending-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg2); border: 1px solid var(--border);
  border-top: none; margin-bottom: 14px;
}
.trending-table tr { border-bottom: 1px solid var(--border); }
.trending-table tr:last-child { border-bottom: none; }
.trending-table tr:nth-child(even) { background: var(--row-alt); }
.trending-table tr:hover { background: var(--hover); }
.trending-table td { padding: 6px 10px; font-size: 12px; vertical-align: middle; }
.trend-rank { width: 28px; font-weight: 800; color: var(--green); font-size: 14px; }
.trend-views { width: 80px; text-align: right; color: var(--text-muted); font-size: 11px; }

/* ── Category Page Header ── */
.category-header {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.cat-icon-lg { font-size: 28px; flex-shrink: 0; }
.category-header h1 { font-size: 16px; margin-bottom: 2px; }
.category-header p { font-size: 12px; color: var(--text-muted); }
.btn-new-topic-lg { background: var(--green); color: #000; font-weight: 700; padding: 5px 14px; border-radius: var(--radius); font-size: 12px; white-space: nowrap; margin-left: auto; }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--green); }

/* ── Topic Header ── */
.topic-header { margin-bottom: 12px; }
.topic-header h1 { font-size: 16px; line-height: 1.4; margin-bottom: 6px; }
.topic-meta-bar { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.topic-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.btn-action {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 3px 9px; border-radius: var(--radius);
  cursor: pointer; font-size: 11px; text-decoration: none; display: inline-block;
}
.btn-action:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.btn-subscribe.subscribed { border-color: var(--green); color: var(--green); }
.btn-mod { border-color: var(--orange); color: var(--orange); }

/* Share buttons */
.share-buttons { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.share-label { font-size: 11px; color: var(--text-muted); }
.share-btn { padding: 3px 8px; border-radius: var(--radius); font-size: 11px; font-weight: 700; border: none; cursor: pointer; text-decoration: none; display: inline-block; }
.share-btn:hover { opacity: 0.85; text-decoration: none; }
.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;
}
.topic-hero .share-buttons {
  gap: 6px;
}
.topic-hero .share-label {
  margin-right: 2px;
  font-weight: 800;
}
.topic-hero .share-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  line-height: 1;
  text-align: center;
}
.topic-hero .copy-link {
  font-size: 0;
}
.topic-hero .copy-link::before {
  content: "";
  width: 14px;
  height: 14px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.07 0l2.12-2.12a5 5 0 0 0-7.07-7.07L11 4.93'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.07 0L4.81 13.12a5 5 0 0 0 7.07 7.07L13 19.07'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.07 0l2.12-2.12a5 5 0 0 0-7.07-7.07L11 4.93'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.07 0L4.81 13.12a5 5 0 0 0 7.07 7.07L13 19.07'/%3E%3C/svg%3E") center / contain no-repeat;
}
.topic-hero .share-icon {
  width: 15px;
  height: 15px;
  display: block;
}
.topic-hero .facebook .share-icon {
  width: 16px;
  height: 16px;
}
.topic-hero .whatsapp .share-icon {
  width: 17px;
  height: 17px;
}
.topic-hero .twitter .share-icon {
  width: 14px;
  height: 14px;
}
.topic-hero .copy-link {
  color: #344054;
}
.topic-hero .whatsapp {
  color: #25d366;
}
.topic-hero .twitter {
  color: #111;
}
.topic-hero .facebook {
  color: #1877f2;
}
.topic-hero .copy-link::before {
  font-size: 13px;
  font-weight: 900;
}
.whatsapp { background: #25D366; color: #fff; }
.twitter { background: #1DA1F2; color: #fff; }
.facebook { background: #1877F2; color: #fff; }
.copy-link { background: var(--border); color: var(--text); }

/* ── Poll ── */
.poll-box { background: var(--bg2); border: 1px solid var(--blue); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; }
.poll-box h3 { font-size: 13px; margin-bottom: 10px; }
.poll-option { margin-bottom: 10px; }
.poll-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; }
.poll-bar-wrap { background: var(--hover); border-radius: 2px; height: 18px; position: relative; margin-top: 3px; overflow: hidden; }
.poll-bar { background: var(--blue); height: 100%; transition: width 0.4s ease; }
.poll-bar-wrap span { position: absolute; right: 6px; top: 2px; font-size: 10px; color: var(--text); font-weight: 600; }
.btn-vote { background: var(--blue); color: #fff; border: none; padding: 5px 16px; border-radius: var(--radius); cursor: pointer; margin-top: 6px; font-size: 12px; }

/* ── Post Cards — Nairaland style ── */
.post-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex;
  margin-bottom: 6px; overflow: hidden;
}
.post-card:target { border-color: var(--green); }
.post-card.first-post { border-top: 2px solid var(--green); }
.post-author {
  min-width: 130px; max-width: 130px;
  background: var(--bg3); padding: 10px 8px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 3px; border-right: 1px solid var(--border); flex-shrink: 0;
}
.post-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); margin-bottom: 4px; }
.author-name { font-size: 12px; font-weight: 700; color: var(--text); }
.admin-name { color: var(--red) !important; }
.mod-name { color: var(--green) !important; }
.author-posts, .author-loc, .author-rep { font-size: 10px; color: var(--text-muted); }
.role-badge { font-size: 9px; padding: 1px 4px; border-radius: 2px; font-weight: 700; margin-top: 1px; }
.role-admin { background: var(--red); color: #fff; }
.role-moderator { background: var(--green); color: #000; }
.post-body { flex: 1; padding: 10px 12px; min-width: 0; }
.post-meta-top { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--text-muted); margin-bottom: 8px; flex-wrap: wrap; }
.post-number { font-weight: 700; }
.edited-label { color: var(--orange); font-size: 10px; }
.post-permalink { color: var(--text-muted); font-size: 11px; margin-left: auto; }
.post-permalink:hover { color: var(--green); }

/* BBCode content */
.bbcode-content { font-size: 13px; line-height: 1.65; word-wrap: break-word; overflow-wrap: break-word; }
.bbcode-content blockquote.bbquote { background: var(--hover); border-left: 3px solid var(--green); padding: 6px 10px; margin: 8px 0; border-radius: 0 var(--radius) var(--radius) 0; font-size: 12px; color: var(--text-muted); }
.bbcode-content blockquote.bbquote cite { display: block; font-size: 11px; color: var(--green); margin-bottom: 3px; font-style: normal; font-weight: 700; }
.bbcode-content pre.bbcode { background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; overflow-x: auto; font-family: 'Courier New', monospace; font-size: 12px; margin: 8px 0; }
.bbcode-content details.bbspoiler { background: var(--hover); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; margin: 6px 0; }
.bbcode-content details.bbspoiler summary { cursor: pointer; font-weight: 700; color: var(--orange); font-size: 12px; }
.post-img { max-width: 100%; max-height: 400px; border-radius: var(--radius); margin: 6px 0; border: 1px solid var(--border); }
.post-signature { font-size: 11px; color: var(--text-muted); border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 6px; font-style: italic; }
.post-actions { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.btn-react { background: var(--bg3); border: 1px solid var(--border); color: var(--text-muted); padding: 3px 8px; border-radius: var(--radius); cursor: pointer; font-size: 11px; }
.btn-react:hover { border-color: var(--green); color: var(--text); }
.btn-react.active { color: var(--green); border-color: var(--green); }
.btn-react.active-dislike { color: var(--red); border-color: var(--red); }
.likes-display { font-size: 11px; color: var(--text-muted); }

@media (max-width: 500px) {
  .post-card { flex-direction: column; }
  .post-author { min-width: unset; max-width: unset; flex-direction: row; justify-content: flex-start; gap: 10px; border-right: none; border-bottom: 1px solid var(--border); padding: 8px 10px; }
  .post-avatar { width: 36px; height: 36px; margin-bottom: 0; }
}

/* ── Reply / Editor ── */
.reply-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-top: 12px; }
.reply-section h3 { font-size: 13px; margin-bottom: 10px; }
.editor-toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.editor-toolbar button { background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 3px 8px; border-radius: var(--radius); cursor: pointer; font-size: 12px; }
.editor-toolbar button:hover { border-color: var(--green); color: var(--green); }
.reply-textarea { width: 100%; background: var(--input-bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; font-family: inherit; resize: vertical; min-height: 100px; }
.reply-textarea:focus { border-color: var(--green); outline: none; }
.reply-footer { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.btn-submit-reply { background: var(--green); color: #000; border: none; padding: 7px 20px; border-radius: var(--radius); font-weight: 700; cursor: pointer; font-size: 13px; }
.char-count { font-size: 11px; color: var(--text-muted); }
.locked-notice, .login-prompt { background: var(--hover); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; text-align: center; color: var(--text-muted); margin-top: 12px; font-size: 12px; }

/* ── Pagination ── */
.pagination { display: flex; gap: 3px; flex-wrap: wrap; margin: 12px 0; align-items: center; }
.page-btn { background: var(--bg2); border: 1px solid var(--border); color: var(--text); padding: 4px 10px; border-radius: var(--radius); font-size: 12px; }
.page-btn:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.page-btn.active { background: var(--green); color: #000; border-color: var(--green); font-weight: 700; }
.page-ellipsis { padding: 4px 3px; color: var(--text-muted); font-size: 12px; }

/* ── Auth Forms ── */
.auth-card { max-width: 420px; margin: 30px auto; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.auth-card h2 { text-align: center; margin-bottom: 20px; font-size: 18px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; background: var(--input-bg); border: 1px solid var(--border); color: var(--text); padding: 8px 10px; border-radius: var(--radius); font-size: 13px; font-family: inherit; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--green); outline: none; }
.btn-submit { width: 100%; background: var(--green); color: #000; border: none; padding: 10px; border-radius: var(--radius); font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 4px; }
.btn-submit:hover { background: var(--green-dark); }
.btn-cancel { color: var(--text-muted); font-size: 12px; }
.auth-links { text-align: center; margin-top: 14px; font-size: 12px; color: var(--text-muted); }
.auth-links a { display: block; margin: 3px 0; }

/* ── Premium ── */
.premium-hero { text-align: center; padding: 30px 0 20px; }
.premium-hero h1 { font-size: 26px; margin-bottom: 8px; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.plan-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 16px; text-align: center; position: relative; }
.plan-card.popular { border-color: var(--gold); }
.popular-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #000; font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 8px; white-space: nowrap; }
.plan-price { font-size: 24px; font-weight: 800; color: var(--green); margin: 10px 0 4px; }
.plan-price span { font-size: 12px; color: var(--text-muted); }
.features-list { list-style: none; text-align: left; margin: 12px 0; }
.features-list li { padding: 4px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
.btn-buy-plan { background: var(--green); color: #000; border: none; padding: 10px 20px; border-radius: var(--radius); font-weight: 700; cursor: pointer; font-size: 13px; width: 100%; margin-top: 10px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.feature-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; text-align: center; }
.feature-item span { font-size: 26px; display: block; margin-bottom: 6px; }
.feature-item h4 { font-size: 12px; margin-bottom: 3px; }
.feature-item p { font-size: 11px; color: var(--text-muted); }

/* ── Dashboard ── */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px; }
.dash-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 3px; }
.dash-card span { font-size: 22px; }
.dash-card strong { font-size: 18px; color: var(--green); }
.dash-card small { font-size: 11px; color: var(--text-muted); }
.dash-card.coins { border-color: var(--gold); }
.dash-card.premium-card { border-color: var(--gold); }
.quick-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.action-btn { background: var(--bg2); border: 1px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: var(--radius); font-size: 12px; }
.action-btn:hover { color: var(--green); border-color: var(--green); text-decoration: none; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 600px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; }
.dash-section h2 { font-size: 13px; margin-bottom: 10px; color: var(--green); font-weight: 700; }
.dash-topic { border-bottom: 1px solid var(--border); padding: 6px 0; }
.dash-topic:last-child { border-bottom: none; }
.dash-topic a { font-size: 12px; color: var(--text); }
.dash-topic a:hover { color: var(--green); }
.dash-topic-meta { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.status-active, .status-success { color: var(--green); font-weight: 700; }
.status-pending { color: var(--orange); font-weight: 700; }
.status-rejected, .status-failed { color: var(--red); font-weight: 700; }
.txn-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.txn-table th { text-align: left; padding: 6px 8px; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: 11px; }
.txn-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.txn-type { background: var(--hover); padding: 1px 5px; border-radius: 3px; font-size: 10px; font-weight: 700; }

/* ── Profile ── */
.profile-header { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green); flex-shrink: 0; }
.profile-info { flex: 1; min-width: 160px; }
.profile-info h1 { font-size: 18px; margin-bottom: 3px; }
.profile-bio { color: var(--text-muted); font-size: 12px; margin-bottom: 6px; }
.profile-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.profile-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.pstat { display: flex; flex-direction: column; align-items: center; }
.pstat strong { font-size: 16px; color: var(--green); }
.pstat span { font-size: 10px; color: var(--text-muted); }
.ban-badge { background: var(--red); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 3px; }
.profile-actions { display: flex; flex-direction: column; gap: 6px; }
.btn-pm-user { background: var(--blue); color: #fff; padding: 6px 12px; border-radius: var(--radius); font-size: 12px; font-weight: 700; }
.btn-ban { background: var(--red); color: #fff; border: none; padding: 6px 12px; border-radius: var(--radius); cursor: pointer; font-size: 12px; }
.btn-ignore { background: var(--hover); border: 1px solid var(--border); color: var(--text-muted); padding: 6px 12px; border-radius: var(--radius); font-size: 12px; cursor: pointer; }
.btn-ignore.ignored { border-color: var(--red); color: var(--red); }
.signature-box { background: var(--hover); border: 1px dashed var(--border); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 14px; font-size: 11px; color: var(--text-muted); }
.profile-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .profile-tabs { grid-template-columns: 1fr; } }
.tab-section h2 { font-size: 13px; margin-bottom: 10px; color: var(--green); font-weight: 700; }
.recent-post-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 6px; }
.recent-post-topic a { font-weight: 700; font-size: 12px; }
.recent-post-excerpt { font-size: 11px; color: var(--text-muted); margin: 3px 0; }
.recent-post-meta { font-size: 10px; color: var(--text-muted); }

/* ── Settings ── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.settings-card h2 { font-size: 14px; margin-bottom: 14px; }
.settings-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green); display: block; margin-bottom: 6px; }

/* ── Coins Shop ── */
.coins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.coin-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 12px; text-align: center; position: relative; }
.coin-card.has-bonus { border-color: var(--gold); }
.bonus-tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #000; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 8px; white-space: nowrap; }
.coin-amount { font-size: 22px; font-weight: 800; color: var(--gold); margin: 6px 0; }
.coin-price { font-size: 16px; font-weight: 700; color: var(--green); }
.coin-base { font-size: 11px; color: var(--text-muted); margin: 3px 0 10px; }
.btn-buy-coins { background: var(--green); color: #000; border: none; padding: 6px 16px; border-radius: var(--radius); font-weight: 700; cursor: pointer; width: 100%; font-size: 12px; }
.coins-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.coins-guide h4 { color: var(--green); margin-bottom: 6px; font-size: 12px; }
.coins-guide ul { list-style: none; font-size: 12px; }
.coins-guide li { padding: 3px 0; color: var(--text-muted); border-bottom: 1px solid var(--border); }

/* ── Affiliate ── */
.aff-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.aff-stat { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; text-align: center; flex: 1; min-width: 100px; display: flex; flex-direction: column; gap: 3px; }
.aff-stat.earnings { border-color: var(--gold); }
.aff-stat code { font-size: 16px; color: var(--green); font-weight: 700; }
.ref-link-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; }
.ref-link-row { display: flex; gap: 6px; margin-top: 6px; }
.ref-link-row input { flex: 1; background: var(--input-bg); border: 1px solid var(--border); color: var(--text); padding: 6px 10px; border-radius: var(--radius); font-size: 12px; }
.ref-link-row button { background: var(--green); color: #000; border: none; padding: 6px 12px; border-radius: var(--radius); cursor: pointer; font-weight: 700; font-size: 12px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.step { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; text-align: center; }
.step span { font-size: 22px; font-weight: 800; color: var(--green); display: block; }
.step p { font-size: 11px; margin-top: 6px; color: var(--text-muted); }

/* ── Admin ── */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 16px; }
.admin-stat { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.admin-stat span { font-size: 20px; }
.admin-stat strong { font-size: 18px; }
.admin-stat small { font-size: 10px; color: var(--text-muted); }
.admin-stat.green strong{color:var(--green)}.admin-stat.blue strong{color:var(--blue)}.admin-stat.orange strong{color:var(--orange)}.admin-stat.gold strong{color:var(--gold)}.admin-stat.red strong{color:var(--red)}
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.admin-card h2 { font-size: 13px; margin-bottom: 10px; color: var(--green); font-weight: 700; }
.pending-ad, .pending-report { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; margin-bottom: 6px; font-size: 12px; }
.btn-approve { background: var(--green); color: #000; border: none; padding: 4px 10px; border-radius: var(--radius); cursor: pointer; font-size: 11px; font-weight: 700; }
.btn-reject { background: var(--red); color: #fff; border: none; padding: 4px 10px; border-radius: var(--radius); cursor: pointer; font-size: 11px; font-weight: 700; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th { text-align: left; padding: 6px 8px; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: 11px; }
.admin-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.admin-actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-btn { background: var(--green); color: #000; padding: 6px 14px; border-radius: var(--radius); font-weight: 700; font-size: 12px; }

/* ── Modal ── */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-inner { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 440px; }
.modal-inner h3 { margin-bottom: 14px; font-size: 14px; }
.btn-cancel-modal { background: var(--hover); border: 1px solid var(--border); color: var(--text); padding: 6px 14px; border-radius: var(--radius); cursor: pointer; font-size: 12px; }

/* ── Advertise ── */
.advertise-intro { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; font-size: 12px; }
.ad-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.ad-stat { display: flex; flex-direction: column; align-items: center; background: var(--hover); padding: 10px 16px; border-radius: var(--radius); }
.ad-stat span { font-size: 20px; }
.ad-stat strong { font-size: 16px; color: var(--green); }
.ad-stat small { font-size: 10px; color: var(--text-muted); }
.rate-cards { margin-bottom: 16px; }
.rate-card { display: flex; justify-content: space-between; background: var(--bg2); border: 1px solid var(--border); padding: 8px 12px; border-radius: var(--radius); margin-bottom: 4px; font-size: 12px; }

/* ── Misc ── */
.section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0; padding: 6px 10px; background: transparent; color: inherit; border-radius: var(--radius) var(--radius) 0 0; }
.empty-state { text-align: center; padding: 30px 16px; color: var(--text-muted); background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; }
.empty-msg { color: var(--text-muted); font-size: 12px; padding: 6px 0; }
.badge { background: var(--red); color: #fff; font-size: 9px; padding: 1px 4px; border-radius: 8px; font-weight: 700; min-width: 14px; text-align: center; display: inline-block; }
.topic-form { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.poll-section { background: rgba(52,152,219,0.06); border: 1px solid rgba(52,152,219,0.3); border-radius: var(--radius); padding: 12px; margin-top: 12px; }
.poll-section summary { cursor: pointer; font-weight: 700; color: var(--blue); font-size: 12px; }
.poll-form { margin-top: 12px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.keyboard-submit-hint { margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.posting-rules { background: rgba(243,156,18,0.06); border: 1px solid rgba(243,156,18,0.3); border-radius: var(--radius); padding: 12px; margin-top: 14px; }
.posting-rules h4 { color: var(--orange); margin-bottom: 6px; font-size: 12px; }
.posting-rules ul { padding-left: 16px; font-size: 11px; color: var(--text-muted); }
.posting-rules li { padding: 2px 0; }

/* Topic reading and reply polish */
.topic-hero {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.05);
}
.topic-hero h1 {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
  color: #101828;
  margin-bottom: 10px;
  letter-spacing: 0;
}
.topic-hero-meta {
  gap: 10px;
  color: #667085;
  font-size: 13px;
}
.topic-hero-actions {
  margin-top: 14px;
  margin-bottom: 0;
}
.topic-hero .tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eefaf3;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}
.topic-hero .btn-action,
.topic-hero .share-btn,
.post-actions .btn-action,
.post-actions .btn-react {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 237, 243, 0.95);
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}
.topic-hero .btn-action:hover,
.topic-hero .share-btn:hover,
.post-actions .btn-action:hover,
.post-actions .btn-react:hover {
  background: #eefaf3;
  border-color: rgba(7, 140, 52, 0.22);
  color: var(--green);
  text-decoration: none;
}
.topic-hero .share-buttons {
  gap: 6px;
}
.topic-hero .share-label {
  margin-right: 2px;
  font-weight: 800;
}
.topic-hero .share-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  line-height: 1;
  text-align: center;
}
.topic-hero .copy-link {
  font-size: 0;
}
.topic-hero .copy-link::before {
  content: "";
  width: 14px;
  height: 14px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.07 0l2.12-2.12a5 5 0 0 0-7.07-7.07L11 4.93'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.07 0L4.81 13.12a5 5 0 0 0 7.07 7.07L13 19.07'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.07 0l2.12-2.12a5 5 0 0 0-7.07-7.07L11 4.93'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.07 0L4.81 13.12a5 5 0 0 0 7.07 7.07L13 19.07'/%3E%3C/svg%3E") center / contain no-repeat;
}
.topic-hero .share-icon {
  display: block;
}
.topic-hero .whatsapp {
  color: #25d366;
}
.topic-hero .twitter {
  color: #111;
}
.topic-hero .facebook {
  color: #1877f2;
}
.topic-hero .copy-link {
  color: #344054;
}
.topic-post-card {
  background: #fff;
  border: 1px solid rgba(232, 237, 243, 0.95);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.045);
  margin-bottom: 14px;
}
.topic-post-card.first-post {
  border-top: 0;
  box-shadow: 0 16px 34px rgba(7, 140, 52, 0.08);
}
.topic-post-author {
  min-width: 190px;
  max-width: 190px;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  padding: 16px;
  background: #f8fafc;
}
.topic-post-author .post-avatar {
  width: 56px;
  height: 56px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(7, 140, 52, 0.22);
}
.topic-author-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.topic-author-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.topic-author-name-row .author-name {
  font-size: 15px !important;
  color: #101828 !important;
  font-weight: 800;
  text-decoration: none;
}
.topic-author-name-row .author-name:hover {
  color: var(--green) !important;
}
.author-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}
.op-badge {
  background: var(--green);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0;
}
.topic-post-body {
  padding: 16px 18px;
}
.post-meta-top {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(232, 237, 243, 0.95);
  font-size: 12px;
}
.post-number {
  color: var(--green);
}
.topic-post-content {
  padding: 14px 0 !important;
  color: #1d2939;
  font-size: 15px;
  line-height: 1.8;
}
.topic-post-content img,
.post-images img {
  max-width: 100%;
  border-radius: 10px !important;
  border: 1px solid rgba(232, 237, 243, 0.95);
}
.post-actions {
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(232, 237, 243, 0.95);
}
.topic-reply-section,
.topic-form,
.posting-rules {
  background: #fff;
  border: 1px solid rgba(232, 237, 243, 0.95);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.045);
}
.topic-reply-section {
  padding: 18px;
  margin-top: 18px;
}
.topic-reply-section h3 {
  margin-bottom: 3px;
  color: #101828;
  font-size: 18px;
}
.reply-section-sub {
  margin: -4px 0 14px;
  color: #667085;
  font-size: 13px;
}
.editor-toolbar {
  gap: 6px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid rgba(232, 237, 243, 0.95);
  border-radius: 10px;
}
.editor-toolbar button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}
.reply-textarea,
.form-group input,
.form-group textarea,
.form-group select {
  border-radius: 10px;
  border-color: rgba(208, 213, 221, 0.9);
  background: #fff;
}
.reply-textarea {
  min-height: 150px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
}
.reply-textarea:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  box-shadow: 0 0 0 3px rgba(7, 140, 52, 0.10);
}
.reply-upload {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(7, 140, 52, 0.28);
  border-radius: 10px;
  background: #f8fafc;
}
.reply-footer,
.form-actions {
  justify-content: space-between;
  flex-wrap: wrap;
}
.btn-submit-reply,
.btn-submit {
  border-radius: 999px;
  background: var(--green);
  color: #fff;
}
.topic-form,
.posting-rules {
  padding: 20px;
}

@media (max-width: 700px) {
  .topic-hero {
    padding: 14px;
  }
  .topic-hero h1 {
    font-size: 24px;
  }
  .topic-hero-actions,
  .share-buttons,
  .post-actions,
  .reply-footer,
  .form-actions {
    width: 100%;
  }
  .share-buttons,
  .post-actions {
    gap: 6px;
  }
  .topic-post-card {
    flex-direction: column;
    border-radius: 10px;
  }
  .topic-post-author {
    min-width: 0;
    max-width: none;
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(232, 237, 243, 0.95);
  }
  .topic-post-author .post-avatar {
    width: 44px;
    height: 44px;
  }
  .topic-post-body {
    padding: 14px;
  }
  .topic-post-content {
    font-size: 14px;
    line-height: 1.75;
  }
  .topic-hero .share-btn,
  .post-actions .btn-action,
  .post-actions .btn-react {
    flex: 1 1 auto;
  }
  .topic-hero .share-label {
    flex: 0 0 100%;
    font-size: 10px;
  }
  .topic-hero .share-btn {
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    font-size: 11px;
  }
  .topic-hero .copy-link::before {
    font-size: 12px;
  }
  .topic-reply-section,
  .topic-form,
  .posting-rules {
    padding: 14px;
  }
  .editor-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .editor-toolbar button {
    flex: 0 0 auto;
  }
  .reply-footer .btn-submit-reply,
  .form-actions .btn-submit {
    width: 100% !important;
  }
}
.ad-banner-top { background: var(--bg3); border-bottom: 1px solid var(--border); padding: 5px 14px; text-align: center; font-size: 12px; color: var(--text-muted); }
.ad-label { background: var(--orange); color: #000; font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 2px; margin-right: 5px; }
.ad-widget { border: 1px dashed var(--orange) !important; text-align: center; font-size: 12px; }
.inline-ad { margin: 14px 0; text-align: center; }
.adsbygoogle:empty, ins.adsbygoogle { display: none !important; min-height: 0 !important; height: 0 !important; }

/* ── Footer ── */
.site-footer { background: var(--bg2); border-top: 2px solid var(--green); margin-top: 30px; padding: 20px 0 12px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 16px; }
.footer-cols h5 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 8px; font-weight: 700; }
.footer-cols a { display: block; font-size: 12px; color: var(--text-muted); padding: 2px 0; }
.footer-cols a:hover { color: var(--green); }
.footer-cols p { font-size: 12px; color: var(--text-muted); }
.footer-bottom { text-align: center; font-size: 11px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; }

/* ── Category pills — pipe-separated Nairaland style ── */
.cat-links-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: none;
  padding: 10px 14px;
  line-height: 2.2;
  margin-bottom: 14px;
}
.cat-pill-link {
  color: var(--text-link);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.cat-pill-link:hover {
  text-decoration: underline;
  color: var(--green);
}
.cat-pipe {
  color: var(--text-muted);
  margin: 0 6px;
  font-size: 13px;
}

/* ── Sidebar categories — pipe-separated ── */
.sidebar-cat-links {
  line-height: 2;
}
.sidebar-cat-link {
  color: var(--text-link);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.sidebar-cat-link:hover {
  color: var(--green);
  text-decoration: underline;
}

/* ── Ad Placements ── */
.ad-placement {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-radius: var(--radius);
}
.ad-placement a { color: var(--text-link); }
.ad-placement a:hover { text-decoration: underline; }
.ad-placement strong { color: var(--text); }
.ad-your-ad {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted) !important;
  white-space: nowrap;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius);
}
.ad-your-ad:hover { color: var(--green) !important; border-color: var(--green); }
.ad-placeholder { color: var(--text-muted); }
/*inline social links row */
.social-links {
  display: inline-flex;
  gap: 15px;
  align-items: center;
}

.social-links a {
  text-decoration: none;
  font-size: 24px;
  color: #333;
}
/* ── Profile action buttons — inline on mobile ── */
@media (max-width: 600px) {
  .profile-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }
  .profile-actions .btn-pm-user,
  .profile-actions .btn-ignore,
  .profile-actions .btn-ban,
  .profile-actions button,
  .profile-actions a {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: var(--radius);
    white-space: nowrap;
  }
  .profile-header {
    flex-direction: column;
  }
}
/* Container: Row layout on desktop, space items evenly */
.stats-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 16px;
  background: var(--bg2);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-sizing: border-box;
  width: 100%;
}

/* Left side elements layout */
.desktop-stats-left { 
  display: flex; 
  gap: 10px; 
  align-items: center; 
}

.stat-divider {
  color: var(--border);
  font-size: 13px;
}

/* Center column: Search bar configuration */
.stat-search { 
  flex: 1; 
  max-width: 420px; /* Limits search size on wide screens */
}

.stat-search form {
  width: 100%;
  margin: 0;
}

.stat-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg1);
  color: var(--text);
  box-sizing: border-box;
  font-size: 14px;
}

/* Right side elements layout */
.desktop-stats-right {
  display: flex;
  align-items: center;
}

.stat p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap; /* Prevents text and dates from wrapping into two rows */
}

/* Responsive Rule: Wipe out left/right stats on mobile, expand search 100% */
@media (max-width: 768px) {
  .desktop-stats-left,
  .desktop-stats-right { 
    display: none !important; 
  }
  
  .stats-bar {
    padding: 8px;
    gap: 0;
  }
  
  .stat-search {
    max-width: 100%;
    width: 100%;
  }
}
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.product-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s;
}

.product-card:hover { transform: translateY(-3px); }

.product-img {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
}

.product-info { padding: 10px; }

.product-title { font-weight: bold; display: block; margin-bottom: 5px; font-size: 14px; }

.product-price { color: #2ecc71; font-weight: bold; font-size: 15px; }

.product-author { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
/* ── Logo text fallback ── */
.logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--green);
}
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 8px;
  }

  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .hamburger {
    display: block;   /* show hamburger on mobile */
    order: 0;
  }

  .nav-links {
    display: none;    /* hidden until hamburger opens it */
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 0;
  }

  .market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* ── Password reveal ── */
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap input {
  flex: 1;
  padding-right: 40px; /* room for the button */
}
.pw-toggle {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.pw-toggle:hover { opacity: 1; }
  .pw-toggle.active { opacity: 1; }
@media (max-width: 768px) {
  .admin-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  @media (max-width: 768px) {
  .admin-card {
    overflow-x: auto;        /* ✅ tables can scroll within their own card, not the whole page */
    max-width: 100%;
  }
  .admin-table {
    min-width: 500px;        /* tables keep their natural width */
  }
  .section {
    overflow-x: hidden;      /* ✅ prevents the section itself from stretching */
    max-width: 100vw;
  }
}
  .admin-actions .admin-btn {
    text-align: center;
    white-space: normal;
    font-size: 11px;
    padding: 10px 4px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    line-height: 1.3;
  }
}

/* Modern 9japosh UI refresh */
:root {
  --green: #078c34;
  --green-dark: #035f2a;
  --accent: #ffcc1a;
  --ink: #101828;
  --muted: #667085;
  --line: #e8edf3;
  --surface: #ffffff;
  --soft: #f7f8fb;
  --shadow-soft: 0 18px 45px rgba(16, 24, 40, 0.08);
  --radius: 8px;
}

[data-theme="light"] {
  --bg: #f4f6f8;
  --bg2: #ffffff;
  --bg3: #f3f5f8;
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-link: #057a31;
  --border: var(--line);
  --input-bg: #ffffff;
  --hover: rgba(7, 140, 52, 0.06);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  background:
    radial-gradient(circle at top left, rgba(7, 140, 52, 0.08), transparent 30%),
    linear-gradient(180deg, #f9fafb 0%, #eef2f6 100%);
}

a:hover { text-decoration: none; }
.container { max-width: 1360px; padding: 0 26px; }

.app-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 20px auto 0;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(232, 237, 243, 0.9);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 20px 55px rgba(16, 24, 40, 0.12);
  overflow: visible;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  overflow: visible;
}

.header-inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 26px;
}

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 164px;
  color: var(--ink);
  line-height: 1;
}

.logo img {
  width: 142px;
  height: 40px;
  object-fit: contain;
  object-position: left center;
}

.logo-text {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
  color: #111827;
}

.logo-text span { color: var(--green); }
.logo small {
  margin-top: 6px;
  font-size: 13px;
  color: #344054;
  font-weight: 500;
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
}

.nav-links > a,
.nav-dropdown-lite > button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  padding: 32px 0 26px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.nav-links > a.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.nav-dropdown-lite { position: relative; isolation: isolate; }
.nav-dropdown-lite > button span { margin-left: 6px; font-size: 12px; }
.nav-dropdown-menu-lite {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 190px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);
  display: none;
  z-index: 650;
  max-height: min(60vh, 360px);
  overflow-y: auto;
}
.nav-dropdown-lite.open .nav-dropdown-menu-lite { display: block; }
.nav-dropdown-lite:hover .nav-dropdown-menu-lite { display: block; }
.nav-dropdown-menu-lite a {
  display: block;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 650;
}
.nav-dropdown-menu-lite a:hover { background: var(--hover); color: var(--green); }
.crown { color: #f59e0b; font-size: 11px; margin-left: 3px; }

.header-search label,
.snapshot-search label {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
}

.header-search input,
.snapshot-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: #101828;
  border-radius: 50%;
}

.icon-btn:hover { background: var(--hover); }
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  background: var(--green);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
}

.nav-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.user-menu .dropdown-btn {
  position: relative;
  padding: 0;
  gap: 8px;
  background: transparent;
}

.status-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  right: 21px;
  bottom: 2px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #fff;
}

.chevron { color: #101828; font-size: 12px; }
.dropdown-menu {
  top: calc(100% + 8px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(16, 24, 40, 0.14);
  z-index: 650;
  max-height: min(60vh, 360px);
  overflow-y: auto;
}

.hamburger {
  width: 34px;
  height: 34px;
  padding: 6px;
  border: 0;
  background: transparent;
}
.hamburger span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #111827;
  border-radius: 2px;
}

.page-body { padding-top: 16px; }
.snapshot-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, auto)) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 18px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.04);
}

.snapshot-stat {
  display: grid;
  grid-template-columns: 32px auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
.snapshot-stat strong { font-size: 14px; line-height: 1; color: var(--ink); }
.snapshot-stat small { color: #475467; font-size: 11px; }
.snapshot-icon {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf8ef;
  color: var(--green);
  font-weight: 800;
}
.snapshot-icon.online::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}
.snapshot-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-size: 12px;
  white-space: nowrap;
}
.snapshot-clock > span:first-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #344054;
  border-radius: 50%;
  font-size: 13px;
}

.main-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  padding: 0;
}
.main-layout.no-sidebar { grid-template-columns: 1fr; }
body.home-page .main-layout { grid-template-columns: 1fr; }
body.home-page .sidebar { display: none; }
.main-content { min-width: 0; }

.home-ads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.learning-ad,
.market-ad {
  position: relative;
  min-height: 148px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.08);
}

.learning-ad {
  display: grid;
  grid-template-columns: 1fr auto 210px;
  align-items: center;
  padding: 22px 26px 18px;
  background:
    radial-gradient(circle at 78% 50%, rgba(255, 255, 255, 0.24), transparent 24%),
    linear-gradient(110deg, #00371f 0%, #005a25 52%, #00351d 100%);
  color: #fff;
}
.learning-ad > span,
.market-ad > span {
  position: absolute;
  top: 14px;
  left: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.learning-ad button,
.market-ad button {
  position: absolute;
  top: 16px;
  right: 18px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.learning-ad h2,
.market-ad h2 {
  margin-top: 18px;
  font-size: 31px;
  color: #ffcf21;
  line-height: 1;
}
.learning-ad p,
.market-ad p {
  margin-top: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.learning-ad a,
.market-ad a {
  display: inline-flex;
  margin-top: 14px;
  padding: 10px 24px;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.16);
}
.learning-ad strong {
  color: #ffcf21;
  font-size: 25px;
}
.learning-ad strong small {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 14px;
}
.learning-ad img {
  justify-self: end;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid rgba(255, 255, 255, 0.9);
}

.market-ad {
  padding: 32px 22px 18px;
  background: linear-gradient(135deg, #ffc427 0%, #f59e0b 100%);
  color: #111827;
}
.market-ad > span { color: #111827; }
.market-ad button { color: #fff; }
.market-ad h2 {
  margin-top: 24px;
  color: #111827;
  font-size: 24px;
}
.market-ad p {
  color: #111827;
  font-size: 14px;
  line-height: 1.45;
}
.market-ad a {
  background: #050505;
  color: #fff;
  padding: 10px 20px;
}
.cart-art {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 88px;
  height: 76px;
  border: 8px solid #d9480f;
  border-top: 0;
  transform: skewX(-10deg);
}
.cart-art::before,
.cart-art::after {
  content: "";
  position: absolute;
  bottom: -20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #111827;
}
.cart-art::before { left: 5px; }
.cart-art::after { right: 5px; }

.home-section { margin-bottom: 24px; }
.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.home-section h2,
.home-section-head h2,
.panel-heading h2,
.forum-sections-card h2 {
  color: #111827;
  font-size: 22px;
  font-weight: 850;
}

.category-carousel {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
}
.category-card {
  min-height: 154px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 18px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #111827;
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.05);
}
.category-card:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(16, 24, 40, 0.09); }
.category-orb {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cat-color), color-mix(in srgb, var(--cat-color), #ffffff 18%));
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}
.category-card strong { font-size: 15px; text-align: center; }
.category-card small { color: #475467; font-size: 14px; }
.more-card .category-orb { background: #f8fafc; color: #111827; border: 1px solid var(--line); }
.more-card small { color: var(--green); font-weight: 800; }

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}
.topic-panel,
.forum-sections-card,
.online-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.05);
}
.panel-heading {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.panel-heading a {
  color: var(--green);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.trend-list { padding: 0 14px; }
.trend-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 16px;
  color: #111827;
  border-bottom: 1px solid var(--line);
}
.trend-row:last-child { border-bottom: 0; }
.trend-thumb {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #ecfdf3;
  color: var(--green);
}
.trend-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trend-copy { min-width: 0; }
.trend-copy strong {
  display: block;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trend-copy small {
  display: block;
  margin-top: 5px;
  color: #475467;
  font-size: 14px;
}
.gold-mark { color: #f59e0b; font-size: 12px; }
.trend-row > b {
  width: 36px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-self: end;
  border-radius: 8px;
  background: #dcfce7;
  color: #057a31;
  font-size: 15px;
}

.forum-sections-card { padding: 20px 18px; align-self: start; }
.forum-sections-card h2 { font-size: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.forum-sections-card a,
.sidebar-cat-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-size: 15px;
  font-weight: 750;
  border-bottom: 1px solid var(--line);
}
.forum-sections-card a:last-child,
.sidebar-cat-link:last-child { border-bottom: 0; }
.forum-sections-card a span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cat-color);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
}
.forum-sections-card a b,
.sidebar-cat-link span { margin-left: auto; color: #111827; }

.widget {
  background: #fff;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.05);
}
.widget h4 {
  color: #111827;
  font-size: 17px;
  text-transform: none;
  letter-spacing: 0;
}
.side-ad-card > span {
  display: block;
  margin-bottom: 8px;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.side-ad-card img { width: 100%; border-radius: 6px; display: block; }
.advertise-widget p { color: #475467; margin-bottom: 12px; }

/* ────── Ad Dimensions: 318×106px (3:1 aspect ratio) ────── */
/* Standard: 318×106px | Retina: 636×212px */

.home-ads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.ad-slot {
  display: block;
  max-width: 318px;
  aspect-ratio: 3 / 1;
}

.home-ads > a,
.home-ads > article {
  display: block;
  max-width: 318px;
  aspect-ratio: 3 / 1;
}

.side-ad-card a {
  max-width: 318px;
  aspect-ratio: 3 / 1;
}

.ad-grid-inline,
.ad-grid-top,
.ad-grid-sidebar,
.ad-grid-category_header,
.ad-grid-category_inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(318px, 1fr));
  gap: 20px;
}

.ad-grid-inline,
.ad-grid-top,
.ad-grid-sidebar,
.ad-grid-category_header,
.ad-grid-category_inline {
  margin: 12px 0;
  justify-content: center;
  justify-items: center;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
}

.ad-grid-category_header {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.ad-grid-category_header .ad-card,
.ad-grid-category_header .ad-placeholder {
  width: 100%;
  max-width: 100%;
}

.ad-grid-inline .ad-card,
.ad-grid-top .ad-card,
.ad-grid-sidebar .ad-card,
.ad-grid-category_header .ad-card,
.ad-grid-category_inline .ad-card,
.ad-grid-inline .ad-placeholder,
.ad-grid-top .ad-placeholder,
.ad-grid-sidebar .ad-placeholder,
.ad-grid-category_header .ad-placeholder,
.ad-grid-category_inline .ad-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: min(100%, 360px);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.ad-grid-inline .ad-card.ad-card-text,
.ad-grid-top .ad-card.ad-card-text,
.ad-grid-sidebar .ad-card.ad-card-text,
.ad-grid-category_header .ad-card.ad-card-text,
.ad-grid-category_inline .ad-card.ad-card-text {
  padding: 10px;
}

.ad-grid-inline .ad-card-link,
.ad-grid-top .ad-card-link,
.ad-grid-sidebar .ad-card-link,
.ad-grid-category_header .ad-card-link,
.ad-grid-category_inline .ad-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  flex: 1;
  min-width: 0;
}

.ad-grid-inline .ad-text-body,
.ad-grid-top .ad-text-body,
.ad-grid-sidebar .ad-text-body,
.ad-grid-category_header .ad-text-body,
.ad-grid-category_inline .ad-text-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
  gap: 4px;
}

.ad-grid-inline .ad-text-body strong,
.ad-grid-top .ad-text-body strong,
.ad-grid-sidebar .ad-text-body strong,
.ad-grid-category_header .ad-text-body strong,
.ad-grid-category_inline .ad-text-body strong {
  font-size: 13px;
  display: block;
}

.ad-grid-inline .ad-text-body span,
.ad-grid-top .ad-text-body span,
.ad-grid-sidebar .ad-text-body span,
.ad-grid-category_header .ad-text-body span,
.ad-grid-category_inline .ad-text-body span {
  font-size: 12px;
  color: var(--text-muted);
}

.ad-grid-inline .ad-placeholder,
.ad-grid-top .ad-placeholder,
.ad-grid-sidebar .ad-placeholder,
.ad-grid-category_header .ad-placeholder,
.ad-grid-category_inline .ad-placeholder {
  background: transparent !important;
  padding: 0 !important;
}

.ad-grid-inline .ad-placeholder-body,
.ad-grid-top .ad-placeholder-body,
.ad-grid-sidebar .ad-placeholder-body,
.ad-grid-category_header .ad-placeholder-body,
.ad-grid-category_inline .ad-placeholder-body {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80px;
  flex-direction: column;
}

.ad-grid-inline .ad-placeholder-icon,
.ad-grid-top .ad-placeholder-icon,
.ad-grid-sidebar .ad-placeholder-icon,
.ad-grid-category_header .ad-placeholder-icon,
.ad-grid-category_inline .ad-placeholder-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.ad-grid-inline .ad-placeholder-text,
.ad-grid-top .ad-placeholder-text,
.ad-grid-sidebar .ad-placeholder-text,
.ad-grid-category_header .ad-placeholder-text,
.ad-grid-category_inline .ad-placeholder-text {
  font-size: 12px;
  color: var(--text-muted);
}

.ad-grid-inline .ad-promo-link,
.ad-grid-top .ad-promo-link,
.ad-grid-sidebar .ad-promo-link,
.ad-grid-category_header .ad-promo-link,
.ad-grid-category_inline .ad-promo-link {
  font-size: 11px;
  color: var(--green);
  text-decoration: none;
  display: block;
  margin-top: 6px;
}

.ad-grid-inline .ad-empty-note,
.ad-grid-top .ad-empty-note,
.ad-grid-sidebar .ad-empty-note,
.ad-grid-category_header .ad-empty-note,
.ad-grid-category_inline .ad-empty-note {
  width: min(100%, 360px);
  border: 1px dashed var(--border);
  background: var(--bg2);
  border-radius: 6px;
  padding: 10px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.ad-grid-sidebar .ad-slot-1,
.ad-grid-sidebar .ad-slot-2 {
  display: none !important;
}

.ad-card,
.ad-placeholder {
  max-width: 318px;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-card:hover,
.ad-placeholder:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.ad-card-link {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.ad-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.ad-text-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  width: 100%;
  height: 100%;
  background: var(--bg2);
}

.ad-text-body strong {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.ad-text-body span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}
.btn-advertise-small {
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  padding: 9px 12px;
}

.online-section { padding: 18px; }
.online-section p { margin-top: 8px; color: #475467; line-height: 1.8; }
.online-section a { color: var(--green); font-weight: 700; }

.site-footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid rgba(232, 237, 243, 0.9);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 20px 55px rgba(16, 24, 40, 0.12);
  padding: 22px 0;
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1.8fr) minmax(220px, 1.2fr) auto;
  grid-template-areas: "brand links meta";
  column-gap: 24px;
  align-items: start;
}
.footer-inner > div { grid-area: brand; }
.footer-inner h5 {
  color: #111827;
  font-size: 18px;
  margin-bottom: 3px;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}
.footer-logo img {
  width: 136px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
}
.footer-logo span {
  display: inline-block;
}
.footer-inner p,
.footer-inner small { color: #667085; }
.footer-inner nav {
  grid-area: links;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-inner > small {
  grid-area: meta;
  display: block;
  justify-self: end;
  align-self: center;
}
.footer-inner nav a { color: #475467; font-weight: 700; }
.footer-inner nav a:hover { color: var(--green); }
.footer-disclaimer {
  display: inline-block;
  margin-left: 6px;
  color: #b42318;
  font-weight: 700;
  letter-spacing: 0.1px;
  background: rgba(220, 38, 38, 0.09);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 999px;
  padding: 2px 10px;
}
.footer-disclaimer strong {
  color: #dc2626;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 18px; }
  .nav-links { gap: 18px; }
  .home-ads,
  .home-grid { grid-template-columns: 1fr; }
  .market-ad { min-height: 134px; }
  .category-carousel { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .snapshot-bar { grid-template-columns: repeat(3, 1fr); }
  .snapshot-search,
  .snapshot-clock { display: none; }
}

@media (max-width: 768px) {
  body { background: #f4f6f8; }
  .container { padding: 0 12px; }
  .app-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .site-footer {
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-bottom: 0;
  }
  .site-header { border-bottom: 0; }
  .header-inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    padding: 0 14px;
    gap: 10px;
  }
  .hamburger {
    display: block;
    position: static;
    order: 0;
  }
  .logo {
    min-width: 0;
    justify-self: center;
    align-items: center;
    position: static;
    transform: none;
  }
  .logo img { width: 112px; height: 34px; object-position: center; }
  .logo small { display: none; }
  .header-actions { gap: 8px; }
  .header-actions .btn-login,
  .header-actions .btn-register { display: none; }
  .icon-btn { width: 30px; height: 30px; }
  .nav-avatar { width: 34px; height: 34px; }
  .status-dot { right: 16px; }
  .chevron { display: none; }
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    padding: 84px 16px 24px;
    margin: 0;
    background: #fff;
    border-right: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 499;
    transition: left 0.25s ease;
  }
  .nav-links.open { left: 0; }
  .nav-links > a,
  .nav-dropdown-lite > button {
    width: 100%;
    padding: 14px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }
  .nav-dropdown-menu-lite {
    position: static;
    display: block;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 10px;
  }
  .nav-overlay.open { display: block; }
  .page-body { padding-top: 0; }
  .snapshot-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    min-height: 50px;
    margin: 0 0 10px;
    padding: 8px 8px;
    border-radius: 0 0 8px 8px;
  }
  .snapshot-stat {
    grid-template-columns: 26px auto;
    column-gap: 6px;
    padding-right: 6px;
  }
  .snapshot-stat:last-of-type { border-right: 0; }
  .snapshot-icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  .snapshot-stat strong { font-size: 12px; }
  .snapshot-stat small { font-size: 10px; }
  .home-page .snapshot-bar.has-search {
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: auto;
    padding: 8px;
  }
  .home-page .snapshot-bar.has-search .snapshot-stat,
  .home-page .snapshot-bar.has-search .snapshot-clock {
    display: none;
  }
  .home-page .snapshot-bar.has-search .snapshot-search {
    display: block;
  }
  .home-page .snapshot-bar.has-search .snapshot-search label {
    height: 34px;
  }
  .main-layout { grid-template-columns: 1fr; }
  .sidebar {
    display: block;
    margin-top: 12px;
  }
  .home-ads {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 18px;
  }
  .learning-ad {
    min-height: 158px;
    grid-template-columns: 1fr 102px;
    padding: 18px 14px 14px;
  }
  .learning-ad > span,
  .market-ad > span { top: 12px; left: 14px; }
  .learning-ad h2 {
    margin-top: 22px;
    font-size: 22px;
    line-height: 1.15;
  }
  .learning-ad p {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
  }
  .learning-ad a,
  .market-ad a {
    margin-top: 10px;
    padding: 8px 18px;
    font-size: 12px;
  }
  .learning-ad strong {
    grid-column: 1 / 2;
    font-size: 15px;
  }
  .learning-ad strong small { display: inline; font-size: 12px; }
  .learning-ad img {
    grid-column: 2;
    grid-row: 1 / 4;
    width: 92px;
    height: 92px;
    align-self: center;
  }
  .market-ad {
    min-height: 104px;
    padding: 20px 14px 12px;
  }
  .market-ad h2 { margin-top: 16px; font-size: 18px; }
  .market-ad p { margin-top: 4px; max-width: 200px; font-size: 12px; }
  .cart-art {
    width: 62px;
    height: 52px;
    right: 16px;
    bottom: 18px;
  }
  .home-section-head { margin-bottom: 10px; }
  .home-section h2,
  .home-section-head h2,
  .panel-heading h2 { font-size: 15px; }
  .category-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 12px;
    scrollbar-color: #98a2b3 transparent;
  }
  .category-card {
    min-width: 72px;
    min-height: 74px;
    padding: 8px 6px;
    gap: 5px;
    box-shadow: none;
  }
  .category-orb {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
  .category-card strong { font-size: 10px; }
  .category-card small { display: none; }
  .home-grid { grid-template-columns: 1fr; gap: 12px; }
  .forum-sections-card { display: none; }
  .forum-sections-note {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
  }
  .panel-heading {
    min-height: 52px;
    padding: 0 12px;
  }
  .panel-heading a {
    font-size: 12px;
  }
  .trend-list { padding: 0 10px; }
  .trend-row {
    min-height: 80px;
    grid-template-columns: 54px minmax(0, 1fr) 34px;
    gap: 10px;
  }
  .trend-thumb {
    width: 48px;
    height: 48px;
  }
  .trend-copy strong {
    font-size: 13px;
    white-space: normal;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .trend-copy small { font-size: 12px; }
  .trend-row > b {
    width: 30px;
    height: 28px;
    font-size: 12px;
  }
  .site-footer { padding: 18px 0; }
  .footer-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "links"
      "meta";
    row-gap: 10px;
  }
  .footer-inner nav {
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .footer-inner nav a {
    text-align: center;
  }
  .footer-inner > div,
  .footer-inner > small {
    text-align: center;
  }
  .footer-inner > small {
    align-self: center;
    justify-self: center;
  }
  .footer-inner nav { gap: 12px; }

  /* ──── Mobile Ads: Show only random 1 ad ──── */
  .home-ads {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }

  .home-ads .ad-slot {
    max-width: 100%;
    aspect-ratio: 3 / 1;
  }

  .home-ads > a,
  .home-ads > article {
    max-width: 100%;
  }

  .ad-grid-inline,
  .ad-grid-top,
  .ad-grid-sidebar,
  .ad-grid-category_header,
  .ad-grid-category_inline {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
  }

  .ad-grid-inline .ad-card,
  .ad-grid-top .ad-card,
  .ad-grid-sidebar .ad-card,
  .ad-grid-category_header .ad-card,
  .ad-grid-category_inline .ad-card,
  .ad-grid-inline .ad-placeholder,
  .ad-grid-top .ad-placeholder,
  .ad-grid-sidebar .ad-placeholder,
  .ad-grid-category_header .ad-placeholder,
  .ad-grid-category_inline .ad-placeholder {
    width: 100% !important;
    max-width: min(100%, 360px);
    min-width: 0;
    aspect-ratio: 3 / 1;
  }

  .ad-grid-inline .ad-card-link,
  .ad-grid-top .ad-card-link,
  .ad-grid-sidebar .ad-card-link,
  .ad-grid-category_header .ad-card-link,
  .ad-grid-category_inline .ad-card-link {
    width: 100%;
    min-width: 0;
  }

  .ad-grid-inline .ad-img,
  .ad-grid-top .ad-img,
  .ad-grid-sidebar .ad-img,
  .ad-grid-category_header .ad-img,
  .ad-grid-category_inline .ad-img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .ad-grid-inline .ad-text-body,
  .ad-grid-top .ad-text-body,
  .ad-grid-sidebar .ad-text-body,
  .ad-grid-category_header .ad-text-body,
  .ad-grid-category_inline .ad-text-body {
    min-height: 0;
    height: 100%;
    padding: 8px;
  }

  .ad-grid-inline .ad-text-body strong,
  .ad-grid-top .ad-text-body strong,
  .ad-grid-sidebar .ad-text-body strong,
  .ad-grid-category_header .ad-text-body strong,
  .ad-grid-category_inline .ad-text-body strong,
  .ad-grid-inline .ad-text-body span,
  .ad-grid-top .ad-text-body span,
  .ad-grid-sidebar .ad-text-body span,
  .ad-grid-category_header .ad-text-body span,
  .ad-grid-category_inline .ad-text-body span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

}

/* Final header redesign overrides */
.site-header {
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(246,249,252,0.92)),
    linear-gradient(90deg, rgba(7,140,52,0.12), rgba(255,204,26,0.12));
  border-bottom: 1px solid rgba(7, 140, 52, 0.16);
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.08);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--accent), #16a3a6);
  pointer-events: none;
}
.header-inner {
  min-height: 78px;
  grid-template-columns: auto minmax(340px, 1fr) auto;
  gap: 22px;
}
.logo { min-width: 150px; padding: 10px 0; }
.logo img { width: 136px; height: 38px; }
.logo-text { font-size: 28px; font-weight: 900; color: #0f172a; }
.logo small {
  display: block;
  margin-top: 6px;
  color: #5d6b7c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}
.nav-links {
  justify-self: start;
  gap: 6px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(232, 237, 243, 0.95);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.nav-links > a,
.nav-dropdown-lite > button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}
.nav-links > a:hover,
.nav-dropdown-lite > button:hover,
.nav-links > a.active {
  color: #fff;
  background: var(--green);
}
.mobile-nav-action { display: none !important; }
.nav-dropdown-lite > button span { font-size: 10px; opacity: 0.7; }
.nav-dropdown-menu-lite { top: calc(100% + 12px); min-width: 230px; border-radius: 10px; padding: 10px; }
.header-actions { justify-content: flex-end; gap: 10px; }
.header-search { width: clamp(170px, 17vw, 240px); }
.header-search label {
  height: 40px;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  border-color: rgba(7, 140, 52, 0.16);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
}
.header-search input { min-width: 0; font-size: 13px; }
.btn-new-topic,
.btn-login,
.btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  white-space: nowrap;
}
.btn-new-topic,
.btn-register {
  background: #078c34 !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(7, 140, 52, 0.2);
}
.btn-new-topic:hover,
.btn-register:hover { background: var(--green-dark) !important; }
.btn-login {
  background: #fff !important;
  border: 1px solid rgba(7, 140, 52, 0.22) !important;
  color: var(--green) !important;
}
.icon-btn {
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid rgba(232, 237, 243, 0.95);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
}
.icon-btn:hover { background: #eefaf3; color: var(--green); }
.nav-avatar { width: 40px; height: 40px; }
.user-menu .dropdown-btn {
  min-height: 44px;
  padding: 2px 8px 2px 2px;
  border: 1px solid rgba(232, 237, 243, 0.95);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
}
.status-dot { right: 29px; bottom: 5px; }
.dropdown-menu { border-radius: 10px; padding: 8px; }
.dropdown-menu a { border-radius: 7px; }
.account-menu-head {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(232, 237, 243, 0.95);
}
.account-menu-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(7, 140, 52, 0.22);
  flex-shrink: 0;
}
.account-menu-head strong {
  display: block;
  color: #111827;
  font-size: 14px;
  line-height: 1.2;
}
.account-menu-head small {
  display: block;
  max-width: 180px;
  margin-top: 2px;
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hamburger {
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(232, 237, 243, 0.95);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
}

@media (max-width: 1180px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 14px; }
  .nav-links { gap: 4px; }
  .nav-links > a,
  .nav-dropdown-lite > button { padding: 0 10px; font-size: 12px; }
  .header-search { display: none; }
}

@media (max-width: 768px) {
  .site-header { position: sticky; box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08); }
  .header-inner {
    min-height: 68px;
    grid-template-columns: 42px 1fr auto;
    gap: 8px;
    padding: 0 12px;
  }
  .logo { padding: 0; }
  .logo img { width: 116px; height: 34px; }
  .logo-text { font-size: 23px; }
  .logo small { font-size: 9px; margin-top: 4px; }
  .header-actions { gap: 6px; }
  .header-search,
  .header-actions .btn-new-topic,
  .header-actions .btn-login,
  .header-actions .btn-register { display: none; }
  .icon-btn,
  .hamburger { width: 38px; height: 38px; }
  .nav-avatar { width: 36px; height: 36px; }
  .user-menu .dropdown-btn { min-height: 40px; padding: 2px; }
  .status-dot { right: 5px; bottom: 4px; }
  .chevron { display: none; }
  .user-menu {
    position: relative;
    width: auto;
    flex-shrink: 0;
  }
  .user-menu .dropdown-btn {
    width: auto;
    justify-content: center;
  }
  .user-menu .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: min(86vw, 292px);
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(7, 140, 52, 0.14);
    background: #fff;
    box-shadow: 0 22px 55px rgba(16, 24, 40, 0.22);
  }
  .user-menu.open .dropdown-menu {
    display: block;
  }
  .account-menu-head {
    display: flex;
  }
  .user-menu .dropdown-menu a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 10px;
    color: #162033;
    font-size: 14px;
    font-weight: 750;
  }
  .user-menu .dropdown-menu a:hover {
    background: #eefaf3;
    color: var(--green);
  }
  .user-menu .dropdown-menu .logout-link {
    background: #fff5f5;
    color: var(--red) !important;
  }
  .user-menu .dropdown-menu hr {
    margin: 8px 4px;
    border: 0;
    border-top: 1px solid rgba(232, 237, 243, 0.95);
  }
  .nav-links {
    left: -292px;
    width: 292px;
    padding: 86px 16px 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 0 16px 16px 0;
    border-right: 1px solid rgba(7, 140, 52, 0.12);
    box-shadow: 28px 0 60px rgba(16, 24, 40, 0.2);
  }
  .nav-links > a,
  .nav-dropdown-lite > button {
    min-height: 46px;
    padding: 0 12px;
    border-radius: 10px;
    border-bottom: 0;
    color: #162033;
    font-size: 14px;
  }
  .nav-links > a.mobile-nav-action {
    display: inline-flex !important;
    margin-top: 12px;
    justify-content: center;
    border: 1px solid rgba(7, 140, 52, 0.2);
    color: var(--green);
    background: #fff;
  }
  .nav-links > a.mobile-nav-action.primary,
  .nav-links > a.mobile-nav-action:hover {
    color: #fff;
    background: var(--green);
  }
  .nav-links > a + a,
  .nav-links > a + .nav-dropdown-lite,
  .nav-dropdown-lite + a { margin-top: 4px; }
  .nav-dropdown-menu-lite {
    margin: 4px 0 10px 8px;
    padding: 4px 0 4px 10px;
    border-left: 2px solid rgba(7, 140, 52, 0.18);
    border-radius: 0;
    background: transparent;
  }
  .nav-dropdown-lite.open .nav-dropdown-menu-lite { display: block; }
}

/* ─────────────────────────────────────────── */
/* Animation for notification/message icons   */
/* ─────────────────────────────────────────── */

@keyframes bell-ring {
  0%, 100% { transform: rotate(0deg); }
  10%, 20% { transform: rotate(-15deg); }
  30%, 50%, 70%, 90% { transform: rotate(15deg); }
  40%, 60%, 80% { transform: rotate(-15deg); }
}

@keyframes pulse-scale {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

@keyframes badge-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.nav-icon-link.animated {
  animation: bell-ring 0.6s ease-in-out;
  transform-origin: center top;
}

.nav-icon-link.animated .badge {
  animation: badge-bounce 0.6s ease-in-out;
}
