/*
Theme Name: Mentometry
Theme URI: https://mentometry.com
Author: Mentometry
Author URI: https://mentometry.com
Description: The dedicated theme for Mentometry — the global brain-game arena, 28 games, worldwide and national leaderboards.
Version: 2.2
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mentometry
Tags: dark, blog, gaming, custom-logo, featured-images
*/

/* ── Prevent horizontal overflow in every state ── */
html {
  overflow-x: hidden;
  max-width: 100vw;
}
body {
  overflow-x: hidden;
  max-width: 100%;
  min-width: 0;
}

/* Elementor fix on mobile */
.elementor-section,
.elementor-container,
.e-con,
.e-con-inner,
.elementor-widget-wrap {
  max-width: 100% !important;
  min-width: 0 !important;
}
@media (max-width: 767px) {
  .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}
:root {
  --surface:   #ffffff;
  --surface-2: #F8F5F2;
  --surface-3: #EDE8DF;
  --border:    #E0D9CF;
  --text-main: #1A1A1A;
  --text-muted:#6B6660;
}

[data-theme="dark"] .article-layout,
[data-theme="dark"] .article-main,
[data-theme="dark"] .comments-section,
[data-theme="dark"] .sidebar-widget {
  --surface:   #1e293b00;
  --surface-2: #4a4a4c00;
  --surface-3: #162032;
  --border:    rgba(255,255,255,.1);
  --text-main: #e2e8f0;
  --text-muted:#94a3b8;
}

[data-theme="dark"] .article-layout    { background: #000000; }
[data-theme="dark"] .article-main      { background: #000000; }
[data-theme="dark"] .comments-section  { background: #000000 !important; }
[data-theme="dark"] #main-content.container { background: #000000; }

[data-theme="dark"] .article-content,
[data-theme="dark"] .article-content p,
[data-theme="dark"] .article-content li  { color: #e2e8f0; }
[data-theme="dark"] .article-content h2,
[data-theme="dark"] .article-content h3,
[data-theme="dark"] .article-content h4  { color: #f1f5f9; }
[data-theme="dark"] .article-content blockquote   { background: #0f172a; }
[data-theme="dark"] .article-content blockquote p { color: #f1f5f9; }
[data-theme="dark"] .article-content code  { background: #162032; color: #e2e8f0; }
[data-theme="dark"] .article-content td   { border-bottom-color: rgba(255,255,255,.1); }
[data-theme="dark"] .article-content tr:nth-child(even) td { background: #0f172a; }

[data-theme="dark"] .toc-box    { background: #0f172a; border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .toc-list a  { color: #e2e8f0; }

[data-theme="dark"] .tag-link   { background: #0f172a; border-color: rgba(255,255,255,.1); color: #e2e8f0; }
[data-theme="dark"] .share-copy { background: #0f172a; border-color: rgba(255,255,255,.1); color: #e2e8f0; }

[data-theme="dark"] .author-box        { background: #0f172a; border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .author-box-name a { color: #f1f5f9; }
[data-theme="dark"] .author-box-bio    { color: #94a3b8; }
[data-theme="dark"] .author-social a   { background: rgba(255,255,255,.08); color: #e2e8f0; }

[data-theme="dark"] .spn-card  { background: #0f172a; border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .spn-title { color: #e2e8f0; }

[data-theme="dark"] .article-rating { background: #0f172a; border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .rating-thumb   { background: #1e293b; border-color: rgba(255,255,255,.1); color: #94a3b8; }

[data-theme="dark"] .comment             { border-bottom-color: rgba(255,255,255,.1); }
[data-theme="dark"] .comment-text,
[data-theme="dark"] .comment-author-name { color: #e2e8f0; }
[data-theme="dark"] .comment-date        { color: #94a3b8; }
[data-theme="dark"] .comment-form-wrap   { background: #0f172a; border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .comment-form-title,
[data-theme="dark"] .comment-form-title a { color: #f1f5f9; }
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea       { background: #1e293b; border-color: rgba(255,255,255,.1); color: #e2e8f0; }
[data-theme="dark"] .form-label          { color: #94a3b8; }
[data-theme="dark"] .comments-title      { color: #f1f5f9; }

[data-theme="dark"] .sidebar-widget  { background: #1e293b; border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .widget-title    { color: #94a3b8; border-bottom-color: rgba(255,255,255,.1); }
[data-theme="dark"] .post-item-title { color: #e2e8f0; }
[data-theme="dark"] .cat-item a      { color: #e2e8f0; }
[data-theme="dark"] .cat-count       { background: #162032; color: #94a3b8; }
[data-theme="dark"] .post-card       { background: #1e293b; border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .post-card-title { color: #e2e8f0; }
[data-theme="dark"] .post-card-meta  { color: #94a3b8; }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: #94a3b8;
  cursor: pointer;
  transition: color .25s, transform .25s, background .25s, border-color .25s;
  font-size: 15px;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: #FF6B35;
  transform: translateY(-2px);
  background: rgba(255,107,53,.08);
  border-color: rgba(255,107,53,.2);
}

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }

:root {
  --primary:        #0a0a0f;
  --primary-soft:   #12121a;
  --primary-mid:    #1a1a2e;
  --accent:         #FF6B35;
  --accent-2:       #E8305A;
  --accent-3:       #7B2FBE;
  --accent-light:   #FF8C5A;
  --accent-glow:    rgba(255,107,53,.18);
  --accent-cyan:    #00E5FF;
  --accent-cyan-glow: rgba(0,229,255,.18);

  --fox-gradient:   linear-gradient(135deg, #FF6B35 0%, #E8305A 55%, #7B2FBE 100%);
  --fox-gradient-h: linear-gradient(135deg, #FF8C5A 0%, #FF4B7A 55%, #9B4FDE 100%);

  --surface:        #FFFFFF;
  --surface-2:      #F8F5F2;
  --surface-3:      #EDE8DF;

  --dark-surface:   #0a0a0f;
  --dark-surface-2: #12121a;
  --dark-surface-3: #1a1a2e;
  --dark-border:    rgba(255,107,53,.15);

  --text-main:      #1A1A1A;
  --text-muted:     #6B6660;
  --text-light:     #9E9690;
  --text-on-dark:   rgba(255,255,255,.85);
  --text-muted-dark:rgba(255,255,255,.55);

  --border:         #E0D9CF;
  --border-dark:    rgba(255,255,255,.08);

  --shadow-sm:      0 1px 4px rgba(0,0,0,.08);
  --shadow-md:      0 4px 20px rgba(0,0,0,.15);
  --shadow-lg:      0 12px 48px rgba(0,0,0,.25);
  --shadow-accent:  0 4px 20px rgba(255,107,53,.3);

  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;

  --font-display:   'Orbitron', 'Poppins', sans-serif;
  --font-body:      'Poppins', -apple-system, sans-serif;
  --font-ui:        'Poppins', -apple-system, sans-serif;
  --max-w:          1400px;
  --content-w:      760px;
  --transition:     .25s cubic-bezier(.4,0,.2,1);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.8;
  direction: ltr;
  overflow-x: hidden;
}

html[data-theme="light"] body.single {
  background: #000000 !important;
}

html[data-theme="dark"] body.single {
  background: #000000 !important;
}

body.archive,
body.category,
body.blog,
body.search {
  background: #000000;
}

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
}

h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: clamp(1rem, 2vw, 1.3rem); }

p { font-size: 1.05rem; margin-bottom: 1.5rem; text-align: justify; }
p:last-child { margin-bottom: 0; }

.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 1.5rem; }
.content-container { width: 100%; max-width: var(--content-w); margin-inline: auto; padding-inline: 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-muted { color: var(--text-muted); }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-ui); font-size: .78rem; font-weight: 700;
  padding: .3rem .85rem; border-radius: 999px;
  background: var(--fox-gradient); color: #fff;
  text-transform: uppercase; letter-spacing: .05em;
  transition: opacity var(--transition);
  box-shadow: var(--shadow-accent);
}
.badge:hover { opacity: .88; }

.skip-link {
  position: absolute; top: -100px; right: 1rem;
  background: var(--accent); color: #fff;
  padding: .5rem 1rem; border-radius: var(--radius-sm);
  font-weight: 700; z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.site-topbar {
  background: var(--dark-surface-2);
  color: var(--text-muted-dark);
  font-family: var(--font-ui);
  font-size: .8rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--dark-border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.topbar-date { opacity: .7; }
.topbar-links { display: flex; gap: 1.25rem; }
.topbar-links a {
  color: var(--text-muted-dark); transition: color var(--transition);
}
.topbar-links a:hover { color: var(--accent); }

.site-header {
  position: sticky; top: 0; z-index: 500;
  background: #ffffff;
  border-bottom: 1px solid var(--dark-border);
  box-shadow: 0 2px 20px rgba(0,0,0,.5);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,.7); }

.mentometry-header {
  background-color: var(--dark-surface) !important;
  border-bottom: 1px solid var(--dark-border) !important;
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 2rem;
}

.site-branding { flex-shrink: 0; }
.site-title {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800;
  color: #fff; letter-spacing: -.02em;
}
.site-title span { background: var(--fox-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.site-description {
  font-size: .72rem; color: var(--text-muted-dark);
  font-family: var(--font-ui); margin-top: .1rem;
}

.primary-nav { display: flex; align-items: center; gap: .25rem; flex: 1; justify-content: center; }
.primary-nav a {
  font-family: var(--font-ui); font-size: .9rem; font-weight: 600;
  color: var(--text-on-dark); padding: .45rem .85rem; border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.primary-nav a:hover,
.primary-nav a.active { background: var(--dark-surface-2); color: var(--accent); }
.primary-nav .current-menu-item > a { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.search-toggle, .mobile-menu-toggle {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: var(--text-on-dark);
  transition: background var(--transition), color var(--transition);
}
.search-toggle:hover, .mobile-menu-toggle:hover { background: var(--dark-surface-2); color: var(--accent); }
.mobile-menu-toggle { display: none; }

.header-search {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--dark-surface-2); border-top: 1px solid var(--dark-border);
  padding: 1rem 0; box-shadow: var(--shadow-lg);
  display: none; animation: slideDown .2s ease;
}
.header-search.open { display: block; }
.search-form-inner { display: flex; gap: .75rem; max-width: 640px; margin: 0 auto; }
.search-form-inner input {
  flex: 1; padding: .65rem 1rem;
  border: 1.5px solid var(--dark-border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .95rem;
  background: var(--dark-surface-3); color: var(--text-on-dark);
  outline: none; transition: border-color var(--transition);
}
.search-form-inner input::placeholder { color: var(--text-muted-dark); }
.search-form-inner input:focus { border-color: var(--accent); }
.search-form-inner button {
  padding: .65rem 1.25rem; background: var(--fox-gradient); color: #fff;
  border-radius: var(--radius-sm); font-weight: 700; font-family: var(--font-ui);
  transition: opacity var(--transition);
  box-shadow: var(--shadow-accent);
}
.search-form-inner button:hover { opacity: .85; }

.reading-progress {
  position: fixed; top: 0; right: 0; left: 0; z-index: 600;
  height: 3px; background: transparent; pointer-events: none;
}
.reading-progress-bar {
  height: 100%; width: 0; background: var(--fox-gradient);
  transition: width .1s linear;
}

.breadcrumb-wrap {
  padding: .85rem 0;
  background: #000000;
  border-bottom: 1px solid var(--dark-border);
}
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .35rem; font-family: var(--font-ui); font-size: .82rem;
  color: var(--text-muted-dark);
}
.breadcrumb a { color: var(--text-muted-dark); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .4; }
.breadcrumb .current { color: var(--text-on-dark); font-weight: 600; }

.article-hero {
  position: relative;
  background: #ffffff;
}
.hero-visual {
  position: relative;
  width: 100%;
  min-height: 420px;
  background-color: var(--dark-surface-2);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,15,.25) 0%,
    rgba(10,10,15,.55) 50%,
    rgba(10,10,15,.92) 100%
  );
  z-index: 1;
}

.hero-meta-bar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.hero-title-wrap {
  position: relative;
  z-index: 2;
  padding-bottom: 2rem;
}

.article-title,
.hero-title {
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  margin-bottom: .6rem;
  letter-spacing: -.01em;
  text-align: justify;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

.article-excerpt,
.hero-excerpt {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  max-width: 680px;
  font-style: italic;
  text-align: justify;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
  margin-bottom: 0;
}

.hero-byline-bar {
  background: var(--dark-surface);
  border-bottom: 1px solid var(--dark-border);
}

.article-byline {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 1.5rem; padding: 1rem 0;
}
.byline-author { display: flex; align-items: center; gap: .75rem; }
.author-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--accent);
}
.author-name {
  font-family: var(--font-ui); font-size: .88rem; font-weight: 700;
  color: var(--text-on-dark);
}
.author-name a { color: var(--text-on-dark); }
.author-role { font-size: .75rem; color: var(--text-muted-dark); }
.byline-info {
  display: flex; flex-wrap: wrap; gap: 1rem;
  font-family: var(--font-ui); font-size: .8rem; color: var(--text-muted-dark);
  margin-left: auto;
}
.byline-item { display: flex; align-items: center; gap: .35rem; }
.byline-item svg { opacity: .5; flex-shrink: 0; }
.byline-item a { color: var(--text-muted-dark); }
.byline-item a:hover { color: var(--accent); }

.hero-visual:not([style*="background-image"]) {
  min-height: 280px;
  background: linear-gradient(135deg, var(--dark-surface) 0%, var(--dark-surface-3) 100%);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  align-items: start;
  background: var(--surface);
  overflow-x: hidden;
  min-width: 0;
}

/* ── article-main must not expand beyond its grid cell ── */
.article-main {
  min-width: 0;
}

.single #main-content,
.page  #main-content { background: var(--surface); }

[data-theme="dark"] .article-layout,
[data-theme="dark"] .single #main-content,
[data-theme="dark"] .page  #main-content,
[data-theme="dark"] .single .site-content,
[data-theme="dark"] .page  .site-content { background: #000000; }

.article-sidebar .sidebar-widget { background: var(--surface); }
[data-theme="dark"] .article-sidebar .sidebar-widget { background: #1e293b; }

:root .article-main,
:root .single .article-layout,
:root .single .article-main,
:root .single .article-content,
[data-theme="light"] .article-main,
[data-theme="light"] .single #main-content,
[data-theme="light"] .single .article-layout,
[data-theme="light"] .single .article-main,
[data-theme="light"] .single .article-content { background: var(--surface); }

.toc-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-right: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: .75rem .9rem;
  margin-bottom: 2rem;
}
.toc-title {
  font-family: var(--font-ui); font-size: .72rem;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
  margin-bottom: .4rem; display: flex; align-items: center; gap: .35rem;
}
.toc-list { display: flex; flex-direction: column; gap: 0; }
.toc-list li { list-style: none; }
.toc-list a {
  font-family: var(--font-ui); font-size: .73rem;
  color: var(--text-main); padding: .12rem .4rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: baseline;
  gap: .4rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toc-list a::before {
  content: none;
}
.toc-list a:hover,
.toc-list a.active {
  background: var(--fox-gradient); color: #fff; font-weight: 600;
  white-space: normal;
}
.toc-list a:hover::before,
.toc-list a.active::before { }
.toc-list .toc-h3 { padding-right: 1rem; font-size: .72rem; opacity: .75; }
.toc-list .toc-h3::before { width: 3px; height: 3px; opacity: .4; }

@media (max-width: 768px) {
  .toc-box { padding: .6rem .75rem; }
  .toc-title {
    cursor: pointer;
    user-select: none;
    justify-content: space-between;
    margin-bottom: 0;
  }
  .toc-title::after {
    content: '▾';
    font-size: .8rem;
    transition: transform .2s;
  }
  .toc-title.open::after { transform: rotate(180deg); }
  .toc-list {
    display: none;
    margin-top: .4rem;
  }
  .toc-list.visible { display: flex; }
  .toc-list a {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: .70rem;
  }
}

.article-content {
  font-size: 1.05rem; line-height: 1.9;
  color: var(--text-main);
  text-align: justify;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  background: var(--surface) !important;
}
html[data-theme="dark"] .article-content { background: #000000 !important; }

/* ── RTL article body when translated into Persian/Arabic/Urdu/Hebrew ──
     Only the article text flips direction; header, sidebar, and the rest of
     the site UI stay LTR as authored. ── */
.article-content.mnt-rtl-content {
  direction: rtl;
  text-align: right;
  font-family: 'Poppins', Tahoma, 'Segoe UI', 'Noto Sans Arabic', 'Noto Sans Hebrew', sans-serif;
}
.article-content.mnt-rtl-content ul,
.article-content.mnt-rtl-content ol {
  padding-right: 0;
  padding-left: 1.75rem;
}
.article-content.mnt-rtl-content blockquote {
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  border-right: none;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.article-content h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 2.75rem 0 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--border);
  position: relative;
  text-align: left;
}
.article-content h2::before {
  content: '';
  position: absolute; bottom: -2px; right: 0;
  width: 60px; height: 2px;
  background: var(--fox-gradient);
}
.article-content h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  margin: 2rem 0 .75rem; color: var(--primary);
  text-align: left;
}
.article-content h4 { margin: 1.5rem 0 .5rem; text-align: left; }

.article-content p { margin-bottom: 1.6rem; text-align: justify; }

.article-content a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.article-content a:hover { border-color: var(--accent); }

.article-content blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem 1.5rem 1.5rem;
  background: var(--surface-2);
  border-right: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}
.article-content blockquote::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 4rem; line-height: 1;
  color: var(--accent); opacity: .3;
  position: absolute; top: -.5rem; right: 1rem;
}
.article-content blockquote p {
  font-size: 1.1rem; font-style: italic;
  color: var(--primary); margin-bottom: .5rem;
}
.article-content blockquote cite {
  font-family: var(--font-ui); font-size: .85rem;
  color: var(--text-muted); font-style: normal;
}

.article-content ul,
.article-content ol { margin: 1rem 0 1.75rem; padding-right: 1.75rem; }
.article-content ul { list-style: none; padding-right: 0; }
.article-content ul li {
  position: relative; padding-right: 1.5rem; margin-bottom: .6rem;
  text-align: justify;
}
.article-content ul li::before {
  content: '';
  position: absolute; right: 0; top: .65rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fox-gradient);
}
.article-content ol { list-style: decimal; }
.article-content ol li { margin-bottom: .6rem; text-align: justify; }

.article-content code {
  background: var(--surface-3); color: var(--primary);
  padding: .15em .45em; border-radius: 4px;
  font-size: .9em; font-family: 'Courier New', monospace;
}
.article-content pre {
  background: var(--dark-surface); color: #E8F0FE;
  padding: 1.5rem; border-radius: var(--radius-md);
  overflow-x: auto; margin: 2rem 0; -webkit-overflow-scrolling: touch;
  font-size: .88rem; line-height: 1.7;
  border: 1px solid var(--dark-border);
}
.article-content pre code { background: none; color: inherit; padding: 0; }

.article-content table {
  width: 100%; border-collapse: collapse; margin: 2rem 0;
  font-size: .92rem;
}

/* ── Responsive table wrapper (added via JS) ── */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-width: 100%;
}
.table-responsive table {
  min-width: 100%;
  margin: 0;
  border: none;
}
@media (max-width: 768px) {
  /* horizontal-scroll: drag hint only when table is wider than its container */
  .table-responsive {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,107,53,.4) transparent;
  }
  .table-responsive::-webkit-scrollbar { height: 4px; }
  .table-responsive::-webkit-scrollbar-track { background: transparent; }
  .table-responsive::-webkit-scrollbar-thumb { background: rgba(255,107,53,.4); border-radius: 2px; }
}

/* ══════════════════════════════════════════════════════
   CARD LAYOUT — 3+ column tables on mobile
   ══════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  /* disable horizontal scroll — card layout replaces it */
  .table-card-mobile {
    overflow-x: visible !important;
    border: none !important;
    background: transparent !important;
    margin: 1.5rem 0;
  }

  /* table and rows become block */
  .table-card-mobile table { display: block; min-width: 0; width: 100%; }
  .table-card-mobile thead  { display: none; } /* header hidden — shown via data-label */
  .table-card-mobile tbody  { display: flex; flex-direction: column; gap: .65rem; }

  /* each row = one card */
  .table-card-mobile tr {
    display: block;
    border: 1px solid var(--border, rgba(255,255,255,.1));
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface, #fff);
  }
  [data-theme="dark"] .table-card-mobile tr {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.1);
  }

  /* first td = card title (wallet name, coin, …) */
  .table-card-mobile td:first-child {
    display: block;
    padding: .65rem 1rem;
    font-weight: 700;
    font-size: .95rem;
    color: var(--text-main, #1a1a1a);
    background: rgba(255,107,53,.08);
    border-bottom: 1px solid rgba(255,107,53,.15);
    letter-spacing: .01em;
  }
  [data-theme="dark"] .table-card-mobile td:first-child {
    color: #f1f5f9;
    background: rgba(255,107,53,.12);
    border-bottom-color: rgba(255,107,53,.2);
  }

  /* remaining tds = label + value rows */
  .table-card-mobile td[data-label] {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .5rem 1rem;
    border-bottom: 1px solid var(--border, rgba(0,0,0,.06));
    font-size: .84rem;
    line-height: 1.55;
    color: var(--text-main, #1a1a1a);
  }
  [data-theme="dark"] .table-card-mobile td[data-label] {
    color: #cbd5e1;
    border-bottom-color: rgba(255,255,255,.07);
  }
  .table-card-mobile td:last-child { border-bottom: none !important; }

  /* column label (::before) — accent color, bold */
  .table-card-mobile td[data-label]::before {
    content: attr(data-label);
    flex-shrink: 0;
    min-width: 72px;
    max-width: 90px;
    font-family: var(--font-ui, sans-serif);
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent, #FF6B35);
    text-align: left;
    padding-top: 2px;
    line-height: 1.4;
  }

  /* value — remaining space */
  .table-card-mobile td[data-label] > *:not(::before),
  .table-card-mobile td[data-label] { /* value is inline text */ }
}
.article-content th {
  background: var(--dark-surface); color: #fff;
  padding: .75rem 1rem; text-align: left;
  font-family: var(--font-ui); font-weight: 600;
}
.article-content td {
  padding: .7rem 1rem; border-bottom: 1px solid var(--border);
  vertical-align: top; text-align: justify;
}
.article-content tr:nth-child(even) td { background: var(--surface-2); }
.article-content tr:hover td { background: var(--surface-3); }

.article-content figure { margin: 2.5rem 0; }
.article-content figure img {
  width: 100%; border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.article-content figcaption {
  text-align: center; font-size: .83rem;
  color: var(--text-muted); margin-top: .75rem;
  font-family: var(--font-ui); font-style: italic;
}

.callout {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.25rem 1.5rem; border-radius: var(--radius-md);
  margin: 2rem 0; font-size: .95rem;
}
.callout-info { background: #EFF6FF; border: 1px solid #BFDBFE; }
.callout-warning { background: #FFFBEB; border: 1px solid #FDE68A; }
.callout-success { background: #F0FDF4; border: 1px solid #BBF7D0; }
.callout-icon { flex-shrink: 0; font-size: 1.2rem; margin-top: .1rem; }

.article-content hr {
  border: none; height: 1px;
  background: linear-gradient(to left, transparent, var(--border), transparent);
  margin: 3rem 0;
}

.article-footer { padding-top: 2.5rem; border-top: 2px solid var(--border); margin-top: 3rem; }

.tags-wrap { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.tag-link {
  font-family: var(--font-ui); font-size: .8rem; font-weight: 600;
  padding: .3rem .85rem; border-radius: 999px;
  background: var(--surface-2); color: var(--text-main);
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}
.tag-link:hover { background: var(--fox-gradient); border-color: transparent; color: #fff; }

.share-section { margin-bottom: 2.5rem; }
.share-label {
  font-family: var(--font-ui); font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: .85rem;
}
.share-buttons { display: flex; flex-wrap: wrap; gap: .65rem; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  height: 38px; padding: 0 1.1rem; min-width: 38px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: .85rem; font-weight: 600;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap; flex-shrink: 0;
}
.share-btn:hover { opacity: .85; transform: translateY(-2px); }
.share-twitter  { background: #1DA1F2; color: #fff; }
.share-telegram { background: #229ED9; color: #fff; }
.share-whatsapp { background: #25D366; color: #fff; }
.share-copy     { background: var(--surface-2); color: var(--text-main); border: 1px solid var(--border); }
.share-print    { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.share-print:hover { color: var(--accent); border-color: rgba(255,107,53,.35); }
.bookmark-btn   { height: 38px; padding: 0 1rem; display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0; }

.author-box {
  display: flex; gap: 1.5rem; align-items: flex-start;
  padding: 2rem; background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}
.author-box-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 3px solid var(--accent);
}
.author-box-name {
  font-size: 1.1rem; font-weight: 700;
  color: var(--primary); margin-bottom: .2rem;
}
.author-box-role {
  font-size: .82rem; color: var(--accent);
  font-family: var(--font-ui); font-weight: 600;
  margin-bottom: .6rem;
}
.author-box-bio { font-size: .92rem; color: var(--text-muted); line-height: 1.7; text-align: justify; }
.author-social { display: flex; gap: .5rem; margin-top: .85rem; }
.author-social a {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--border); color: var(--text-main);
  transition: background var(--transition), color var(--transition);
}
.author-social a:hover { background: var(--fox-gradient); color: #fff; }

.simple-post-nav { margin: 2rem 0 2.5rem; }
.spn-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.spn-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.spn-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(255,107,53,.13);
  transform: translateY(-2px);
}
.spn-empty { background: transparent; border-color: transparent; box-shadow: none; pointer-events: none; }
.spn-label {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent);
}
.spn-title {
  font-family: var(--font-ui);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: justify;
}
.spn-next { text-align: left; }
@media (max-width: 600px) {
  .spn-inner { grid-template-columns: 1fr; }
  .spn-empty { display: none; }
}

.article-sidebar { position: sticky; top: 96px; }
.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}
.widget-title {
  font-family: var(--font-ui); font-size: .82rem;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted);
  margin-bottom: 1.2rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .5rem;
}
.widget-title::before {
  content: ''; display: block; width: 3px; height: 14px;
  background: var(--fox-gradient); border-radius: 2px;
}

.pop-post-item {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border);
}
.pop-post-item:last-child { border-bottom: none; }

.pop-post-header {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.pop-post-icon-wrap {
  position: relative;
  flex-shrink: 0;
  margin-top: .1rem;
}
.pop-post-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.pop-post-icon svg { display: block; }
.pop-post-num {
  position: absolute;
  top: -4px; right: -5px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .5rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui);
  line-height: 1;
}
.pop-post-title-link {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  display: block;
  color: var(--text-main);
  transition: color .2s;
}
.pop-post-title-link:hover { color: var(--accent); }
.pop-post-date {
  font-size: .7rem;
  font-family: var(--font-ui);
  color: var(--text-muted);
  padding-right: 1.6rem;
}

[data-theme="dark"] .pop-post-item        { border-bottom-color: rgba(255,255,255,.07); }
[data-theme="dark"] .pop-post-title-link  { color: #e2e8f0; }
[data-theme="dark"] .pop-post-title-link:hover { color: #FF6B35; }
[data-theme="dark"] .pop-post-date        { color: #64748b; }
.post-item { display: flex; gap: .9rem; align-items: flex-start; }
.post-item-thumb {
  width: 70px; height: 70px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
}
.post-item-title {
  font-size: .88rem; font-weight: 600; line-height: 1.5;
  color: var(--primary); margin-bottom: .3rem;
  transition: color var(--transition);
  text-align: justify;
  display: block;
}
.post-item-title:hover { color: var(--accent); }
.post-item-date { font-size: .75rem; color: var(--text-muted); font-family: var(--font-ui); }

/* ══════════════════════════════════════════════════════════════
   READING PROGRESS BAR
   ══════════════════════════════════════════════════════════════ */
.mnt-reading-progress {
  position: sticky; top: var(--hdr-h, 65px);
  left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.06);
  z-index: 9997;
}
.mnt-reading-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent) 60%, var(--accent-2) 100%);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
  transition: width .1s linear;
}

/* ══════════════════════════════════════════════════════════════
   TABLE OF CONTENTS — sticky sidebar widget
   ══════════════════════════════════════════════════════════════ */
.mnt-toc {
  background: linear-gradient(160deg, #0f1f38 0%, #0a1628 60%, #0f172a 100%);
  border: 1px solid rgba(0,229,255,.18);
  border-top: 2px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.1rem 1.2rem;
  margin-bottom: 1.75rem;
  max-height: min(55vh, 420px);
  overflow-y: auto;
}
.mnt-toc[hidden] { display: none; }
.mnt-toc-title {
  font-family: var(--font-ui); font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-cyan); margin-bottom: .8rem;
}
.mnt-toc-list { list-style: none; margin: 0; padding: 0; }
.mnt-toc-item { margin: 0; }
.mnt-toc-h3 { padding-inline-start: .85rem; }
.mnt-toc-link {
  display: block;
  font-size: .84rem; line-height: 1.5;
  color: var(--text-muted-dark);
  padding: .4rem 0 .4rem .7rem;
  border-inline-start: 2px solid rgba(255,255,255,.08);
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease;
}
.mnt-toc-link:hover { color: #fff; border-inline-start-color: rgba(0,229,255,.4); }
.mnt-toc-link.mnt-toc-active {
  color: var(--accent-cyan);
  border-inline-start-color: var(--accent-cyan);
  font-weight: 600;
}

.newsletter-widget {
  background: linear-gradient(160deg, #0f1f38 0%, #0a1628 60%, #0f172a 100%);
  border: 1px solid rgba(255,107,53,.2);
  border-top: 2px solid #FF6B35;
  color: var(--text-on-dark);
  text-align: center;
  padding: 1.75rem 1.35rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}
/* faint glow, top corner */
.newsletter-widget::before {
  content: '';
  position: absolute;
  top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 160px; height: 80px;
  background: rgba(255,107,53,.12);
  border-radius: 50%;
  filter: blur(24px);
  pointer-events: none;
}
.newsletter-widget::after { display: none; }
.newsletter-icon {
  font-size: 1.6rem;
  margin-bottom: .6rem;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: rgba(255,107,53,.12);
  border: 1px solid rgba(255,107,53,.25);
  border-radius: 12px;
  margin: 0 auto .85rem;
}
.newsletter-title {
  font-size: .95rem; font-weight: 700; margin-bottom: .35rem;
  color: #f1f5f9;
}
.newsletter-desc {
  font-size: .78rem; line-height: 1.55; margin-bottom: 1.1rem;
  color: rgba(255,255,255,.45);
}
.newsletter-form { display: flex; flex-direction: column; gap: .5rem; }
.newsletter-form input {
  width: 100%; padding: .6rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.1); font-family: var(--font-body); font-size: .85rem;
  outline: none; background: rgba(255,255,255,.05); color: #fff;
  transition: border-color var(--transition);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.28); }
.newsletter-form input:focus { border-color: rgba(255,107,53,.5); background: rgba(255,255,255,.07); }
.newsletter-form button {
  padding: .6rem; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #FF6B35, #E8305A);
  color: #fff; font-weight: 700;
  font-family: var(--font-ui); font-size: .85rem;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 3px 14px rgba(255,107,53,.3);
}
.newsletter-form button:hover { opacity: .88; transform: translateY(-1px); }

.cat-list { display: flex; flex-direction: column; gap: .5rem; }
.cat-item {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .88rem; padding: .4rem .5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.cat-item:hover { background: var(--surface-2); }
.cat-item a { color: var(--text-main); transition: color var(--transition); text-align: justify; }
.cat-item:hover a { color: var(--accent); }
.cat-count {
  background: var(--surface-3); color: var(--text-muted);
  font-size: .75rem; font-weight: 600; font-family: var(--font-ui);
  padding: .15rem .55rem; border-radius: 999px;
}

.ad-widget {
  background: var(--surface-2); border: 1px dashed var(--border);
  border-radius: var(--radius-md); padding: 1.5rem;
  text-align: center; color: var(--text-muted);
  font-size: .8rem; font-family: var(--font-ui);
}


/* ══ AD BANNER STYLES ══ */


.related-posts {
  background: var(--dark-surface-2);
  border-top: 1px solid var(--dark-border);
  padding: 4rem 0;
  margin-top: 0;
}
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 2rem;
}
.section-title {
  font-size: 1.45rem; font-weight: 800;
  color: var(--text-on-dark);
}
.section-link {
  font-family: var(--font-ui); font-size: .85rem; font-weight: 600;
  color: var(--accent); display: flex; align-items: center; gap: .35rem;
}

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.post-card {
  background: var(--surface); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.post-card:hover { box-shadow: 0 8px 32px rgba(255,107,53,.2); transform: translateY(-5px); }

.post-card-thumb {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  line-height: 0; /* remove baseline gap under image */
}
.post-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; /* ensure no inline spacing */
  transition: transform .4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.06); }

.post-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dark-surface-2), var(--dark-surface-3));
  font-size: 3rem;
}

.post-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.post-card-cat {
  font-family: var(--font-ui); font-size: .75rem; font-weight: 700;
  background: var(--fox-gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: .5rem;
}
.post-card-title {
  font-size: 1rem; font-weight: 700; line-height: 1.45;
  color: var(--primary); margin-bottom: .75rem;
  transition: color var(--transition);
  text-align: justify;
  flex: 1;
}
.post-card:hover .post-card-title { color: var(--accent); }
.post-card-meta {
  display: flex; gap: 1rem; align-items: center;
  font-family: var(--font-ui); font-size: .78rem; color: var(--text-muted);
  margin-top: auto;
}

.archive #main-content.container,
.category #main-content.container,
.blog #main-content.container,
.search #main-content.container {
  background: #000000 !important;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

body.archive,
body.category,
body.blog,
body.search { background: #000000 !important; }

.mentometry-pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  font-family: var(--font-ui);
}

.page-numbers-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pag-item a,
.pag-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 .8rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  border: 1px solid var(--dark-border);
  color: var(--text-on-dark);
  background: var(--dark-surface-2);
  text-decoration: none;
  cursor: pointer;
}

.pag-item:not(.pag-current):not(.pag-dots) a:hover {
  background: var(--fox-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.pag-item.pag-current span {
  background: var(--fox-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.pag-item.pag-dots span {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted-dark);
  cursor: default;
  min-width: 24px;
}

.pag-item.pag-arrow a {
  font-size: 1rem;
  min-width: 42px;
}

.page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 2rem;
  font-family: var(--font-ui);
  list-style: none;
  padding: 0;
}
.page-numbers a,
.page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 .7rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid var(--dark-border);
  color: var(--text-on-dark);
  background: var(--dark-surface-2);
  text-decoration: none;
  transition: all var(--transition);
}
.page-numbers a:hover { background: var(--fox-gradient); border-color:transparent; color:#fff; }
.page-numbers .current { background: var(--fox-gradient); border-color:transparent; color:#fff; }
.page-numbers .dots { background:transparent; border-color:transparent; color:var(--text-muted-dark); }

.comments-pagination .page-numbers,
.comment-navigation .nav-links {
  justify-content: center;
}

.comments-section {
  padding: 3rem 0 0;
  background: var(--surface);
}
#comments-wrap {
  background: var(--surface);
}
.comments-title {
  margin-bottom: 1.75rem; font-size: 1.3rem; font-weight: 800;
  color: var(--text-main); text-align: left;
  padding-bottom: 1rem; border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: .6rem;
}
.comments-title::before {
  content: '💬'; font-size: 1.1rem;
}

/* ── Card-style comments ── */
.comment {
  display: flex; gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color .2s;
}
.comment:hover { border-color: rgba(255,107,53,.25); }
.comment.child {
  margin-right: 2.5rem; margin-bottom: .75rem;
  background: var(--surface);
  border-right: 3px solid var(--accent);
}
.comment-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,53,.1);
}
.comment-body { flex: 1; min-width: 0; }
.comment-author-name {
  font-weight: 700; font-size: .88rem;
  color: var(--accent); margin-bottom: .2rem;
}
.comment-date {
  font-size: .75rem; color: var(--text-muted);
  font-family: var(--font-ui);
}
.comment-text {
  font-size: .9rem; color: var(--text-main);
  margin-top: .55rem; line-height: 1.75; text-align: justify;
}
.comment-text p { margin-bottom: .6rem; text-align: justify; }
.comment-text p:last-child { margin-bottom: 0; }
.comment-reply {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
  margin-top: .6rem; padding: .25rem .7rem;
  background: var(--surface-3); border-radius: 999px;
  transition: all .2s; text-decoration: none;
}
.comment-reply:hover { background: rgba(255,107,53,.1); color: var(--accent); }

/* ── Dark mode comments ── */
[data-theme="dark"] .comment {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .comment:hover { border-color: rgba(255,107,53,.3); }
[data-theme="dark"] .comment.child {
  background: rgba(255,255,255,.02);
  border-right-color: var(--accent);
}
[data-theme="dark"] .comment-author-name { color: #FF6B35; }
[data-theme="dark"] .comment-text       { color: #e2e8f0; }
[data-theme="dark"] .comment-text p     { color: #e2e8f0; }
[data-theme="dark"] .comment-date       { color: #64748b; }
[data-theme="dark"] .comment-reply      { background: rgba(255,255,255,.06); color: #64748b; }
[data-theme="dark"] .comment-reply:hover { background: rgba(255,107,53,.12); color: #FF6B35; }

.comment-form-wrap {
  background: var(--surface-2); border-radius: var(--radius-lg);
  padding: 2rem; margin-top: 2rem;
  border: 1px solid var(--border);
}
[data-theme="dark"] .comment-form-wrap { background: rgba(15,23,42,.8); border-color: rgba(255,255,255,.1); }
.comment-form-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--text-main); }
[data-theme="dark"] .comment-form-title { color: #f1f5f9; }

/* ══ WordPress comment_form() full override ══ */
#respond {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  direction: ltr;
}
[data-theme="dark"] #respond {
  background: rgba(15,23,42,.85);
  border-color: rgba(255,255,255,.1);
}

/* Title */
#reply-title,
.comment-reply-title {
  font-size: 1.15rem; font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  padding-bottom: .85rem;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: .5rem;
}
#reply-title::before, .comment-reply-title::before { content: '✏️'; font-size: 1rem; }
[data-theme="dark"] #reply-title,
[data-theme="dark"] .comment-reply-title { color: #f1f5f9; border-bottom-color: rgba(255,255,255,.1); }
#reply-title small, .comment-reply-title small { margin-left: auto; }
#reply-title small a, .comment-reply-title small a {
  font-size: .78rem; font-weight: 600; color: #ef4444;
  text-decoration: none; font-family: var(--font-ui);
}

/* WP comment form fields wrapper */
#commentform { display: flex; flex-direction: column; gap: 1rem; }
#commentform p { margin: 0; }

/* All inputs & textarea */
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea,
#comment, #author, #email, #url {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--surface);
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  direction: ltr;
}
#commentform input[type="text"]:focus,
#commentform input[type="email"]:focus,
#commentform input[type="url"]:focus,
#commentform textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}
[data-theme="dark"] #commentform input[type="text"],
[data-theme="dark"] #commentform input[type="email"],
[data-theme="dark"] #commentform input[type="url"],
[data-theme="dark"] #commentform textarea {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
  color: #f1f5f9;
}
[data-theme="dark"] #commentform input:focus,
[data-theme="dark"] #commentform textarea:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,.07);
}

/* Textarea height */
#commentform textarea, #comment {
  min-height: 140px; resize: vertical; line-height: 1.7;
}

/* Labels */
#commentform label {
  display: block;
  font-family: var(--font-ui); font-size: .82rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: .35rem;
}
[data-theme="dark"] #commentform label { color: #94a3b8; }

/* Name / Email / URL row — 3 columns */
.comment-form-author,
.comment-form-email,
.comment-form-url {
  flex: 1;
}
#commentform p.comment-form-author,
#commentform p.comment-form-email,
#commentform p.comment-form-url {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .35rem .75rem;
}

/* Group name/email/url in a row */
.comment-fields-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem;
}
/* WP wraps in <p> tags — force them into a flex row */
#commentform > p.comment-form-author,
#commentform > p.comment-form-email,
#commentform > p.comment-form-url {
  display: flex; flex-direction: column;
}

/* Submit button */
#commentform input[type="submit"],
.form-submit #submit {
  padding: .8rem 2rem;
  background: var(--fox-gradient);
  color: #fff; border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: .95rem; font-weight: 700;
  cursor: pointer; transition: opacity var(--transition);
  box-shadow: 0 4px 16px rgba(255,107,53,.25);
  width: auto; min-width: 140px;
}
#commentform input[type="submit"]:hover { opacity: .85; }

/* Required asterisk */
.required-field-message,
.comment-notes {
  font-size: .8rem; color: var(--text-muted);
  margin-bottom: 1rem; font-family: var(--font-ui);
}
[data-theme="dark"] .required-field-message,
[data-theme="dark"] .comment-notes { color: #64748b; }

/* Cookies checkbox */
.comment-form-cookies-consent {
  display: flex; align-items: flex-start; gap: .5rem;
  font-size: .82rem; color: var(--text-muted); font-family: var(--font-ui);
  line-height: 1.5;
}
.comment-form-cookies-consent input { margin-top: 2px; flex-shrink: 0; }
[data-theme="dark"] .comment-form-cookies-consent { color: #64748b; }

/* Logged in as */
.logged-in-as {
  font-size: .85rem; color: var(--text-muted); font-family: var(--font-ui);
  margin-bottom: .5rem;
}
[data-theme="dark"] .logged-in-as { color: #64748b; }
[data-theme="dark"] .logged-in-as a { color: #94a3b8; }

/* Must-log-in message */
.must-log-in { font-size: .9rem; color: var(--text-muted); }
[data-theme="dark"] .must-log-in { color: #94a3b8; }
.must-log-in a { color: var(--accent); }

@media (max-width: 768px) {
  #respond { padding: 1.25rem 1rem; }
  #commentform p.comment-form-author,
  #commentform p.comment-form-email,
  #commentform p.comment-form-url { flex-direction: column; }
}
@media (max-width: 480px) {
  #respond { padding: 1rem .75rem; border-radius: var(--radius-md); }
}

/* ══ Sidebar ad ══ */
.sidebar-ad-wrap { margin-bottom: 1.5rem; }
.sidebar-ad-wrap .mentometry-ad-wrap { border-radius: var(--radius-md); overflow: hidden; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full { grid-column: span 2; }
.form-label { font-family: var(--font-ui); font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.form-input, .form-textarea {
  padding: .7rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font-body);
  font-size: .95rem; background: var(--surface); outline: none;
  transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { min-height: 130px; resize: vertical; }
.submit-btn {
  padding: .8rem 2rem; background: var(--fox-gradient); color: #fff;
  border-radius: var(--radius-sm); font-family: var(--font-ui);
  font-weight: 700; font-size: .95rem;
  transition: opacity var(--transition);
  box-shadow: var(--shadow-accent);
}
.submit-btn:hover { opacity: .85; }

.site-footer {
  background: var(--dark-surface); color: var(--text-muted-dark);
  padding: 4rem 0 0;
  border-top: 1px solid var(--dark-border);
}
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem; padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-dark);
}
.footer-brand .site-title { color: #fff; font-size: 1.4rem; }
.footer-brand .site-description { color: var(--text-muted-dark); margin-top: .25rem; }
.footer-brand .custom-logo-link { display: inline-block; }
.footer-brand img.custom-logo { max-width: 180px; height: auto; object-fit: contain; }
.footer-about { font-size: .88rem; line-height: 1.75; margin-top: 1rem; opacity: .7; text-align: justify; }
.footer-widget-title {
  color: #fff; font-family: var(--font-ui); font-size: .82rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--dark-border);
  position: relative;
}
.footer-widget-title::after {
  content: '';
  position: absolute; bottom: -1px; right: 0;
  width: 40px; height: 1px;
  background: var(--fox-gradient);
}
.footer-links { display: flex; flex-direction: column; gap: .55rem; }
.footer-links-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  row-gap: .55rem;
}
.footer-links a {
  color: var(--text-muted-dark); font-size: .88rem;
  transition: color var(--transition);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .2rem 0;
}
.footer-links a:hover { color: var(--accent); }

.footer-cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255,107,53,.15);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--font-ui);
  flex-shrink: 0;
}

.footer-network-links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .5rem;
}
.footer-network-links a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: var(--text-muted-dark);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: .25rem .7rem;
  transition: all var(--transition);
  text-decoration: none;
}
.footer-network-links a:hover {
  background: rgba(255,107,53,.12);
  border-color: rgba(255,107,53,.25);
  color: var(--accent);
}
.footer-social { display: flex; gap: .65rem; margin-top: 1.25rem; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.07); color: var(--text-muted-dark);
  transition: background var(--transition), color var(--transition);
  border: 1px solid var(--dark-border);
}
.footer-social a:hover { background: var(--fox-gradient); color: #fff; border-color: transparent; }

/* ══ Footer live stats strip (real DB-driven numbers) ══ */
.footer-stats {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 2.5rem; padding: 1.75rem 0; margin-bottom: -1px;
  border-top: 1px solid var(--dark-border);
}
.footer-stat { text-align: center; }
.footer-stat-num {
  display: block;
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1.2;
}
.footer-stat-label {
  display: block; margin-top: .2rem;
  font-family: var(--font-ui); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted-dark);
}
@media (max-width: 640px) {
  .footer-stats { gap: 1.5rem; }
  .footer-stat-num { font-size: 1.3rem; }
}

.footer-bottom {
  padding: 1.25rem 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: .75rem; font-size: .8rem; opacity: .5;
  border-top: 1px solid var(--dark-border);
}

.back-to-top {
  position: fixed; bottom: 2rem; left: 2rem; z-index: 400;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--fox-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-accent);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-4px); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease forwards; }

@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; gap: 2rem; }
  .article-sidebar { position: static; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .primary-nav { display: none; }
  .mobile-menu-toggle { display: flex; }

  /* ticker height variable update for mobile */
  :root { --ticker-h: 32px; }

  .primary-nav.mobile-open {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; z-index: 490;
    background: var(--dark-surface);
    padding: calc(var(--hdr-h) + var(--ticker-h) + 2.5rem) 1.5rem 2rem;
    gap: .5rem;
    overflow-y: auto;
  }
  .primary-nav.mobile-open a {
    padding: .85rem 1rem; font-size: 1.05rem;
    border-radius: var(--radius-md);
    border-bottom: 1px solid var(--dark-border);
    color: var(--text-on-dark);
  }

  .hero-visual { min-height: 240px; }
  .hero-title-wrap { padding-bottom: 1.25rem; }
  .article-title, .hero-title { font-size: 1.4rem; }
  .article-excerpt, .hero-excerpt { font-size: .9rem; }

  .article-byline { gap: .75rem; padding: .75rem 0; }
  .byline-info { width: 100%; gap: .6rem; }
  .byline-item { font-size: .75rem; }

  .article-layout { padding: 1.25rem 1rem 3rem; gap: 1.5rem; }

  .comment { gap: .65rem; padding: 1rem 0; }
  .comment-avatar { width: 36px; height: 36px; }
  .comment-form-wrap { padding: 1.25rem 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: span 1; }
  .comments-title { font-size: 1.2rem; margin-bottom: 1.25rem; }

  .author-box { flex-direction: column; align-items: center; text-align: center; padding: 1.25rem; }
  .author-social { justify-content: center; }
  .author-box-bio { text-align: justify; }
  .author-box-name, .author-box-role { text-align: center; }

  .share-buttons { flex-wrap: wrap; gap: .5rem; }
  .share-btn { font-size: .8rem; padding: .45rem .85rem; }

  .rating-feedback { flex-wrap: wrap; }

  .spn-inner { grid-template-columns: 1fr; }
  .spn-empty { display: none; }

  .related-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-network-links { gap: .3rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-social { flex-wrap: wrap; }

  .pag-item a, .pag-item span,
  .page-numbers a,
  .page-numbers span { min-width: 36px; height: 36px; font-size: .82rem; padding: 0 .5rem; }

  .back-to-top { bottom: 1.25rem; left: 1.25rem; width: 40px; height: 40px; }

  #bmGrid > div:first-child { flex-direction: column; align-items: flex-start; }

  .nl-popup { padding: 1.25rem; }
  .nl-popup-form { flex-direction: column; }

  .resume-banner { flex-wrap: wrap; justify-content: center; text-align: center; white-space: normal; }
}

@media (max-width: 480px) {
  .container { padding-inline: 1rem; }
  .footer-links-2col { column-gap: .9rem; }
  .footer-links-2col a { font-size: .82rem; }
  .article-layout { padding: 1rem .75rem 2.5rem; }
  /* table font smaller on mobile */
  .article-content table { font-size: .82rem; }
  .article-content th, .article-content td { padding: .55rem .75rem; }

  .hero-visual { min-height: 200px; }
  .article-title, .hero-title { font-size: 1.2rem; }
  .hero-meta-bar { padding-top: 1rem; padding-bottom: .5rem; }

  .breadcrumb { font-size: .75rem; }

  .tag-link { font-size: .72rem; padding: .25rem .65rem; }

  /* share buttons: icon only on small screens, all in one row */
  .share-text { display: none !important; }
  .share-buttons { gap: .3rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .share-btn  { width: 36px; min-width: 36px; height: 36px; padding: 0; flex: 0 0 36px; font-size: 0; }
  .share-btn svg { width: 17px; height: 17px; }
  .bookmark-btn .bm-text { display: none !important; }
  .bookmark-btn {
    width: 36px; height: 36px; padding: 0; flex: 0 0 36px;
    justify-content: center; min-width: 36px;
    background: rgba(255,255,255,.1) !important;
    border: 1.5px solid rgba(255,255,255,.25) !important;
    color: #e2e8f0 !important;
  }
  .bookmark-btn svg { width: 18px; height: 18px; }

  .rating-star { font-size: 1.75rem; }

  .author-box { padding: 1rem; gap: 1rem; }
  .author-box-avatar { width: 64px; height: 64px; }

  .comment-form-wrap { padding: 1rem .75rem; }

  .footer-social a { width: 34px; height: 34px; }
  .footer-bottom { font-size: .72rem; }

  .page-numbers-list { gap: .25rem; }
  .pag-item a, .pag-item span { min-width: 32px; height: 32px; font-size: .78rem; }

  .post-card-body { padding: 1rem; }
  .post-card-title { font-size: .92rem; }
}


@media (max-width: 480px) {
  .post-card { min-width: 0; width: 100%; }
  .post-card-thumb img { width: 100%; height: 180px; object-fit: cover; }
  .related-grid { grid-template-columns: 1fr !important; }
}


/* ══ Footer Newsletter Popup (#nlPopup) ══ */
#nlPopup {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
#nlPopup.open { opacity: 1; pointer-events: auto; }
.nl-popup-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
}
.nl-popup-box {
  position: relative; z-index: 1;
  background: #0f172a;
  border: 1px solid rgba(255,107,53,.2);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  width: min(460px, 92vw);
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  animation: nlSlideIn .35s cubic-bezier(.22,.68,0,1.2) both;
}
@keyframes nlSlideIn {
  from { transform: translateY(20px) scale(.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}
.nl-popup-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #FF6B35, #E8305A, #7B2FBE);
  border-radius: 20px 20px 0 0;
}
.nl-popup-close {
  position: absolute; top: 1rem; left: 1rem;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s;
}
.nl-popup-close:hover { background: rgba(239,68,68,.15); color: #ef4444; }
.nl-popup-icon { font-size: 2.5rem; margin-bottom: .6rem; line-height: 1; }
.nl-popup-title {
  font-size: 1.2rem; font-weight: 800;
  color: #fff; margin-bottom: .5rem; line-height: 1.3;
}
.nl-popup-desc {
  color: rgba(255,255,255,.55); font-size: .88rem;
  line-height: 1.65; margin-bottom: 1.25rem;
}
.nl-popup-form { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .6rem; }
.nl-popup-form p { display: none; }
.nl-popup-form input[type="email"] {
  width: 100%; padding: .7rem 1rem;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px; color: #f1f5f9;
  font-size: .92rem; outline: none;
  transition: border-color .2s; text-align: center;
}
.nl-popup-form input[type="email"]:focus { border-color: #FF6B35; }
.nl-popup-form input[type="email"]::placeholder { color: rgba(255,255,255,.3); }
.nl-popup-form button[type="submit"] {
  width: 100%; padding: .75rem;
  background: linear-gradient(135deg, #FF6B35, #E8305A);
  color: #fff; border: none; border-radius: 10px;
  font-size: .92rem; font-weight: 700; cursor: pointer;
  transition: opacity .2s;
}
.nl-popup-form button[type="submit"]:hover { opacity: .88; }
.nl-popup-msg {
  font-size: .82rem; border-radius: 8px;
  padding: .4rem .75rem; display: none; line-height: 1.5;
}
.nl-popup-privacy { color: rgba(255,255,255,.3); font-size: .72rem; margin: 0; }
@media (max-width: 480px) {
  .nl-popup-box { padding: 1.75rem 1.25rem; }
  .nl-popup-title { font-size: 1.05rem; }
}


/* ── Prose justify globally ── */
.newsletter-desc,
.author-box-bio,
.footer-about,
.cat-desc,
.mnt-404-desc,
.comment-text,
.comment-text p,
.article-excerpt,
.article-content p,
.article-content li {
  text-align: justify;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
  color: #f1f5f9;
}
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus { border-color: #FF6B35; }
[data-theme="dark"] .form-label { color: #94a3b8; }
[data-theme="dark"] .submit-btn { box-shadow: 0 4px 16px rgba(255,107,53,.25); }
[data-theme="dark"] .comments-title { color: #f1f5f9; border-bottom-color: rgba(255,255,255,.1); }
[data-theme="dark"] .comment-form-title { color: #f1f5f9; }

/* 3-column grid for name / email / url */
.comment-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .85rem;
}
@media (max-width: 640px) {
  .comment-fields-grid { grid-template-columns: 1fr; }
}

@media print {
  .site-topbar, .site-header, .article-sidebar,
  .related-posts, .comments-section, .site-footer,
  .reading-progress, .back-to-top, .share-section,
  .breadcrumb-wrap { display: none !important; }

  body { font-size: 12pt; color: #000; background: #fff; }
  .article-layout { display: block; padding: 0; background: #fff; }
  a { text-decoration: underline; color: #000; }
  h1, h2, h3 { page-break-after: avoid; }
  img { max-width: 100%; page-break-inside: avoid; }
}

.live-search-wrap { position: relative; }
.live-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--dark-surface-2);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 600;
  max-height: 420px;
  overflow-y: auto;
  display: none;
}
.live-search-results.open { display: block; }
.ls-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--dark-border);
  text-decoration: none;
  transition: background var(--transition);
  cursor: pointer;
}
.ls-item:last-child { border-bottom: none; }
.ls-item:hover { background: rgba(255,107,53,.08); }
.ls-thumb {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--dark-surface-3);
}
.ls-thumb-placeholder {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--dark-surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.ls-info { flex: 1; min-width: 0; }
.ls-title {
  font-family: var(--font-ui); font-size: .88rem; font-weight: 600;
  color: var(--text-on-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: .2rem;
}
.ls-title mark {
  background: rgba(255,107,53,.3);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}
.ls-meta {
  font-size: .73rem; color: var(--text-muted-dark);
  font-family: var(--font-ui);
}
.ls-cat {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  background: var(--fox-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: .5rem;
}
.ls-empty, .ls-loading {
  padding: 1.25rem 1rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--text-muted-dark);
}
.ls-loading::before {
  content: '';
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,107,53,.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin-left: .5rem;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ls-all-link {
  display: block;
  text-align: center;
  padding: .65rem;
  font-family: var(--font-ui); font-size: .8rem; font-weight: 600;
  color: var(--accent);
  border-top: 1px solid var(--dark-border);
  transition: background var(--transition);
}
.ls-all-link:hover { background: rgba(255,107,53,.08); }

.resume-banner {
  position: fixed;
  bottom: 5rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--dark-surface-2);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: .75rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 450;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  font-family: var(--font-ui); font-size: .85rem;
  color: var(--text-on-dark);
  white-space: nowrap;
  max-width: 90vw;
}
.resume-banner.visible {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.resume-banner strong { color: var(--accent); }
.resume-btn {
  padding: .4rem .9rem;
  background: var(--fox-gradient);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: .8rem; font-weight: 700;
  cursor: pointer; transition: opacity var(--transition);
  white-space: nowrap;
}
.resume-btn:hover { opacity: .85; }
.resume-close {
  background: none; border: none;
  color: var(--text-muted-dark); font-size: 1rem;
  cursor: pointer; padding: 0 .25rem;
  transition: color var(--transition);
}
.resume-close:hover { color: var(--text-on-dark); }

.bookmark-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .55rem 1.1rem;
  background: var(--surface-2); color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
/* Dark mode: surface-2 is transparent there so we need explicit bg */
[data-theme="dark"] .bookmark-btn {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
  color: #e2e8f0;
}
.bookmark-btn:hover { border-color: var(--accent); color: var(--accent); }
.bookmark-btn.bookmarked {
  background: var(--fox-gradient); color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-accent);
}
.bookmark-btn svg { transition: transform .2s; width: 20px; height: 20px; stroke: currentColor; display: block; }
.bookmark-btn.bookmarked svg { transform: scale(1.15); fill: currentColor; }

.bookmarks-page { max-width: var(--max-w); margin: 3rem auto; padding: 0 1.5rem; }
.bookmarks-empty {
  text-align: center; padding: 4rem 2rem;
  color: var(--text-muted-dark); font-family: var(--font-ui);
}
.bookmarks-empty svg { opacity: .3; margin: 0 auto 1rem; display: block; }

.post-card { position: relative; }
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--cat-color, var(--fox-gradient));
  z-index: 1;
}

.cat-color-crypto   { --cat-color: linear-gradient(90deg,#FF6B35,#E8305A); }
.cat-color-ai       { --cat-color: linear-gradient(90deg,#7B2FBE,#38bdf8); }
.cat-color-tech     { --cat-color: linear-gradient(90deg,#0ea5e9,#6366f1); }
.cat-color-business { --cat-color: linear-gradient(90deg,#22c55e,#16a34a); }
.cat-color-finance  { --cat-color: linear-gradient(90deg,#f59e0b,#d97706); }
.cat-color-default  { --cat-color: linear-gradient(90deg,#FF6B35,#E8305A,#7B2FBE); }

.nl-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 800;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(4px);
}
.nl-popup-overlay.open { opacity: 1; pointer-events: auto; }
.nl-popup {
  position: fixed;
  bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(30px);
  width: min(460px, 94vw);
  background: var(--dark-surface-2);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 801;
  opacity: 0; pointer-events: none;
  transition: opacity .35s, transform .35s;
}
.nl-popup::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--fox-gradient);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.nl-popup-overlay.open + .nl-popup,
.nl-popup.open {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nl-popup-close {
  position: absolute; top: .75rem; left: .75rem;
  width: 28px; height: 28px;
  background: rgba(255,255,255,.07); border: none; border-radius: 50%;
  color: var(--text-muted-dark); font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition);
}
.nl-popup-close:hover { background: rgba(255,107,53,.15); color: var(--accent); }
.nl-popup-icon { font-size: 2rem; margin-bottom: .75rem; }
.nl-popup-title {
  font-size: 1.1rem; font-weight: 800; color: #fff;
  margin-bottom: .4rem;
}
.nl-popup-desc { font-size: .85rem; color: var(--text-muted-dark); margin-bottom: 1rem; line-height: 1.6; }
.nl-popup-form { display: flex; gap: .5rem; }
.nl-popup-form input {
  flex: 1; padding: .65rem .9rem;
  background: rgba(255,255,255,.07);
  border: 1.5px solid var(--dark-border); border-radius: var(--radius-sm);
  color: #fff; font-family: var(--font-body); font-size: .9rem;
  outline: none;
}
.nl-popup-form input:focus { border-color: var(--accent); }
.nl-popup-form input::placeholder { color: rgba(255,255,255,.3); }
.nl-popup-form button {
  padding: .65rem 1.1rem;
  background: var(--fox-gradient); color: #fff; border: none;
  border-radius: var(--radius-sm); font-weight: 700;
  font-family: var(--font-ui); font-size: .85rem;
  cursor: pointer; transition: opacity var(--transition);
  white-space: nowrap;
}
.nl-popup-form button:hover { opacity: .85; }
.nl-popup-msg { font-size: .82rem; margin-top: .6rem; border-radius: 6px; padding: .4rem .75rem; display: none; }
@media (max-width: 480px) {
  .nl-popup-form { flex-direction: column; }
}

.article-rating {
  padding: 1.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  margin-bottom: 2rem;
}
.rating-title {
  font-family: var(--font-ui); font-size: .85rem; font-weight: 700;
  color: var(--text-muted); margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.rating-stars {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: .2rem;
  margin-bottom: .85rem;
  direction: ltr;
}
.rating-star {
  font-size: 2rem;
  cursor: pointer;
  color: #d1d5db;
  transition: color .12s, transform .1s;
  background: none; border: none;
  padding: .05rem .1rem;
  line-height: 1;
  display: inline-block;
}

.rating-stars.hovering .rating-star,
.rating-stars .rating-star.fill {
  color: #f59e0b;
}

.rating-stars.hovering .rating-star.dim,
.rating-stars .rating-star.dim {
  color: #d1d5db;
}

.rating-stars.hovering .rating-star.active-hover {
  transform: scale(1.25);
  color: #fbbf24;
}

.rating-stars.done .rating-star.fill {
  color: #f59e0b;
}
.rating-stars.done .rating-star.dim {
  color: #d1d5db;
}
.rating-feedback { display: flex; justify-content: center; gap: .75rem; margin-bottom: .75rem; direction: ltr; }
.rating-thumb {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-ui); font-size: .85rem; font-weight: 600;
  cursor: pointer; background: var(--surface);
  transition: all var(--transition); color: var(--text-muted);
}
.rating-thumb:hover.up   { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.07); }
.rating-thumb:hover.down { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,.07); }
.rating-thumb.active.up  { border-color: #22c55e !important; color: #22c55e !important; background: rgba(34,197,94,.1) !important; }
.rating-thumb.active.down{ border-color: #ef4444 !important; color: #ef4444 !important; background: rgba(239,68,68,.1) !important; }
.rating-score { font-family: var(--font-ui); font-size: .8rem; color: var(--text-muted); }
.rating-score span { color: var(--accent); font-weight: 700; }
.rating-thanks { font-family: var(--font-ui); font-size: .9rem; color: var(--accent); font-weight: 600; display: none; }

.tag-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 700;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.tag-panel-overlay.open { opacity: 1; pointer-events: auto; }
.tag-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--dark-surface-2);
  border-top: 1px solid var(--dark-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.5rem;
  z-index: 701;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  max-height: 70vh; overflow-y: auto;
}
.tag-panel.open { transform: translateY(0); }
.tag-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.tag-panel-title {
  font-family: var(--font-ui); font-size: .95rem; font-weight: 700;
  color: var(--text-on-dark);
}
.tag-panel-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: none;
  color: var(--text-muted-dark); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.tag-panel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.tag-panel-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem; background: rgba(255,255,255,.04);
  border: 1px solid var(--dark-border); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-on-dark);
  transition: background var(--transition), border-color var(--transition);
}
.tag-panel-item:hover { background: rgba(255,107,53,.08); border-color: rgba(255,107,53,.25); }
.tag-panel-thumb {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
  background: var(--dark-surface-3);
}
.tag-panel-item-title { font-size: .83rem; font-weight: 600; line-height: 1.4; }
.tag-panel-item-date { font-size: .72rem; color: var(--text-muted-dark); margin-top: .2rem; }
.tag-panel-loading { text-align: center; padding: 2rem; color: var(--text-muted-dark); font-family: var(--font-ui); }

#bmList .post-card-thumb {
  aspect-ratio: 16/9;
  display: block;
  overflow: hidden;
}
#bmList .bm-remove-btn:hover {
  color: #ef4444 !important;
}

/* ══ AD BANNERS — clean, image-driven height, no forced aspect-ratio ══ */
.mentometry-ad-wrap {
  position: relative;
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  /* no border, no background — image fills everything */
  line-height: 0;
}

.ad-label-badge {
  position: absolute;
  top: 8px; right: 10px; z-index: 2;
  background: rgba(10,10,15,.78);
  color: rgba(255,255,255,.65);
  font-family: var(--font-ui);
  font-size: .65rem; font-weight: 700;
  padding: .18rem .55rem;
  border-radius: 999px;
  letter-spacing: .04em;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.12);
}

.ad-grid {
  display: grid;
  gap: 4px;
  align-items: start;
}
.ad-cols-1 { grid-template-columns: 1fr; }
.ad-cols-2 { grid-template-columns: 1fr 1fr; }
.ad-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ad-item: image cover only, natural image height */
.ad-item {
  display: block;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
}
.ad-item img {
  width: 100%;
  height: auto;          /* natural image height — no crop */
  display: block;
  object-fit: fill;      /* show the full image */
  transition: opacity .25s;
}
.ad-item:hover img { opacity: .92; }

/* placeholder only when there is no image */
.ad-placeholder {
  display: none !important;  /* hidden — takes no space */
}

@media (max-width: 600px) {
  .ad-cols-2 { grid-template-columns: 1fr; }
  .ad-cols-4 { grid-template-columns: 1fr 1fr; }
}

/* ══ Font size A+/A- ══ */
.mnt-font-btns { display: flex; gap: 2px; }
.mnt-font-btn  { font-family: var(--font-ui) !important; }
/* Font size — applied to <html> via data-font attribute */
html[data-font="sm"] .article-content,
html[data-font="sm"] .comment-text    { font-size: .9rem  !important; line-height: 1.75 !important; }
html[data-font="md"] .article-content,
html[data-font="md"] .comment-text    { font-size: 1.05rem !important; line-height: 1.9 !important; }
html[data-font="lg"] .article-content,
html[data-font="lg"] .comment-text    { font-size: 1.18rem !important; line-height: 2.05 !important; }
html[data-font="xl"] .article-content,
html[data-font="xl"] .comment-text    { font-size: 1.32rem !important; line-height: 2.15 !important; }
/* Highlight active font button */
html[data-font="sm"] #fontDecrease,
html[data-font="xl"] #fontIncrease    { color: var(--accent) !important; }

/* ══ Reading Mode ══ */
body.reading-mode .article-sidebar,
body.reading-mode .related-posts,
body.reading-mode .mnt-ticker,
body.reading-mode #comments-wrap .comment-form-wrap { display: none !important; }
body.reading-mode .article-layout { grid-template-columns: 1fr !important; max-width: 760px; padding: 2rem 1.5rem 4rem; }
@media (max-width: 600px) {
  body.reading-mode .article-layout { padding: 1.25rem 1rem 3rem; }
}
body.reading-mode .mnt-header { background: rgba(2,6,23,.95) !important; }
#readingModeBtn.active { color: var(--accent) !important; background: rgba(255,107,53,.1) !important; border-color: rgba(255,107,53,.3) !important; }

/* ══ Copy Code Button ══ */
.code-block-wrap { position: relative; }
.copy-code-btn {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 9px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 5px; color: rgba(255,255,255,.7);
  font-size: 11px; font-family: var(--font-ui); font-weight: 600;
  cursor: pointer; transition: all .2s;
  opacity: 0; pointer-events: none;
}
.code-block-wrap:hover .copy-code-btn,
.copy-code-btn:focus { opacity: 1; pointer-events: auto; }
.copy-code-btn.copied { color: #22c55e; border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.1); }

/* ══ Glossary Tooltip ══ */
.mnt-glossary {
  text-decoration: underline dotted rgba(255,107,53,.5);
  cursor: help;
  text-underline-offset: 3px;
  position: relative;
}
.mnt-glossary::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  right: 50%; transform: translateX(50%);
  background: #0f172a;
  border: 1px solid rgba(255,107,53,.3);
  color: #e2e8f0; font-size: .78rem; line-height: 1.5;
  padding: .5rem .75rem; border-radius: 8px;
  white-space: normal; width: 240px; text-align: left;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  z-index: 9999;
}
.mnt-glossary:hover::after { opacity: 1; }

/* ══ Load More Button ══ */
.load-more-wrap { text-align: center; margin: 2.5rem 0 1rem; }
.load-more-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 2.5rem;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px; color: #94a3b8;
  font-family: var(--font-ui); font-size: .92rem; font-weight: 700;
  cursor: pointer; transition: all .25s;
}
.load-more-btn:hover { background: rgba(255,107,53,.1); border-color: rgba(255,107,53,.35); color: #FF6B35; }
.load-more-btn.loading { opacity: .6; pointer-events: none; }
.load-more-btn .lm-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #FF6B35;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.load-more-btn.loading .lm-spinner { display: block; }
.load-more-btn.loading .lm-text::before { content: 'Loading...'; }
.load-more-btn.loading .lm-text > * { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ Update Badge ══ */
.update-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  color: #22c55e;
  font-family: var(--font-ui); font-size: .75rem; font-weight: 700;
  margin-right: .4rem;
}
.update-badge::before {
  content: '✓';
  font-size: .8rem;
  font-weight: 800;
}

/* ══ Print Button ══ */
.print-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1rem; background: transparent;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted); font-family: var(--font-ui);
  font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: all .2s;
}
.print-btn:hover { color: var(--accent); border-color: rgba(255,107,53,.3); }
@media print {
  .mnt-ticker, .mnt-header, .article-sidebar, .related-posts,
  .share-section, .article-rating, .back-to-top, .mnt-mobile-nav,
  #nlPopup, .site-footer, .mentometry-ad-wrap,
  .load-more-wrap, .print-btn, .share-print { display: none !important; }
  .article-layout { grid-template-columns: 1fr !important; }
  .article-content { font-size: 12pt; line-height: 1.6; color: #000 !important; }
  body { background: #fff !important; }
}

/* ══════════════════════════════════════════════════════════════
   SETTINGS PANEL — gear
   ══════════════════════════════════════════════════════════════ */
#settingsToggle { position: relative; }
#settingsToggle.active { color: var(--accent); background: rgba(255,107,53,.1); }

.mnt-settings-panel {
  position: fixed;
  top: calc(var(--ticker-h,32px) + var(--hdr-h,65px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 99998;
  width: min(265px, 90vw);
  background: #0d1526;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 8px 0;
  box-shadow: 0 20px 60px rgba(0,0,0,.85);
  animation: sp-in .18s cubic-bezier(.22,.68,0,1.2);
  transform-origin: top center;
}
.mnt-settings-panel[hidden] { display: none; }
@keyframes sp-in {
  from { opacity:0; transform: translateX(-50%) scale(.94) translateY(-6px); }
  to   { opacity:1; transform: translateX(-50%) scale(1)   translateY(0); }
}

/* arrow removed — panel is centered on screen and no longer anchored under the gear button */
.mnt-sp-arrow { display: none; }

.mnt-sp-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
}
.mnt-sp-label {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-size: .8rem; font-weight: 600;
  color: #94a3b8;
  flex-shrink: 0;
}
.mnt-sp-divider {
  height: 1px; background: rgba(255,255,255,.06); margin: 2px 0;
}

/* ─── Theme row ─── */
.mnt-sp-toggle {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 4px 10px;
  cursor: pointer; transition: all .2s;
  color: #94a3b8; font-family: var(--font-ui); font-size: .78rem; font-weight: 600;
}
.mnt-sp-toggle:hover { background: rgba(255,107,53,.1); border-color: rgba(255,107,53,.3); color: #FF6B35; }
.sp-theme-label { font-size: .78rem; }
.mnt-sp-pill { display: flex; align-items: center; }
/* icon-moon/sun inherit from existing header CSS */

/* ─── Theme icon buttons side by side ─── */
.mnt-sp-theme-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  padding: 3px;
}
.sp-theme-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 28px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all .2s;
}
.sp-theme-icon:hover { color: #94a3b8; }
/* Active state via [data-theme] on <html> */
[data-theme="dark"]  .sp-theme-dark  { background: rgba(255,255,255,.12); color: #f1f5f9; }
[data-theme="light"] .sp-theme-light { background: rgba(255,107,53,.15); color: #FF6B35; }

/* ─── Font ctrl ─── */
.mnt-sp-font-ctrl {
  display: flex; align-items: center; gap: 6px;
}
.mnt-sp-font-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px; cursor: pointer;
  color: #94a3b8; font-family: var(--font-ui); font-size: 12px; font-weight: 800;
  transition: all .2s;
}
.mnt-sp-font-btn:hover { background: rgba(255,107,53,.12); border-color: rgba(255,107,53,.3); color: #FF6B35; }
.mnt-sp-font-btn:disabled { opacity: .3; cursor: not-allowed; }
.mnt-sp-font-val {
  min-width: 30px; max-width: 48px;
  text-align: center; overflow: hidden;
  font-family: var(--font-ui); font-size: .62rem; font-weight: 700;
  color: #f1f5f9;
  background: rgba(255,107,53,.12);
  border-radius: 5px; padding: 2px 4px;
  white-space: nowrap; text-overflow: ellipsis;
}

/* ─── Reading mode switch ─── */
.mnt-sp-switch { cursor: pointer; display: flex; align-items: center; }
.mnt-sp-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.mnt-sp-track {
  width: 42px; height: 24px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px; position: relative;
  transition: background .25s, border-color .25s;
  display: flex; align-items: center;
}
.mnt-sp-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #64748b;
  position: absolute; right: 3px;
  transition: transform .25s, background .25s;
}
.mnt-sp-switch input:checked ~ .mnt-sp-track { background: rgba(255,107,53,.25); border-color: rgba(255,107,53,.5); }
.mnt-sp-switch input:checked ~ .mnt-sp-track .mnt-sp-thumb {
  background: #FF6B35; transform: translateX(-18px);
}
#settingsToggle.active svg { animation: gear-spin 2s linear infinite; }
@keyframes gear-spin { to { transform: rotate(360deg); } }

/* ─── Font size via CSS custom property (reliable approach) ─── */
:root { --mnt-article-font: 1.05rem; --mnt-article-lh: 1.9; }
html[data-font="sm"] { --mnt-article-font: .9rem;  --mnt-article-lh: 1.75; }
html[data-font="md"] { --mnt-article-font: 1.05rem;--mnt-article-lh: 1.9;  }
html[data-font="lg"] { --mnt-article-font: 1.18rem;--mnt-article-lh: 2.05; }
html[data-font="xl"] { --mnt-article-font: 1.32rem;--mnt-article-lh: 2.18; }
.article-content,
.article-content p { font-size: var(--mnt-article-font) !important; line-height: var(--mnt-article-lh) !important; }

/* ─── Reading mode: fix white gap where ticker was ─── */
body.reading-mode .mnt-ticker { display: none !important; }
body.reading-mode .mnt-header { top: 0 !important; }
body.reading-mode { padding-top: 0 !important; }

/* Close button for settings panel */
.mnt-sp-close {
  position: absolute; top: 8px; left: 10px;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%; cursor: pointer;
  color: rgba(255,255,255,.4); font-size: 11px; line-height: 1;
  transition: all .2s;
}
.mnt-sp-close:hover { background: rgba(239,68,68,.15); color: #ef4444; border-color: rgba(239,68,68,.3); }

/* ══════════════════════════════════════════════════════
   CATEGORY PAGE — improved design
   ══════════════════════════════════════════════════════ */

/* ── Hero ── */
.cat-hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 2rem;
  margin-bottom: 2rem;
}
.cat-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--cat-color-fade, linear-gradient(90deg,transparent,rgba(255,107,53,.4),transparent));
}

.cat-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* category icon */
.cat-icon-wrap {
  width: 76px; height: 76px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.1rem;
  flex-shrink: 0;
  position: relative;
  transition: transform .2s;
}
.cat-icon-wrap:hover { transform: scale(1.05) rotate(-3deg); }
/* glow behind icon */
.cat-icon-wrap::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 26px;
  opacity: .15;
  filter: blur(12px);
  background: inherit;
}

/* label and title */
.cat-meta-label {
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.cat-meta-label::before {
  content: '';
  display: inline-block;
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.cat-title {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 .5rem;
  letter-spacing: -.01em;
}

.cat-desc {
  color: rgba(255,255,255,.55);
  font-size: .92rem;
  line-height: 1.75;
  max-width: 600px;
  margin: 0;
}

/* article-count pill */
.cat-count-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .85rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 700;
  margin-top: .8rem;
}

/* ── Breadcrumb ── */
.cat-breadcrumb {
  font-family: var(--font-ui);
  font-size: .76rem;
  color: rgba(255,255,255,.35);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cat-breadcrumb a {
  color: rgba(255,255,255,.45);
  transition: color .2s;
}
.cat-breadcrumb a:hover { color: #FF6B35; }
.cat-breadcrumb .sep { opacity: .3; }

/* ── Category switcher pills ── */
.cat-switcher {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.cat-switcher-label {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  color: rgba(255,255,255,.25);
  white-space: nowrap;
  padding-top: .4rem;
  flex-shrink: 0;
}
.cat-switcher-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: all .18s;
  white-space: nowrap;
}
.cat-pill:hover {
  background: rgba(255,107,53,.12);
  border-color: rgba(255,107,53,.3);
  color: #FF6B35;
  transform: translateY(-1px);
}
.cat-pill-all {
  background: rgba(255,107,53,.08);
  border-color: rgba(255,107,53,.2);
  color: rgba(255,107,53,.7);
}
.cat-pill-all:hover { color: #FF6B35; }
.cat-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px; height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: .62rem;
  font-weight: 700;
  color: rgba(255,255,255,.35);
}
.cat-pill:hover .cat-pill-count {
  background: rgba(255,107,53,.18);
  color: #FF6B35;
}
