/*
Theme Name: MindNoded Custom Theme
Description: A custom theme for MindNoded
Version: 1.0
*/
/* =========================================================================
   MindNoded Global Styles
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  /* Dynamic & Premium Light Mode Palette */
  --bg-dark: #F8FAFC; /* Crisp light slate background */
  --bg-surface: #FFFFFF; /* White solid surface */
  --bg-glass: rgba(255, 255, 255, 0.85); /* Frost glass */
  --bg-glass-light: rgba(0, 0, 0, 0.03); /* Subtle inner drop */
  
  --accent-primary: #0099CC; /* MindNoded Cyan Blue */
  --accent-secondary: #F7941D; /* MindNoded Orange */
  --accent-tertiary: #DB2777; /* Subtle Pink */
  --accent-primary-hover: #007BAD;
  --accent-secondary-hover: #D97D0E;
  
  --text-main: #0D1B2A; /* Slate 900 */
  --text-muted: #475569; /* Slate 600 */
  --text-inverse: #FFFFFF; /* Pure White */
  
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-neon: rgba(0, 153, 204, 0.2);
  
  /* Utilities */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  --max-width: 1200px;
  --header-height: 80px;

  /* Glows */
  --neon-glow: 0 0 20px rgba(0, 153, 204, 0.4);
  --purple-glow: 0 0 30px rgba(247, 148, 29, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Animated Orbs / Glow */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-ambient::before, .bg-ambient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.bg-ambient::before {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: var(--accent-secondary);
}
.bg-ambient::after {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: var(--accent-primary);
  animation-delay: -10s;
}
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 10%) scale(1.1); }
  100% { transform: translate(-5%, -5%) scale(0.9); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-main) 20%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-alt {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 5%;
}

.section-padding {
  padding: 6rem 0;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: var(--transition-smooth);
  border-bottom: 1px solid var(--border-glass);
  background: var(--bg-surface);
}
header.scrolled {
  background: var(--bg-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-icon {
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}
.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-primary);
  transition: var(--transition-smooth);
  box-shadow: var(--neon-glow);
}
.nav-links a:hover {
  color: var(--accent-primary);
}
.nav-links a:hover::after {
  width: 100%;
}

/* Dropdown */
.dropdown {
  position: relative;
}
.dropdown-content {
  position: absolute;
  top: 150%;
  left: -1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-content a {
  padding: 0.75rem 1.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
}
.dropdown-content a::after {
  display: none;
}
.dropdown-content a:hover {
  background: var(--bg-glass-light);
  color: var(--accent-primary);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: 4px;
  transition: var(--transition-bounce);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: none;
}
.btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: 0 5px 15px rgba(0, 153, 204, 0.2);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 153, 204, 0.4);
  background: var(--accent-primary-hover);
}
.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}
.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 10px 20px rgba(0, 153, 204, 0.15);
}

/* Custom Selection */
::selection {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

/* Footer Section */
.footer {
  border-top: 1px solid var(--border-glass);
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  padding: 5rem 0 2rem;
  margin-top: 6rem;
  position: relative;
  z-index: 10;
}
.footer .logo {
  color: var(--text-main);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 4rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 5%;
}
.footer-brand, .footer-links-col {
  border-right: 1px solid var(--border-glass);
  padding-right: 2rem;
}
.footer-newsletter {
  padding-left: 1rem;
}
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.newsletter-form .form-control {
  flex: 1;
  min-width: min(250px, 100%);
  width: 100%;
  padding: 0.8rem 1rem; /* Better padding */
}
.footer-brand p {
  color: var(--text-muted);
  margin-top: 1.5rem;
  max-width: 300px;
}
.footer h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.75rem;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.footer-links a:hover {
  color: var(--accent-primary);
}
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-glass-light);
  font-size: 1.2rem;
  transition: var(--transition-smooth);
  color: var(--accent-primary);
  border: 1px solid var(--border-glass);
}
.footer-social a:hover {
  background: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 153, 204, 0.3);
}
.footer-social a:hover i {
  color: #ffffff;
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}
.form-control {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: var(--transition-smooth);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 10px rgba(0, 153, 204, 0.1);
}
.form-control::placeholder {
  color: var(--text-muted);
}
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.newsletter-form .form-control {
  border-radius: 6px;
  flex: 1;
}
.newsletter-form .btn {
  border-radius: 30px;
  padding: 0 1.5rem;
}

/* Cards (Glassmorphism) */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 2rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}
.card > * {
  position: relative;
  z-index: 2;
}
.card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 20px rgba(0, 153, 204, 0.1);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 5%;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
}
.hero-tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(0, 153, 204, 0.1);
  border: 1px solid rgba(0, 153, 204, 0.4);
  border-radius: 50px;
  color: var(--accent-primary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  box-shadow: var(--neon-glow);
}
.hero-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.25rem;
  font-weight: 300;
  text-wrap: balance;
}
.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}
.hero-graphic {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.graphic-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 400px; height: 400px;
  border-radius: 50%;
  border: 1px solid var(--accent-primary);
  opacity: 0.3;
  animation: pulse-ring 4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
.graphic-circle.outer {
  width: 600px; height: 600px;
  animation-delay: 2s;
  border-color: var(--accent-secondary);
}
@keyframes pulse-ring {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* Featured Section */
.featured-section {
  position: relative;
  z-index: 10;
}
.section-header {
  margin-bottom: 4rem;
  text-align: center;
}
.section-header h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}
@media (max-width: 1023px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}
@media (max-width: 599px) {
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}
.post-card {
  height: 100%;
  padding: 0;
}
.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-glass);
}
.post-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.post-tag {
  background: var(--bg-glass-light);
  color: var(--accent-primary);
  padding: 0.2rem 0.8rem;
  border-radius: 50px;
  border: 1px solid var(--border-glass);
}
.post-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.post-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.post-title a:hover {
  color: var(--accent-primary);
}
.post-excerpt {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.post-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  margin-top: auto;
}
.post-link:hover {
  transform: translateX(5px);
  color: #fff;
}
.view-all-wrapper {
  text-align: center;
  margin-top: 4rem;
}

/* About Snippet */
.about-snippet {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  position: relative;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--purple-glow);
}
.about-image img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.8;
  mix-blend-mode: luminosity;
  transition: var(--transition-smooth);
}
.about-image:hover img {
  mix-blend-mode: normal;
  opacity: 1;
  transform: scale(1.05);
}
.about-text h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 1.5rem;
}

/* Testimonials Slider/Grid */
.testimonials-section {
  position: relative;
  overflow: hidden;
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.testimonial-card {
  text-align: left;
  padding: 2.5rem;
}
.quote-icon {
  font-size: 2rem;
  color: var(--accent-primary);
  opacity: 0.5;
  margin-bottom: 1rem;
}
.testimonial-text {
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 2rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--accent-secondary);
}
.author-info h5 {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}
.author-info span {
  font-size: 0.85rem;
  color: var(--accent-primary);
}

/* Base Interactions for Fade In Arrays */
.animate-in {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Page Header */
.page-header {
  padding: 150px 5% 4rem;
  background: linear-gradient(180deg, var(--bg-glass) 0%, var(--bg-dark) 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-glass);
}
.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
}

/* Blog Layout */
.blog-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 100px;
}
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}
.sidebar-widget h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  border-left: 3px solid var(--accent-primary);
  padding-left: 10px;
}
.category-list {
  list-style: none;
}
.category-list li {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
}
.category-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.category-list a:hover {
  color: var(--accent-primary);
  padding-left: 5px;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-cloud a {
  padding: 0.3rem 0.8rem;
  background: var(--bg-glass-light);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition-smooth);
}
.tag-cloud a:hover {
  background: var(--accent-primary);
  color: var(--text-inverse);
  border-color: var(--accent-primary);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 4rem;
}
.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.page-numbers:hover, .page-numbers.current {
  background: var(--accent-primary);
  color: var(--text-inverse);
  border-color: var(--accent-primary);
}

/* Article Layout */
.article-header {
  padding: 150px 5% 4rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-family: var(--font-body);
}
.article-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 2rem;
  text-wrap: balance;
}
.article-cover {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin-bottom: 4rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  column-gap: 4rem;
  row-gap: 0;
  max-width: 1200px;
  margin: 0 auto;
}
.article-content {
  font-size: 1.15rem;
  color: var(--text-muted);
  min-width: 0;      /* prevent grid blowout */
  width: 100%;       /* fill the grid cell completely */
}
.article-content h2, .article-content h3 {
  color: var(--text-main);
  margin: 3rem 0 1.5rem;
  font-family: var(--font-heading);
}
.article-content p {
  margin-bottom: 1.5rem;
}
.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.article-content li {
  margin-bottom: 0.5rem;
}
.article-content hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 153, 204, 0.05), rgba(0, 153, 204, 0.3), rgba(0, 153, 204, 0.05));
  margin: 3rem 0;
}
.article-content img {
  width: 100%;
  border-radius: 8px;
  margin: 2rem 0;
}
.article-content figure {
  margin: 0;
}
.article-content blockquote {
  border-left: 4px solid var(--accent-primary);
  padding: 1.5rem 2rem;
  background: var(--bg-surface);
  font-style: italic;
  font-size: 1.3rem;
  border-radius: 0 8px 8px 0;
  margin: 2rem 0;
  color: var(--text-main);
}

/* Sticky TOC */
.toc {
  position: sticky;
  top: 100px;
}
.toc h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}
.toc ul {
  list-style: none;
  border-left: 2px solid var(--border-glass);
  padding-left: 1rem;
}
.toc li {
  margin-bottom: 1rem;
}
.toc a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}
.toc a:hover, .toc a.active {
  color: var(--accent-primary);
}

/* Author Box */
.author-box {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 1.75rem 2rem;
  border-radius: 12px;
  margin-top: 4rem;
}
.author-box > a {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}
.author-box img {
  display: block;
  width: 100px !important;
  height: 100px !important;
  min-width: 100px;
  border-radius: 50% !important;
  border: 3px solid var(--accent-secondary);
  object-fit: cover;
  margin: 0 !important;
}
.author-bio h4 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
.author-bio p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Comments */
.comments-section {
  margin-top: 4rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 4rem;
}

/* About Page */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 4rem auto;
  padding: 2rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: var(--border-glass);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 2rem 3rem;
}
.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}
.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}
.timeline-dot {
  position: absolute;
  top: 2.5rem;
  width: 20px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-primary);
}
.timeline-item:nth-child(odd) .timeline-dot { right: -10px; }
.timeline-item:nth-child(even) .timeline-dot { left: -10px; }
.timeline-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 1.5rem;
  border-radius: 8px;
}
.timeline-date {
  color: var(--accent-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Values Grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}
.value-card {
  text-align: center;
  padding: 3rem 2rem;
}
.value-card i {
  font-size: 3rem;
  color: var(--accent-secondary);
  margin-bottom: 1.5rem;
}
.value-card h3 {
  margin-bottom: 1rem;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}
.team-card {
  text-align: center;
  padding: 2rem;
  background: transparent;
  border: none;
}
.team-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--border-glass);
  object-fit: cover;
}
.team-card h4 {
  color: var(--text-main);
  margin-bottom: 0.5rem;
}
.team-card span {
  color: var(--accent-primary);
  display: block;
  margin-bottom: 1rem;
}
.team-social a {
  color: var(--text-muted);
  margin: 0 0.5rem;
  font-size: 1.2rem;
  transition: var(--transition-smooth);
}
.team-social a:hover {
  color: var(--accent-primary);
}

/* Contact Page */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
}
.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--bg-glass-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-primary);
}
.contact-details h5 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.contact-details p {
  color: var(--text-muted);
}
.contact-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 3rem;
  border-radius: 12px;
}
.contact-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-muted);
}
/* Legal Pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 4rem;
  border-radius: 12px;
}
.legal-content h2, .legal-content h3 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  font-family: var(--font-heading);
}
.legal-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.legal-content ul {
  color: var(--text-muted);
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}
.legal-content li {
  margin-bottom: 0.8rem;
}

/* Responsive */
@media (max-width: 992px) {
  .about-grid, .testimonial-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  /* Sidebar stacks below article content — do not hide it */
  .toc {
    position: static;      /* disable sticky — no second column to stick in */
    width: 100%;
    max-width: 100%;
    border-top: 1px solid var(--border-glass);
    padding-top: 2rem;
    margin-top: 2rem;
  }
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 6rem 2rem;
    transition: var(--transition-smooth);
    border-left: 1px solid var(--border-glass);
    box-shadow: -10px 0 40px rgba(0,0,0,0.8);
  }
  .nav-links.active {
    right: 0;
  }
  .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 1rem;
    display: none;
  }
  .dropdown.active .dropdown-content {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    padding: 0 2rem;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .timeline::before { left: 20px; }
  .timeline-item { width: 100%; padding: 2rem 0 2rem 3rem; text-align: left !important; }
  .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; }
  .timeline-item .timeline-dot { left: 10px !important; }
  .values-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-form { padding: 2rem; }
  .legal-content { padding: 2rem; }
}
.contact-form textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Responsive */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid, .testimonial-grid {
    grid-template-columns: 1fr;
  }
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  /* Sidebar stacks below article content — do not hide it */
  .toc {
    position: static;      /* disable sticky — no second column to stick in */
    width: 100%;
    max-width: 100%;
    border-top: 1px solid var(--border-glass);
    padding-top: 2rem;
    margin-top: 2rem;
  }
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 6rem 2rem;
    transition: var(--transition-smooth);
    border-left: 1px solid var(--border-glass);
    box-shadow: -10px 0 40px rgba(0,0,0,0.8);
  }
  .nav-links.active {
    right: 0;
  }
  .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 1rem;
    display: none;
  }
  .dropdown.active .dropdown-content {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    padding: 0 2rem;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .timeline::before { left: 20px; }
  .timeline-item { width: 100%; padding: 2rem 0 2rem 3rem; text-align: left !important; }
  .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; }
  .timeline-item .timeline-dot { left: 10px !important; }
  .values-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-form { padding: 2rem; }
}


/* Editorial List Layouts */
.blog-list-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.post-list-card {
  display: flex !important;
  flex-direction: row;
  align-items: stretch;
  padding: 1.5rem !important;
  gap: 3rem;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: 12px !important;
  transition: var(--transition-smooth) !important;
  text-align: left !important;
}
.post-list-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.6) !important;
  border-color: var(--accent-primary) !important;
}
.post-list-image-wrap {
  flex: 0 0 45%;
  max-width: 45%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.post-list-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 250px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.post-list-card:hover .post-list-image {
  transform: scale(1.08);
}
.post-list-card .post-content {
  flex: 1;
  padding: 1rem 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-list-card .post-title {
  font-size: clamp(1.5rem, 2vw, 2rem) !important;
  margin-bottom: 1rem !important;
  line-height: 1.3;
}
.post-list-card .post-excerpt {
  font-size: 1.1rem !important;
  margin-bottom: 2rem !important;
  line-height: 1.6;
}

/* Related Posts Slider Style */
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}
.related-post-card {
  padding: 1.5rem !important;
  background: var(--bg-surface) !important;
}

@media (max-width: 992px) {
  .post-list-card {
    flex-direction: column;
    padding: 1.5rem !important;
    gap: 1.5rem;
  }
  .post-list-image-wrap {
    flex: 0 0 100%;
    max-width: 100%;
    height: 250px;
  }
  .related-posts-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Comment List Styles --- */
/* =========================================================================
   Comments — Redesigned to match the Review Card system
   ========================================================================= */
.comment-list {
  padding: 0;
  margin: 0;
}
.article-content .comment-list {
  padding: 0;
  margin: 0;
}
.mn-comments-title {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-glass);
}
.mn-comments-closed {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 1.5rem 0;
}
.mn-comment-item {
  list-style: none;
}

/* ── Top-level comment card — exactly matches .review-card ── */
.mn-comment-card {
  position: relative;           /* anchor for three-dot */
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.mn-comment-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.06);
}

/* ── Three-dot — absolute top-right corner of the card ── */
.mn-ca-more {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  z-index: 10;
}
.mn-ca-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
  padding: 0;
}
.mn-ca-dots:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}
.mn-ca-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
  min-width: 130px;
  z-index: 200;
  overflow: hidden;
}
.mn-ca-dropdown.open { display: block; }
.mn-ca-drop-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  font-family: var(--font-body);
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.mn-ca-drop-item:hover         { background: var(--bg-dark); color: var(--text-main); }
.mn-ca-drop-item.report-item:hover { color: var(--accent-tertiary); }

/* ── Inline comment edit form ── */
.mn-comment-card-text.mn-is-editing { padding-top: 0.5rem; }
.mn-edit-textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-size: 0.9rem;
  color: var(--text-main);
  background: var(--bg-dark);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.18s, box-shadow 0.18s;
  line-height: 1.65;
  display: block;
}
.mn-edit-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}
.mn-edit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
  justify-content: flex-end;
}
.mn-edit-actions .btn { padding: 0.38rem 1rem; font-size: 0.82rem; }
.mn-edit-cancel {
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 0.38rem 1rem;
  font-size: 0.82rem;
  font-family: var(--font-body);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.mn-edit-cancel:hover { background: var(--bg-dark); color: var(--text-main); }

/* ── Header: avatar + meta ── */
.mn-comment-card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-right: 2.2rem; /* clearance for the absolute three-dot */
}

/* ── Avatar — visible, robust fallback ── */
.mn-comment-avatar-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-dark);
  border: 2px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mn-comment-avatar-img {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
  border: none;
  margin: 0 !important;
}
.mn-comment-card-meta {
  flex: 1;
  min-width: 0;
}
.mn-comment-author-name {
  font-weight: 600;
  font-size: 0.92rem;
  font-family: var(--font-heading);
  color: var(--text-main);
  text-decoration: none;
  display: block;
  line-height: 1.3;
}
a.mn-comment-author-name:hover { color: var(--accent-primary); }
/* Timestamp sits on the RIGHT of the header flex row — matches review-card-date */
.mn-comment-timestamp {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Moderation badge ── */
.mn-awaiting-mod {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  color: var(--accent-tertiary);
  margin-top: 0.55rem;
}

/* ── Comment body text — Cairo for Arabic, Outfit for English ── */
.mn-comment-card-text {
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-glass);
}
.mn-comment-card-text p:first-child { margin-top: 0; }
.mn-comment-card-text p:last-child  { margin-bottom: 0; }
/* Arabic text — Cairo activates automatically for Arabic unicode range;
   bump size and line-height for better readability in RTL */
[dir="rtl"] .mn-comment-card-text {
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  line-height: 1.9;
}

/* ── Comment action bar ── */
.mn-comment-card-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-glass);
}

/* Clap + stat shared base */
.mn-ca-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.13s, color 0.13s;
  line-height: 1;
}
.mn-ca-btn i { font-size: 0.88rem; line-height: 1; }
.mn-ca-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-main);
}
/* Clap active */
.mn-ca-clap.is-clapped       { color: var(--accent-primary); }
.mn-ca-clap.is-clapped:hover { color: var(--accent-primary); background: rgba(37,99,235,0.06); }

/* Replies count — non-interactive */
.mn-ca-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  padding: 0.25rem 0.5rem;
  line-height: 1;
  pointer-events: none;
}
.mn-ca-stat i { font-size: 0.88rem; line-height: 1; }

/* Spacer */
.mn-ca-spacer { flex: 1; }

/* Reply link — framed pill */
.mn-comment-card-actions .comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-muted);
  background: none;
  border: 1.5px solid var(--border-glass);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  line-height: 1;
}
.mn-comment-card-actions .comment-reply-link:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(37, 99, 235, 0.04);
}

/* ── Nested children list — connector rail ── */
.mn-comment-item > .children {
  list-style: none;
  padding: 0 0 0 1.1rem;
  margin: 0.75rem 0 0 1rem;
  border-left: 2px solid rgba(37, 99, 235, 0.1);
}

/* ── Nested reply block (depth ≥ 2) ── */
.mn-comment-reply-block {
  position: relative;            /* anchor for its own three-dot */
  padding: 0.75rem 1rem;
  background: rgba(37, 99, 235, 0.025);
  border-radius: 10px;
  margin-bottom: 0.65rem;
}
.mn-comment-reply-block .mn-ca-more { top: 0.6rem; right: 0.75rem; }
.mn-comment-reply-block .mn-comment-card-header { padding-right: 2rem; }
.mn-comment-reply-block .mn-comment-avatar-wrap {
  width: 32px;
  height: 32px;
}
.mn-comment-reply-block .mn-comment-avatar-img {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  min-height: 32px;
  margin: 0 !important;
  border-radius: 50% !important;
}
.mn-comment-reply-block .mn-comment-author-name { font-size: 0.84rem; }
.mn-comment-reply-block .mn-comment-timestamp   { font-size: 0.71rem; }
.mn-comment-reply-block .mn-comment-card-text   { font-size: 0.86rem; margin-top: 0.55rem; padding-top: 0.55rem; }
.mn-comment-reply-block .mn-comment-card-actions { margin-top: 0.5rem; padding-top: 0.45rem; }

/* ── Comment form wrapper ── */
.mn-comment-form-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 2rem 2.5rem;
  margin-top: 2.5rem;
}

/* ── Login prompt ── */
.mn-login-prompt {
  background: rgba(37, 99, 235, 0.04);
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}
.mn-login-prompt h4 {
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.35rem;
}
.mn-login-prompt p {
  color: var(--text-muted);
  font-size: 0.87rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* ── WP comment_form() elements ── */
#respond .comment-reply-title {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
}
#respond .comment-reply-title small { display: inline; }
#respond .comment-reply-title small a {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-body);
  text-decoration: none;
  margin-left: 0.75rem;
}
#respond .comment-reply-title small a:hover { color: var(--accent-primary); }
#respond .comment-notes {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-bottom: 1.5rem;
}

/* ── Dark mode ── */
[data-theme="dark"] .mn-comment-card        { background: var(--bg-surface); }
[data-theme="dark"] .mn-comment-reply-block { background: rgba(37, 99, 235, 0.04); }
[data-theme="dark"] .mn-comment-form-wrap   { background: var(--bg-surface); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .mn-comment-form-wrap { padding: 1.5rem; }
  .mn-comment-item > .children { margin-left: 0.5rem; padding-left: 0.75rem; }
}
@media (max-width: 480px) {
  .mn-comment-item > .children { margin-left: 0; padding-left: 0.5rem; }
}

/* =========================================================================
   Alert / Callout Blocks (inserted via article editor, rendered in content)
   ========================================================================= */
.mn-alert {
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 1.7;
  display: block;
}
.mn-alert strong { display: block; margin-bottom: 0.25rem; }
.mn-alert-info    { background: rgba(0, 153, 204,0.08);  border-left: 4px solid #0099CC; color: var(--text-main); }
.mn-alert-tip     { background: rgba(16,185,129,0.08); border-left: 4px solid #10B981; color: var(--text-main); }
.mn-alert-warning { background: rgba(245,158,11,0.08); border-left: 4px solid #F59E0B; color: var(--text-main); }
.mn-alert-danger  { background: rgba(239,68,68,0.08);  border-left: 4px solid #EF4444; color: var(--text-main); }

/* Code blocks in article content */
.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}
.article-content code:not(pre code) {
  background: rgba(0, 153, 204,0.1);
  color: var(--accent-secondary);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.88em;
}

/* =========================================================================
   Author Meta Link (single.php inline author)
   ========================================================================= */
.author-meta-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-primary);
  transition: color 0.3s;
}
.author-meta-link:hover {
  color: var(--accent-primary);
}

/* =========================================================================
   Phase 3 — Author Profile Page
   ========================================================================= */
.author-profile-page {
  padding-bottom: 6rem;
}

/* Cover Banner */
.author-cover-banner {
  height: 280px;
  margin-top: var(--header-height);
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}
.author-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(15,23,42,0.35) 100%);
}

/* Profile card */
.author-profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 0 2.5rem 2.5rem;
  margin-top: -80px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.06);
}
.author-profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-top: -70px;
  margin-bottom: 1.25rem;
}
.author-profile-avatar {
  width: 140px !important;
  height: 140px !important;
  border-radius: 50% !important;
  border: 4px solid var(--bg-surface) !important;
  box-shadow: 0 4px 20px rgba(0, 153, 204,0.25) !important;
  object-fit: cover !important;
  display: block !important;
}
.author-edit-avatar-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 153, 204,0.4);
  transition: transform 0.2s;
}
.author-edit-avatar-btn:hover { transform: scale(1.15); }

.author-profile-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.author-profile-name {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0;
  color: var(--text-main);
}
.author-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(0, 153, 204,0.1), rgba(247, 148, 29,0.1));
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 153, 204,0.2);
  margin-top: 0.4rem;
}
.author-profile-bio {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 680px;
}
.author-profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.author-profile-meta-row span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.author-profile-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

/* Social chips */
.author-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  background: var(--bg-dark);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s;
}
.social-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 153, 204,0.05);
  transform: translateY(-2px);
}
.social-chip-add {
  border-style: dashed;
}

/* Stats bar */
.author-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-glass);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  overflow: hidden;
  margin: 2rem 0;
}
.author-stat {
  background: var(--bg-surface);
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: background 0.2s;
}
.author-stat.clickable-stat {
  cursor: pointer;
}
.author-stat.clickable-stat:hover {
  background: rgba(0, 153, 204,0.04);
}
.stat-num {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}
.stat-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

/* Tabs */
.author-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-glass);
  margin-bottom: 2.5rem;
}
.author-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.author-tab:hover {
  color: var(--accent-primary);
}
.author-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* Author posts grid */
.author-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.author-post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px !important;
  transition: transform 0.3s, box-shadow 0.3s;
}
.author-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08) !important;
}
.author-post-thumb {
  display: block;
  overflow: hidden;
  height: 180px;
  border-radius: 10px 10px 0 0;
}
.author-post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.author-post-card:hover .author-post-img { transform: scale(1.06); }
.author-post-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.author-post-title {
  font-size: 1.1rem !important;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}
.author-post-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.25s;
}
.author-post-title a:hover { color: var(--accent-primary); }
.author-post-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

/* Empty state */
.author-empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}
.author-empty-state i {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.4;
}

/* Follow list (followers / following tab) */
.follow-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 0;
}
.follow-list-loading {
  width: 100%;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}
.follow-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 300px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.follow-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 20px rgba(0, 153, 204,0.08);
}
.follow-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-glass);
  flex-shrink: 0;
}
.follow-card-info {
  flex: 1;
  min-width: 0;
}
.follow-card-name {
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.follow-card-name:hover { color: var(--accent-primary); }
.follow-card-btn {
  flex-shrink: 0;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--accent-primary);
  background: transparent;
  color: var(--accent-primary);
  cursor: pointer;
  transition: all 0.2s;
}
.follow-card-btn:hover,
.follow-card-btn.following-active {
  background: var(--accent-primary);
  color: #fff;
}

/* Responsive – profile */
@media (max-width: 900px) {
  .author-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .author-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .author-profile-card { padding: 0 1.25rem 1.75rem; }
  .author-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .author-posts-grid { grid-template-columns: 1fr; }
  .author-profile-name-row { flex-direction: column; }
}

/* =========================================================================
   Phase 3 — Notification Bell
   ========================================================================= */
.notif-bell {
  position: relative;
}
.notif-trigger {
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  color: var(--text-main);
  font-size: 1rem;
  position: relative;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-trigger:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #EF4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-surface);
  font-family: var(--font-heading);
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.12);
  z-index: 9999;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.notif-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-glass);
}
.notif-dropdown-header h5 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.notif-mark-read {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}
.notif-mark-read:hover { text-decoration: underline; }
.notif-list {
  max-height: 380px;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-glass);
  transition: background 0.2s;
  cursor: pointer;
  text-decoration: none;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-dark); }
.notif-item.unread { background: rgba(0, 153, 204,0.04); }
.notif-item.unread:hover { background: rgba(0, 153, 204,0.07); }
.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.notif-icon.follower { background: rgba(247, 148, 29,0.12); color: var(--accent-secondary); }
.notif-icon.comment  { background: rgba(0, 153, 204,0.12); color: var(--accent-primary); }
.notif-icon.rating   { background: rgba(245,158,11,0.12); color: #D97706; }
.notif-text {
  flex: 1;
  min-width: 0;
}
.notif-text p {
  font-size: 0.88rem;
  color: var(--text-main);
  margin: 0 0 0.2rem;
  line-height: 1.4;
}
.notif-text time {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 6px;
}
.notif-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.notif-empty i { font-size: 2rem; display: block; margin-bottom: 0.5rem; opacity: 0.4; }
.notif-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* Header avatar */
.header-avatar-link { display: flex; align-items: center; }
.header-avatar {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--border-glass) !important;
  transition: border-color 0.25s !important;
}
.header-avatar-link:hover .header-avatar {
  border-color: var(--accent-primary) !important;
}

/* Follow / Following button variants */
.btn-following {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--bg-dark);
  border: 1.5px solid var(--accent-primary);
  color: var(--accent-primary);
}
.btn-following:hover {
  background: rgba(239,68,68,0.07);
  border-color: #EF4444;
  color: #EF4444;
}
.btn-outline-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s;
  background: transparent;
  border: 1.5px solid var(--accent-primary);
  color: var(--accent-primary);
  text-decoration: none;
}
.btn-outline-primary:hover {
  background: var(--accent-primary);
  color: #fff;
}

/* =========================================================================
   Phase 3 — Profile Edit Page
   ========================================================================= */
.profile-edit-header { margin-bottom: 2.5rem; }
.profile-form { display: flex; flex-direction: column; gap: 0; }
.profile-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.profile-section-title {
  font-size: 1.1rem;
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-glass);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 0.35rem; }
.form-control {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 153, 204,0.1);
}
.form-control:disabled { opacity: 0.55; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* Cover upload */
.cover-upload-wrap { display: flex; flex-direction: column; gap: 1rem; }
.cover-preview {
  height: 160px;
  border-radius: 10px;
  border: 2px dashed var(--border-glass);
  background: var(--bg-dark);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Avatar upload */
.avatar-upload-wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.avatar-preview-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-glass);
  flex-shrink: 0;
}
.upload-label {
  cursor: pointer !important;
  font-size: 0.88rem !important;
}
.upload-status { font-size: 0.85rem; color: var(--accent-primary); }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-glass);
  border-radius: 24px;
  transition: 0.3s;
  border: 1px solid var(--border-glass);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-primary); border-color: var(--accent-primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .avatar-upload-wrap { flex-direction: column; align-items: flex-start; }
}

/* =========================================================================
   Phase 3 — Dark / Light Mode Toggle (footer)
   ========================================================================= */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  padding: 0.4rem 0.9rem 0.4rem 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.25s;
}
.theme-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.theme-toggle-track {
  width: 36px;
  height: 20px;
  background: var(--border-glass);
  border-radius: 20px;
  position: relative;
  transition: background 0.3s;
  border: 1px solid var(--border-glass);
}
[data-theme="dark"] .theme-toggle-track {
  background: var(--accent-primary);
}
.theme-toggle-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: var(--accent-primary);
}
[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(16px);
}

/* =========================================================================
   Phase 3 — Dark Mode Variable Overrides
   ========================================================================= */
[data-theme="dark"] {
  /* MindNoded Dark Navy — matches dark logo background */
  --bg-dark:         #0A1628;          /* Deep navy — logo background */
  --bg-surface:      #0F1E38;          /* Card / panel navy */
  --bg-surface-alt:  #142244;          /* Elevated / hover surface */
  --bg-glass:        rgba(10, 22, 40, 0.96);   /* Frosted navy glass */
  --bg-glass-light:  rgba(0, 153, 204, 0.04);  /* Subtle cyan tint */
  --border-glass:    rgba(0, 153, 204, 0.14);  /* Cyan-tinted border */
  --border-neon:     rgba(0, 187, 238, 0.45);  /* Bright cyan neon */
  --accent-primary:  #00BBEE;          /* Brighter cyan for dark bg */
  --accent-secondary:#F9A234;          /* Warm orange on dark */
  --accent-primary-hover:  #00AADD;
  --accent-secondary-hover:#F7941D;
  --accent-tertiary: #F06292;          /* Pink adjusted for dark */
  --text-main:       #DCF0FC;          /* Cool-white with cyan tint */
  --text-muted:      #6EA8C8;          /* Muted blue-grey */
  --text-inverse:    #0A1628;
  --neon-glow:       0 0 24px rgba(0, 187, 238, 0.5);
  --purple-glow:     0 0 28px rgba(249, 162, 52, 0.4);
}

/* Dark mode surface corrections */
[data-theme="dark"] header {
  background: rgba(8, 16, 32, 0.97) !important;
}
[data-theme="dark"] header.scrolled {
  background: rgba(8, 16, 32, 0.99) !important;
  box-shadow: 0 5px 30px rgba(0,0,0,0.6) !important;
}
[data-theme="dark"] .login form {
  background: var(--bg-surface) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
}
[data-theme="dark"] .dropdown-content {
  background: var(--bg-surface) !important;
  border-color: var(--border-glass) !important;
}
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--bg-dark) !important;
  color: var(--text-main) !important;
  border-color: var(--border-glass) !important;
}
[data-theme="dark"] .footer {
  background: #060E1C !important;
  border-top-color: var(--border-glass);
}
[data-theme="dark"] .bg-ambient::before {
  opacity: 0.10;
  background: #0099CC;  /* Cyan orb in dark mode */
}
[data-theme="dark"] .bg-ambient::after {
  opacity: 0.07;
  background: #F7941D;  /* Orange orb in dark mode */
}

/* =========================================================================
   Phase 4 — About Us Page
   ========================================================================= */
.about-hero {
  padding: calc(var(--header-height) + 5rem) 0 5rem;
  background: linear-gradient(180deg, rgba(0, 153, 204,0.04) 0%, var(--bg-dark) 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-glass);
}
.about-hero-inner { max-width: 820px; }
.about-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 153, 204,0.08);
  color: var(--accent-primary);
  border: 1px solid rgba(0, 153, 204,0.2);
  border-radius: 20px;
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.about-hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.about-hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.about-hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Stats bar */
.about-stats-section {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-glass);
  padding: 2rem 0;
}
.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.about-stat-item {
  text-align: center;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border-glass);
}
.about-stat-item:last-child { border-right: none; }
.about-stat-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.about-stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Mission pillars */
.about-mission-section { background: var(--bg-dark); }
.about-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.about-pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 2.25rem;
  transition: box-shadow 0.3s, transform 0.3s;
}
.about-pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.07);
}
.pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(0, 153, 204,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--pillar-color, var(--accent-primary));
  margin-bottom: 1.25rem;
}
.about-pillar-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.about-pillar-card p  { color: var(--text-muted); line-height: 1.7; font-size: 0.95rem; }

/* Topics */
.about-topics-section {
  background: var(--bg-surface);
  padding: 5rem 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}
.about-topics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2.5rem;
}
.about-topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  transition: all 0.25s;
}
.about-topic-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 153, 204,0.05);
}
.about-topic-chip i { color: var(--accent-primary); }

/* Team */
.about-team-section { background: var(--bg-dark); }
.about-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.about-team-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.about-team-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 6px 24px rgba(0, 153, 204,0.08);
}
.about-team-avatar-link { flex-shrink: 0; }
.about-team-avatar {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--border-glass) !important;
  transition: border-color 0.25s !important;
}
.about-team-card:hover .about-team-avatar { border-color: var(--accent-primary) !important; }
.about-team-info { flex: 1; min-width: 0; }
.about-team-name {
  display: block;
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.98rem;
  text-decoration: none;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.about-team-name:hover { color: var(--accent-primary); }
.about-team-role {
  display: block;
  font-size: 0.78rem;
  color: var(--accent-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.about-team-posts {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.about-team-bio {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.about-team-social { display: flex; gap: 0.5rem; }
.about-team-social a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
  text-decoration: none;
}
.about-team-social a:hover { color: var(--accent-primary); }

/* About CTA */
.about-cta-section {
  padding: 6rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
}
.about-cta-card {
  background: linear-gradient(135deg, rgba(0, 153, 204,0.05) 0%, rgba(247, 148, 29,0.05) 100%);
  border: 1px solid rgba(0, 153, 204,0.15);
  border-radius: 20px;
  padding: 4rem;
  text-align: center;
}
.about-cta-icon {
  font-size: 3rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  display: block;
}
.about-cta-card h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 1rem; }
.about-cta-card p  { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.about-cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .about-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-pillars-grid { grid-template-columns: 1fr; }
  .about-team-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .about-team-grid { grid-template-columns: 1fr; }
  .about-stats-grid { grid-template-columns: 1fr 1fr; }
  .about-cta-card { padding: 2.5rem 1.5rem; }
}

/* =========================================================================
   Phase 4 — Contact Us Page
   ========================================================================= */
.contact-hero {
  background: linear-gradient(180deg, rgba(0, 153, 204,0.04) 0%, var(--bg-dark) 100%);
}
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: flex-start;
}
.contact-info-col { position: sticky; top: 100px; }
.contact-info-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.contact-info-items { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 153, 204,0.08);
  border: 1px solid rgba(0, 153, 204,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.contact-info-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.contact-info-val {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
  text-decoration: none;
}
a.contact-info-val:hover { color: var(--accent-primary); }
.contact-social-row { display: flex; gap: 0.6rem; }
.contact-social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s;
}
.contact-social-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 153, 204,0.06);
  transform: translateY(-2px);
}
.contact-quick-links {
  margin-top: 2rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.contact-quick-links h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.contact-quick-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-glass);
  transition: color 0.2s;
}
.contact-quick-links a:last-child { border-bottom: none; }
.contact-quick-links a:hover { color: var(--accent-primary); }
.contact-quick-links a i { width: 16px; text-align: center; }
.contact-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.04);
}
.contact-form-card select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236B7280' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-info-col { position: static; }
}

/* =========================================================================
   Phase 4 — Share Ideas Page
   ========================================================================= */
.share-hero { background: linear-gradient(180deg, rgba(247, 148, 29,0.04) 0%, var(--bg-dark) 100%); }
.how-it-works-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.hiw-step {
  flex: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
}
.hiw-num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.hiw-step h4 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.hiw-step p  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
.hiw-arrow {
  flex-shrink: 0;
  align-self: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-top: -1rem;
}
@media (max-width: 720px) {
  .how-it-works-row { flex-direction: column; }
  .hiw-arrow { transform: rotate(90deg); align-self: center; }
}

/* =========================================================================
   Phase 4 — Support Us Page
   ========================================================================= */
.support-hero { background: linear-gradient(180deg, rgba(219,39,119,0.04) 0%, var(--bg-dark) 100%); }

.support-tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.support-tier-btn {
  background: var(--bg-surface);
  border: 2px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}
.support-tier-btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 153, 204,0.1);
}
.support-tier-btn.selected {
  border-color: var(--accent-primary);
  background: rgba(0, 153, 204,0.04);
  box-shadow: 0 0 0 3px rgba(0, 153, 204,0.12);
}
.tier-icon { font-size: 1.6rem; }
.tier-amount {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}
.tier-label { font-size: 0.88rem; font-weight: 600; color: var(--text-main); }
.tier-desc  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

.support-payment-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  overflow: hidden;
}
.support-method-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  background: var(--bg-dark);
}
.support-method-tab {
  flex: 1;
  padding: 0.9rem 1rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.support-method-tab:hover { color: var(--accent-primary); }
.support-method-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background: var(--bg-surface);
}
.support-method-panel { padding: 2rem; }

.support-impact { padding: 1rem 0; }
.support-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.support-impact-item {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
}
.support-impact-item i { font-size: 2rem; margin-bottom: 1rem; display: block; }
.support-impact-item h4 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.support-impact-item p  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

@media (max-width: 900px) {
  .support-tiers { grid-template-columns: repeat(2, 1fr); }
  .support-impact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .support-tiers { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================================
   Phase 4 — Login / Register Pages (split-panel default design)
   ========================================================================= */
.auth-page-wrap {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 2rem) 5% 3rem;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(37,99,235,0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(79,70,229,0.10), transparent 60%),
    var(--bg-dark);
}
.auth-shell {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15,23,42,0.10);
}
/* Brand panel (left) */
.auth-brand {
  position: relative;
  padding: 3rem 2.75rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 60%, #6D28D9 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-brand::before,
.auth-brand::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.auth-brand::before {
  width: 320px; height: 320px;
  top: -100px; right: -120px;
  background: radial-gradient(closest-side, rgba(255,255,255,0.18), transparent 70%);
}
.auth-brand::after {
  width: 260px; height: 260px;
  bottom: -110px; left: -90px;
  background: radial-gradient(closest-side, rgba(255,255,255,0.12), transparent 70%);
}
.auth-brand-inner { position: relative; z-index: 1; }
.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  text-decoration: none;
  margin-bottom: 2.25rem;
}
.auth-brand-logo i {
  background: rgba(255,255,255,0.18);
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1rem;
}
.auth-brand-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  color: #fff;
}
.auth-brand-tagline {
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  margin-bottom: 2rem;
}
.auth-brand-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.auth-brand-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.92);
  line-height: 1.45;
}
.auth-brand-features i {
  background: rgba(255,255,255,0.2);
  width: 26px; height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.auth-brand-footnote {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
}
.auth-brand-footnote a { color: #fff; text-decoration: underline; }

/* Form panel (right) */
.auth-form-panel {
  padding: 3rem 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form-inner { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-mobile-logo {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.auth-mobile-logo i { color: var(--accent-primary); }
.auth-title {
  font-size: 1.75rem;
  margin: 0 0 0.4rem;
  color: var(--text-main);
}
.auth-sub {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

/* Form fields */
.auth-field { margin-bottom: 1.1rem; }
.auth-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}
.auth-field .req { color: #EF4444; margin-left: 2px; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > i.auth-input-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.auth-input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.85rem 1rem 0.85rem 2.6rem;
  font-size: 0.95rem;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.auth-input.has-toggle { padding-right: 2.75rem; }

.password-toggle-btn {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
  padding: 0.4rem;
  line-height: 1;
}
.password-toggle-btn:hover { color: var(--accent-primary); }

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}
.auth-remember input {
  width: 16px; height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.auth-forgot {
  font-size: 0.88rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}
.auth-forgot:hover { text-decoration: underline; }

.auth-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.95rem 1rem;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}
.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37,99,235,0.28);
}
.auth-submit:active { transform: translateY(0); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glass);
}
.auth-register-prompt {
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.auth-switch-link {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.3rem;
}
.auth-switch-link:hover { text-decoration: underline; }

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.auth-terms input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px; height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.auth-terms a { color: var(--accent-primary); text-decoration: none; }
.auth-terms a:hover { text-decoration: underline; }

/* Password strength bar */
.password-strength-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: -0.4rem 0 1rem;
}
.password-strength-bar {
  flex: 1;
  height: 5px;
  border-radius: 5px;
  background: var(--border-glass);
  overflow: hidden;
}
.password-strength-bar > div {
  height: 100%;
  border-radius: 5px;
  width: 0;
  transition: width 0.3s, background 0.3s;
}

/* WP login form override — since wp_login_form emits its own markup, style those too */
#mn-login-form p { margin: 0 0 1.1rem; }
#mn-login-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}
#mn-login-form input[type="text"],
#mn-login-form input[type="password"] {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}
#mn-login-form input[type="text"]:focus,
#mn-login-form input[type="password"]:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
#mn-login-form .login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
#mn-login-form .login-remember input { width: auto; accent-color: var(--accent-primary); }
#mn-login-form .login-remember label { margin: 0; font-weight: 500; color: var(--text-muted); }
#mn-login-form .login-submit { margin: 0.5rem 0 0; }
#mn-login-form input[type="submit"] {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.95rem 1rem;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
#mn-login-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37,99,235,0.28);
}

/* Tablet */
@media (max-width: 960px) {
  .auth-shell { max-width: 640px; grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-panel { padding: 2.5rem 2.25rem; }
  .auth-mobile-logo { display: inline-flex; }
  .auth-form-inner { max-width: 100%; }
}
/* Phone */
@media (max-width: 560px) {
  .auth-page-wrap { padding: calc(var(--header-height) + 1rem) 1rem 2rem; }
  .auth-shell { border-radius: 16px; }
  .auth-form-panel { padding: 2rem 1.25rem; }
  .auth-title { font-size: 1.45rem; }
  .auth-sub { font-size: 0.9rem; margin-bottom: 1.4rem; }
  .auth-input { padding: 0.8rem 0.9rem 0.8rem 2.5rem; font-size: 0.92rem; }
  .auth-submit { padding: 0.85rem 1rem; font-size: 0.95rem; }
  .auth-row-between { flex-direction: row; }
}

/* =========================================================================
   Phase 5 — Language Switcher
   ========================================================================= */
.mn-lang-switcher {
  position: relative;
  flex-shrink: 0;
}
.mn-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.25s;
  white-space: nowrap;
}
.mn-lang-btn:hover,
.mn-lang-btn[aria-expanded="true"] {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.mn-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  min-width: 175px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.mn-lang-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.mn-lang-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: background 0.15s;
}
.mn-lang-option:hover { background: var(--bg-dark); }
.mn-lang-option.active { font-weight: 600; }
.mn-lang-flag { font-size: 1.1rem; flex-shrink: 0; }
.mn-lang-name { flex: 1; }

/* Translation progress indicator */
#mn-translate-indicator {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent-primary);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 153, 204,0.35);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Suppress Google Translate toolbar / banner completely */
.goog-te-banner-frame,
.goog-te-gadget-icon,
.goog-logo-link,
.goog-te-gadget span,
#goog-gt-tt,
.goog-te-balloon-frame,
div#goog-gt-,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
.skiptranslate { display: none !important; }
body { top: 0px !important; }
.goog-te-gadget { height: 0 !important; overflow: hidden !important; }

/* =========================================================================
   Phase 5 — RTL Layout Overrides (applied via [dir="rtl"] on <html>)
   ========================================================================= */
[dir="rtl"] {
  text-align: right;
  direction: rtl;
}
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .nav-container { flex-direction: row-reverse; }
[dir="rtl"] .auth-buttons { margin-left: 1rem; margin-right: auto; }
[dir="rtl"] .mn-lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .card,
[dir="rtl"] .post-content { text-align: right; }
[dir="rtl"] .article-layout { direction: rtl; }
[dir="rtl"] .author-profile-card,
[dir="rtl"] .follow-card { flex-direction: row-reverse; }
[dir="rtl"] .notif-dropdown { right: 0; left: auto; }
[dir="rtl"] .notif-item { flex-direction: row-reverse; }
[dir="rtl"] .footer-grid { direction: rtl; }
[dir="rtl"] .contact-layout { direction: rtl; }
[dir="rtl"] .mn-alert { border-left: none; border-right: 4px solid; }
[dir="rtl"] .comment-author { flex-direction: row-reverse; }
[dir="rtl"] .children { margin-left: 0; margin-right: 3rem; padding-left: 0; padding-right: 1.5rem; border-left: none; border-right: 2px solid rgba(0, 153, 204,0.1); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; }

/* =========================================================================
   Phase 6 — Page Loader
   ========================================================================= */
#mn-page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#mn-page-loader.mn-loader-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.mn-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.mn-loader-chip {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: mn-pulse 1.2s ease-in-out infinite;
}
@keyframes mn-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.15); opacity: 0.7; }
}
.mn-loader-bar {
  width: 160px;
  height: 3px;
  background: var(--border-glass);
  border-radius: 99px;
  overflow: hidden;
}
.mn-loader-progress {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 99px;
  animation: mn-slide 1.4s ease-in-out infinite;
}
@keyframes mn-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* =========================================================================
   Phase 6 — Back to Top Button
   ========================================================================= */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
  box-shadow: 0 4px 16px rgba(0, 153, 204, 0.35);
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--accent-secondary);
  transform: translateY(-3px);
}

/* =========================================================================
   Phase 6 — Cookie Consent Banner
   ========================================================================= */
.mn-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.08);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  padding: 1.25rem 0;
}
.mn-cookie-banner.visible {
  transform: translateY(0);
}
.mn-cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.mn-cookie-text {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
  min-width: 260px;
}
.mn-cookie-icon {
  font-size: 1.5rem;
  color: var(--accent-primary);
  margin-top: 2px;
  flex-shrink: 0;
}
.mn-cookie-text strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  font-family: var(--font-heading);
}
.mn-cookie-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}
.mn-cookie-text p a {
  color: var(--accent-primary);
  text-decoration: underline;
}
.mn-cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.mn-cookie-btn {
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 0.6rem 1.4rem;
}

/* =========================================================================
   Phase 6 — 404 Error Page
   ========================================================================= */
.error-404-section {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
}
.error-404-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.error-404-graphic {
  margin-bottom: 2rem;
}
.error-404-number {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: clamp(5rem, 14vw, 9rem);
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1;
}
.error-404-zero {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45em;
  color: #fff;
  animation: mn-pulse 2s ease-in-out infinite;
}
.error-404-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 1rem;
}
.error-404-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.error-404-search {
  margin-bottom: 2.5rem;
}
.error-404-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.error-404-search-wrap:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 153, 204,0.1);
}
.error-404-search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}
.error-404-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1rem;
  color: var(--text-main);
  font-family: var(--font-body);
}
.error-404-search-input::placeholder { color: var(--text-muted); }
.error-404-search-btn {
  border-radius: 0 10px 10px 0 !important;
  padding: 0.85rem 1.75rem !important;
  flex-shrink: 0;
}
.error-404-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}
.error-404-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  background: var(--bg-surface);
}
.error-404-link:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}
.error-404-recent-title {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}
.error-404-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.error-404-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  background: var(--bg-surface);
  transition: transform 0.2s, box-shadow 0.2s;
}
.error-404-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}
.error-404-card-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}
.error-404-card-placeholder {
  background: linear-gradient(135deg, rgba(0, 153, 204,0.08), rgba(247, 148, 29,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--accent-primary);
}
.error-404-card-body {
  padding: 0.9rem;
}
.error-404-card-body h4 {
  color: var(--text-main);
  font-size: 0.9rem;
  margin: 0 0 0.3rem;
  line-height: 1.4;
  font-family: var(--font-heading);
}
.error-404-card-body span {
  color: var(--text-muted);
  font-size: 0.8rem;
}
@media (max-width: 600px) {
  .error-404-recent-grid { grid-template-columns: 1fr; }
  .error-404-number { font-size: 5rem; }
}

/* =========================================================================
   Phase 6 — Search Results Page
   ========================================================================= */
.search-results-section {
  padding: 8rem 0 5rem;
}
.search-header {
  margin-bottom: 3rem;
  text-align: center;
}
.search-header-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.search-result-count {
  background: rgba(0, 153, 204,0.1);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-heading);
}
.search-query-label {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.search-page-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 2rem;
}
.search-page-form {
  max-width: 600px;
  margin: 0 auto;
}
.search-page-form-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  padding-left: 1.25rem;
  gap: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-page-form-wrap:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 153, 204,0.1);
}
.search-page-form-wrap i { color: var(--text-muted); flex-shrink: 0; }
.search-page-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 1rem 0;
  font-size: 1rem;
  color: var(--text-main);
  font-family: var(--font-body);
}
.search-page-input::placeholder { color: var(--text-muted); }
.search-page-form-wrap .btn {
  border-radius: 0 10px 10px 0 !important;
  padding: 0.85rem 1.75rem !important;
  flex-shrink: 0;
}
.search-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.search-result-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  transition: transform 0.2s, box-shadow 0.2s;
}
.search-result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.search-result-thumb {
  display: block;
  overflow: hidden;
}
.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.search-result-card:hover .search-result-thumb img { transform: scale(1.04); }
.search-result-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.search-result-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.search-result-cat {
  background: rgba(0, 153, 204,0.08);
  color: var(--accent-primary);
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.8rem;
  transition: background 0.2s;
}
.search-result-cat:hover { background: rgba(0, 153, 204,0.15); }
.search-result-title {
  font-size: 1.25rem;
  font-family: var(--font-heading);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.search-result-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
}
.search-result-title a:hover { color: var(--accent-primary); }
.search-result-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.search-result-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.search-result-author:hover { color: var(--accent-primary); }
.search-result-avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.search-no-results {
  text-align: center;
  padding: 4rem 0;
}
.search-no-results-icon {
  font-size: 4rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}
.search-no-results h2 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 1rem;
}
.search-no-results p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
@media (max-width: 640px) {
  .search-result-card { grid-template-columns: 1fr; }
  .search-result-thumb { height: 180px; }
}

/* =========================================================================
   Phase 6 — Report Modal
   ========================================================================= */
.mn-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.mn-modal.open {
  pointer-events: all;
  opacity: 1;
}
.mn-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.mn-modal-box {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 460px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  border: 1px solid var(--border-glass);
}
.mn-modal-box h3 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mn-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color 0.2s;
  padding: 0.25rem;
}
.mn-modal-close:hover { color: var(--text-main); }
.mn-report-reasons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mn-report-reason-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.mn-report-reason-label:hover,
.mn-report-reason-label:has(input:checked) {
  border-color: var(--accent-primary);
  background: rgba(0, 153, 204,0.05);
  color: var(--text-main);
}
.mn-report-reason-label input { accent-color: var(--accent-primary); }

/* mn-comment-* styles are in the Comments section above */
  --accent-primary-hover: #007BAD;
  --accent-secondary-hover: #D97D0E;

/* =========================================================================
   Phase 6 — Mobile Responsive Improvements
   ========================================================================= */
@media (max-width: 768px) {
  /* Header nav */
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-glass); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-glass);
    padding: 1rem 1.5rem; gap: 0; z-index: 999; }
  .nav-links.active { display: flex; }
  .nav-links a { padding: 0.75rem 0; border-bottom: 1px solid var(--border-glass); }
  .nav-links a:last-child { border-bottom: none; }
  .dropdown-content { position: static; display: none; box-shadow: none; border: none;
    background: transparent; padding: 0 1rem; }
  .dropdown:hover .dropdown-content { display: block; }

  /* Auth buttons — hide text labels on small screens */
  .auth-buttons [style*="Sign in"] span,
  .auth-buttons [style*="My Profile"] { font-size: 0.8rem !important; padding: 0.4rem 0.8rem !important; }

  /* Language switcher */
  .mn-lang-switcher { margin-left: 0 !important; }

  /* Article layout */
  .article-layout { grid-template-columns: 1fr !important; }
  .toc { position: static !important; top: auto !important; }

  /* Footer grid */
  .footer-grid { grid-template-columns: 1fr !important; }

  /* Cookie banner */
  .mn-cookie-inner { flex-direction: column; gap: 1rem; }
  .mn-cookie-actions { width: 100%; }
  .mn-cookie-btn { flex: 1; }

  /* Back to top */
  #back-to-top { bottom: 1.25rem; right: 1.25rem; width: 40px; height: 40px; font-size: 0.85rem; }

  /* Search page */
  .search-result-card { grid-template-columns: 1fr; }

  /* Error 404 */
  .error-404-recent-grid { grid-template-columns: 1fr; }

  /* Report modal */
  .mn-modal-box { padding: 1.75rem; }
}
@media (max-width: 480px) {
  /* Hero headings */
  .hero-title, .page-title { font-size: clamp(1.8rem, 8vw, 3rem) !important; }

  /* Cards grid — single column */
  .blog-grid, .related-posts-grid { grid-template-columns: 1fr !important; }

  /* Table of contents — collapsible on mobile */
  .toc h4:first-child { cursor: pointer; }
  .toc h4:first-child::after { content: " ▾"; font-size: 0.8em; }

  /* Error 404 number */
  .error-404-number { font-size: 4.5rem; }
}

/* =========================================================================
   Phase 6 — Site Logo (light/dark swap)
   ========================================================================= */
.site-logo {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s;
}
/* Light mode: show dark logo (dark logo = dark text, works on light bg) */
[data-theme="light"] .site-logo-dark  { display: block; }
[data-theme="light"] .site-logo-light { display: none; }
/* Dark mode: show light logo (light logo = light text, works on dark bg) */
[data-theme="dark"]  .site-logo-dark  { display: none; }
[data-theme="dark"]  .site-logo-light { display: block; }
/* Default fallback before JS sets data-theme */
.site-logo-light { display: none; }
.site-logo-dark  { display: block; }

/* =========================================================================
   Phase 5 — Performance: font-display swap hint override
   ========================================================================= */
/* (Google Fonts loaded from CDN — swap is set in the URL query ?display=swap) */

/* =========================================================================
   Phase 5 — Dark Mode: Google Translate selector fix
   ========================================================================= */
[data-theme="dark"] .goog-te-combo,
[data-theme="dark"] .goog-te-gadget select {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-glass) !important;
}


/* =========================================================================
   Phase 6b — Post Reactions Bar
   ========================================================================= */
.mn-reactions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
}
.mn-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 99px;
  border: 1px solid var(--border-glass);
  background: transparent;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: var(--font-body);
}
.mn-react-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 153, 204, 0.06);
  transform: translateY(-2px);
}
.mn-react-btn.active {
  border-color: var(--accent-primary);
  background: rgba(0, 153, 204, 0.1);
  color: var(--accent-primary);
  font-weight: 600;
}
.mn-react-emoji { font-size: 1.1rem; line-height: 1; }
.mn-react-count { font-weight: 700; min-width: 1ch; }
@keyframes mn-react-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.mn-react-pop { animation: mn-react-pop 0.35s ease; }

/* =========================================================================
   Phase 6b — Dark mode Three.js canvas dim
   ========================================================================= */
[data-theme="dark"] #mn-bg-canvas { opacity: 0.35; }
[data-theme="light"] #mn-bg-canvas { opacity: 0.45; }

/* =========================================================================
   Phase 6b — Search page nav links fix (pagination)
   ========================================================================= */
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s;
  margin: 0 0.2rem;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.3rem; }

/* =========================================================================
   Phase 6b — Notification bell dark mode fix
   ========================================================================= */
[data-theme="dark"] .notif-dropdown {
  background: var(--bg-surface);
  border-color: var(--border-glass);
}
[data-theme="dark"] .notif-item {
  border-bottom-color: var(--border-glass);
}

/* =========================================================================
   Phase 6b — Mobile nav: auth buttons stack fix
   ========================================================================= */
@media (max-width: 900px) {
  .auth-buttons { margin-left: 0 !important; gap: 0.35rem !important; }
  .auth-buttons a { font-size: 0.8rem !important; padding: 0.4rem 0.7rem !important; }
  .header-avatar { width: 30px !important; height: 30px !important; }
}

/* =========================================================================
   Phase 6b — Category page grid fix
   ========================================================================= */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
@media (max-width: 640px) {
  .category-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Phase 6b — Single article engagement bar
   ========================================================================= */
.article-engagement {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 0 0.25rem;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  margin: 2rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.article-engagement-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.article-engagement-stat i { color: var(--accent-primary); }

/* =========================================================================
   Dark Mode — Comprehensive Navy Theme (matches #0A1628 dark logo)
   ========================================================================= */

/* ── Body & backgrounds ─────────────────────────────────────────────────── */
[data-theme="dark"] body {
  background-color: #0A1628;
}
[data-theme="dark"] .bg-ambient {
  opacity: 1;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
[data-theme="dark"] .card,
[data-theme="dark"] .post-card,
[data-theme="dark"] .related-post-card,
[data-theme="dark"] .search-result-card,
[data-theme="dark"] .error-404-card,
[data-theme="dark"] .mn-comment-item {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.14) !important;
}
[data-theme="dark"] .card:hover,
[data-theme="dark"] .post-card:hover {
  border-color: rgba(0, 187, 238, 0.3) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* ── Hero & section gradients ───────────────────────────────────────────── */
[data-theme="dark"] .article-header-wrapper {
  background: linear-gradient(180deg, rgba(0, 153, 204, 0.08) 0%, #0A1628 100%) !important;
  border-bottom-color: rgba(0, 153, 204, 0.12) !important;
}
[data-theme="dark"] .about-hero,
[data-theme="dark"] .page-header {
  background: linear-gradient(180deg, rgba(0, 153, 204, 0.06) 0%, #0A1628 100%) !important;
}
[data-theme="dark"] .related-posts-full-width {
  background: #060E1C !important;
  border-top-color: rgba(0, 153, 204, 0.12) !important;
}
[data-theme="dark"] .about-cta-card {
  background: linear-gradient(135deg, rgba(0, 153, 204, 0.12), rgba(247, 148, 29, 0.08)) !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
[data-theme="dark"] .nav-links a {
  color: #A8D4EA !important;
}
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
  color: #00BBEE !important;
}
[data-theme="dark"] .mobile-toggle {
  color: var(--text-main);
}
[data-theme="dark"] .nav-links.active {
  background: rgba(8, 16, 32, 0.98) !important;
  border-bottom-color: rgba(0, 153, 204, 0.2) !important;
}

/* ── Sidebar / TOC ──────────────────────────────────────────────────────── */
[data-theme="dark"] .toc {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.14) !important;
}
[data-theme="dark"] .toc a {
  color: var(--text-muted) !important;
}
[data-theme="dark"] .toc a:hover,
[data-theme="dark"] .toc a.active {
  color: #00BBEE !important;
}
[data-theme="dark"] .star-rating-widget {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.14) !important;
}

/* ── Author profile ─────────────────────────────────────────────────────── */
[data-theme="dark"] .author-profile-cover {
  background: linear-gradient(135deg, #0A1628, #142244) !important;
}
[data-theme="dark"] .author-profile-card {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.14) !important;
}
[data-theme="dark"] .author-profile-stats-bar {
  background: #060E1C !important;
  border-color: rgba(0, 153, 204, 0.1) !important;
}
[data-theme="dark"] .author-tab-btn {
  color: var(--text-muted);
  border-color: transparent;
}
[data-theme="dark"] .author-tab-btn.active {
  color: #00BBEE;
  border-bottom-color: #00BBEE;
}
[data-theme="dark"] .follow-card {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.12) !important;
}

/* ── Comments ───────────────────────────────────────────────────────────── */
[data-theme="dark"] .comments-area > div,
[data-theme="dark"] #comments > div:last-child {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.12) !important;
}
[data-theme="dark"] .mn-comment-item {
  border-bottom-color: rgba(0, 153, 204, 0.1) !important;
}
/* comment-list dark mode now handled in the Comments section */

/* ── Forms & inputs ─────────────────────────────────────────────────────── */
[data-theme="dark"] .form-control,
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea,
[data-theme="dark"] .contact-form select {
  background: #0A1628 !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
  color: #DCF0FC !important;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .contact-form input:focus,
[data-theme="dark"] .contact-form textarea:focus {
  border-color: #00BBEE !important;
  box-shadow: 0 0 0 3px rgba(0, 187, 238, 0.12) !important;
  background: #0F1E38 !important;
}
[data-theme="dark"] .form-control::placeholder { color: #4A7A99 !important; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
[data-theme="dark"] .btn-outline {
  border-color: rgba(0, 153, 204, 0.35) !important;
  color: #A8D4EA !important;
}
[data-theme="dark"] .btn-outline:hover {
  border-color: #00BBEE !important;
  color: #00BBEE !important;
  background: rgba(0, 187, 238, 0.08) !important;
}

/* ── Badges & tags ──────────────────────────────────────────────────────── */
[data-theme="dark"] .badge-tag {
  background: rgba(0, 153, 204, 0.1) !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
  color: #7BC8E2 !important;
}
[data-theme="dark"] .badge-tag:hover {
  background: rgba(0, 187, 238, 0.18) !important;
  color: #00BBEE !important;
}
[data-theme="dark"] .search-result-cat {
  background: rgba(0, 153, 204, 0.12) !important;
  color: #7BC8E2 !important;
}

/* ── Cookie banner ──────────────────────────────────────────────────────── */
[data-theme="dark"] .mn-cookie-banner {
  background: #0F1E38 !important;
  border-top-color: rgba(0, 153, 204, 0.2) !important;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5) !important;
}

/* ── Report modal ───────────────────────────────────────────────────────── */
[data-theme="dark"] .mn-modal-box {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}
[data-theme="dark"] .mn-report-reason-label {
  border-color: rgba(0, 153, 204, 0.15) !important;
  color: #A8D4EA !important;
}
[data-theme="dark"] .mn-report-reason-label:hover,
[data-theme="dark"] .mn-report-reason-label:has(input:checked) {
  background: rgba(0, 187, 238, 0.08) !important;
  border-color: #00BBEE !important;
  color: #DCF0FC !important;
}

/* ── Notification bell dropdown ─────────────────────────────────────────── */
[data-theme="dark"] .notif-dropdown {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .notif-dropdown-header {
  border-bottom-color: rgba(0, 153, 204, 0.12) !important;
}
[data-theme="dark"] .notif-item {
  border-bottom-color: rgba(0, 153, 204, 0.08) !important;
}
[data-theme="dark"] .notif-item.unread {
  background: rgba(0, 153, 204, 0.06) !important;
}

/* ── Search results page ────────────────────────────────────────────────── */
[data-theme="dark"] .search-page-form-wrap,
[data-theme="dark"] .error-404-search-wrap {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
}
[data-theme="dark"] .search-page-input,
[data-theme="dark"] .error-404-search-input {
  color: #DCF0FC !important;
}
[data-theme="dark"] .error-404-link {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.15) !important;
  color: #A8D4EA !important;
}
[data-theme="dark"] .error-404-link:hover {
  border-color: #00BBEE !important;
  color: #00BBEE !important;
}

/* ── Page loader ────────────────────────────────────────────────────────── */
[data-theme="dark"] #mn-page-loader {
  background: #0A1628;
}

/* ── Language switcher ──────────────────────────────────────────────────── */
[data-theme="dark"] .mn-lang-btn {
  background: rgba(10, 22, 40, 0.8) !important;
  border-color: rgba(0, 153, 204, 0.25) !important;
  color: #A8D4EA !important;
}
[data-theme="dark"] .mn-lang-dropdown {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .mn-lang-option {
  color: #A8D4EA !important;
}
[data-theme="dark"] .mn-lang-option:hover,
[data-theme="dark"] .mn-lang-option.active {
  background: rgba(0, 187, 238, 0.08) !important;
  color: #00BBEE !important;
}

/* ── Reactions bar ──────────────────────────────────────────────────────── */
[data-theme="dark"] .mn-reactions {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.14) !important;
}
[data-theme="dark"] .mn-react-btn {
  border-color: rgba(0, 153, 204, 0.2) !important;
  color: #6EA8C8 !important;
}
[data-theme="dark"] .mn-react-btn:hover {
  border-color: #00BBEE !important;
  color: #00BBEE !important;
  background: rgba(0, 187, 238, 0.08) !important;
}
[data-theme="dark"] .mn-react-btn.active {
  border-color: #00BBEE !important;
  background: rgba(0, 187, 238, 0.12) !important;
  color: #00BBEE !important;
}

/* ── Article engagement bar ─────────────────────────────────────────────── */
[data-theme="dark"] .article-engagement {
  border-color: rgba(0, 153, 204, 0.12) !important;
}

/* ── Support Us page ────────────────────────────────────────────────────── */
[data-theme="dark"] .support-tier-btn {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
  color: #A8D4EA !important;
}
[data-theme="dark"] .support-tier-btn:hover,
[data-theme="dark"] .support-tier-btn.active {
  border-color: #00BBEE !important;
  background: rgba(0, 187, 238, 0.1) !important;
}
[data-theme="dark"] .support-method-tab {
  color: #6EA8C8 !important;
  border-color: rgba(0, 153, 204, 0.15) !important;
}
[data-theme="dark"] .support-method-tab.active {
  color: #00BBEE !important;
  border-bottom-color: #00BBEE !important;
}
[data-theme="dark"] .support-method-panel {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.15) !important;
}

/* ── Profile edit page ──────────────────────────────────────────────────── */
[data-theme="dark"] .profile-section {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.14) !important;
}

/* ── About page ─────────────────────────────────────────────────────────── */
[data-theme="dark"] .about-stat-card,
[data-theme="dark"] .about-pillar-card,
[data-theme="dark"] .team-card {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.14) !important;
}
[data-theme="dark"] .team-card:hover,
[data-theme="dark"] .about-pillar-card:hover {
  border-color: rgba(0, 187, 238, 0.3) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 187, 238, 0.1) !important;
}

/* ── Share Ideas / Contact pages ────────────────────────────────────────── */
[data-theme="dark"] .contact-card,
[data-theme="dark"] .idea-form-card,
[data-theme="dark"] .contact-info-col {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.14) !important;
}
[data-theme="dark"] .contact-info-item {
  border-bottom-color: rgba(0, 153, 204, 0.1) !important;
}
[data-theme="dark"] .how-it-works-step {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.14) !important;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
[data-theme="dark"] .footer-brand p,
[data-theme="dark"] .footer-links a {
  color: #6EA8C8 !important;
}
[data-theme="dark"] .footer-links a:hover {
  color: #00BBEE !important;
}
[data-theme="dark"] .footer-social a {
  background: rgba(0, 153, 204, 0.1) !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
  color: #7BC8E2 !important;
}
[data-theme="dark"] .footer-social a:hover {
  background: #00BBEE !important;
  border-color: #00BBEE !important;
  color: #0A1628 !important;
}
[data-theme="dark"] .footer-bottom {
  border-top-color: rgba(0, 153, 204, 0.1) !important;
  color: #4A7A99 !important;
}
[data-theme="dark"] .newsletter-form .form-control {
  background: rgba(0, 153, 204, 0.06) !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
}

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 6px;
  background: #060E1C;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 153, 204, 0.3);
  border-radius: 99px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #00BBEE;
}

/* ── Selection highlight ────────────────────────────────────────────────── */
[data-theme="dark"] ::selection {
  background: rgba(0, 187, 238, 0.25);
  color: #DCF0FC;
}

/* ── Auth pages (login/register) ────────────────────────────────────────── */
[data-theme="dark"] .auth-shell {
  background: #0F1E38 !important;
  border-color: rgba(0, 153, 204, 0.2) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55) !important;
}
[data-theme="dark"] .auth-input,
[data-theme="dark"] #mn-login-form input[type="text"],
[data-theme="dark"] #mn-login-form input[type="password"] {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(0, 153, 204, 0.25) !important;
  color: #E2EAF5 !important;
}
[data-theme="dark"] .auth-title { color: #F1F5F9 !important; }
[data-theme="dark"] .auth-mobile-logo { color: #F1F5F9 !important; }

/* ── Three.js canvas — brighter in dark ─────────────────────────────────── */
[data-theme="dark"] #mn-bg-canvas {
  opacity: 0.5 !important;
}

/* ── Back to top button ─────────────────────────────────────────────────── */
[data-theme="dark"] #back-to-top {
  background: rgba(0, 153, 204, 0.85) !important;
  box-shadow: 0 4px 16px rgba(0, 187, 238, 0.3) !important;
}
[data-theme="dark"] #back-to-top:hover {
  background: #00BBEE !important;
}

/* =========================================================================
   RESPONSIVE OVERHAUL — All Breakpoints
   Covers: 320–480px mobile | 481–767px large phone | 768–1024px tablet
           1025–1440px laptop | 1441px+ large desktop
   ========================================================================= */

/* ── 0. Global overflow guard ─────────────────────────────────────────────── */
html {
  overflow-x: hidden;
}
*, *::before, *::after {
  max-width: 100%;
}
img, video, canvas, iframe, embed, object {
  max-width: 100%;
  height: auto;
}
/* Prevent the animated graphic circles from ever causing overflow */
.graphic-circle,
.graphic-circle.outer {
  overflow: hidden;
  max-width: none; /* circles are absolute inside overflow:hidden hero */
}
/* Ensure no table overflows */
table {
  width: 100%;
  table-layout: auto;
  overflow-x: auto;
  display: block;
}

/* ── 1. Large Desktop — 1441px+ ───────────────────────────────────────────── */
@media (min-width: 1441px) {
  .container {
    max-width: 1400px;
    padding: 0 3%;
  }
  .hero-title {
    font-size: 6rem;
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    max-width: 1400px;
    padding: 0 3%;
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 5rem;
    row-gap: 0;
  }
  .related-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .blog-layout {
    grid-template-columns: 2fr 1fr;
    gap: 5rem;
  }
  .section-padding {
    padding: 8rem 0;
  }
}

/* ── 2. Laptop — 1025px–1440px ────────────────────────────────────────────── */
@media (min-width: 1025px) and (max-width: 1440px) {
  .container {
    padding: 0 4%;
  }
  .footer-grid {
    padding: 0 4%;
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    column-gap: 3rem;
    row-gap: 0;
  }
  .grid-3 {
    gap: 1.75rem;
  }
}

/* ── 3. Tablet — 768px–1024px ─────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Container */
  .container {
    padding: 0 4%;
  }
  .section-padding {
    padding: 5rem 0;
  }

  /* Header / Nav */
  .nav-links {
    gap: 1.5rem;
  }
  .nav-links a {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
  }
  .auth-buttons a {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.75rem !important;
  }
  .header-avatar {
    width: 30px !important;
    height: 30px !important;
  }

  /* Hero */
  .hero-section {
    padding: 110px 4% 4rem;
  }
  .hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
  }
  .hero-actions {
    gap: 1rem;
  }

  /* Grids */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Blog */
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .blog-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Article / TOC */
  .article-layout {
    grid-template-columns: 1fr !important;
    row-gap: 0;
  }
  .toc {
    position: static !important;
    top: auto !important;
    display: block !important;
    order: -1;
  }
  .star-rating-widget {
    margin-top: 0 !important;
  }
  .article-header-wrapper {
    padding: 110px 4% 2rem !important;
  }

  /* Related posts */
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 2.5rem;
    padding: 0 4%;
  }
  .footer-brand,
  .footer-links-col {
    border-right: none;
    padding-right: 0;
  }
  .footer-newsletter {
    padding-left: 0;
  }

  /* About / Contact */
  .about-grid,
  .testimonial-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
  }
  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  .contact-info-col {
    position: static !important;
  }
  .values-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .about-team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .about-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .about-pillars-grid {
    grid-template-columns: 1fr !important;
  }

  /* Author profile */
  .author-stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .author-posts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Support */
  .support-tiers {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .support-impact-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Profile form */
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Post list cards */
  .post-list-card {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  .post-list-image-wrap {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    height: 220px;
  }

  /* How it works */
  .how-it-works-row {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .hiw-step {
    flex: 1 1 calc(50% - 1rem);
    min-width: 200px;
  }
  .hiw-arrow:nth-child(2),
  .hiw-arrow:nth-child(4) {
    display: none;
  }

  /* Notification dropdown — prevent right-side clip */
  .notif-dropdown {
    width: 300px;
    right: 0;
    left: auto;
  }

  /* 404 page */
  .error-404-recent-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Search results */
  .search-results-grid {
    gap: 1.5rem;
  }
}

/* ── 4. Mobile Large — 481px–767px ────────────────────────────────────────── */
@media (min-width: 481px) and (max-width: 767px) {
  /* Container */
  .container {
    padding: 0 5%;
  }
  .section-padding {
    padding: 4rem 0;
  }

  /* Header — switch to mobile hamburger */
  .nav-links {
    display: none;
    flex-direction: column !important;
    position: fixed !important;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 380px;
    height: 100vh;
    background: var(--bg-dark) !important;
    padding: 5.5rem 2rem 2rem !important;
    gap: 0 !important;
    z-index: 999;
    transition: right 0.3s ease !important;
    border-left: 1px solid var(--border-glass);
    box-shadow: -10px 0 50px rgba(0,0,0,0.15);
    overflow-y: auto;
  }
  .nav-links.active {
    display: flex !important;
    right: 0 !important;
  }
  .nav-links a {
    padding: 0.85rem 0 !important;
    border-bottom: 1px solid var(--border-glass);
    font-size: 1rem !important;
    letter-spacing: 0.5px !important;
    display: block;
  }
  .dropdown-content {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 0 0 1rem !important;
    display: none !important;
  }
  .dropdown.active .dropdown-content {
    display: flex !important;
    flex-direction: column;
  }
  .mobile-toggle {
    display: flex !important;
    order: 10;
  }
  .auth-buttons {
    gap: 0.35rem !important;
    margin-right: 0.5rem !important;
  }
  .auth-buttons a {
    font-size: 0.78rem !important;
    padding: 0.4rem 0.65rem !important;
  }
  .header-avatar {
    width: 28px !important;
    height: 28px !important;
  }

  /* Hero */
  .hero-section {
    padding: 110px 5% 3.5rem;
    min-height: auto;
  }
  .hero-title {
    font-size: clamp(2rem, 7vw, 3rem) !important;
  }
  .hero-subtitle {
    font-size: 1rem !important;
  }
  .hero-actions {
    flex-direction: column !important;
    align-items: center;
    gap: 1rem;
    padding: 0;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    text-align: center;
  }

  /* Page headers */
  .page-header,
  .article-header-wrapper {
    padding: 110px 5% 2.5rem !important;
  }
  .page-title {
    font-size: clamp(1.8rem, 6vw, 2.8rem) !important;
  }

  /* Grids */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem;
  }

  /* Blog */
  .blog-layout {
    grid-template-columns: 1fr !important;
  }
  .blog-grid {
    grid-template-columns: 1fr !important;
  }

  /* Article */
  .article-layout {
    grid-template-columns: 1fr !important;
    row-gap: 0;
  }
  .toc {
    position: static !important;
    display: block !important;
    order: -1;
    margin-bottom: 2rem;
  }
  .article-header-wrapper h1 {
    font-size: clamp(1.6rem, 5vw, 2.5rem) !important;
  }

  /* Author box */
  .author-box {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    padding: 2rem !important;
    gap: 1.25rem;
  }

  /* Related posts */
  .related-posts-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 0 5% !important;
  }
  .footer-brand,
  .footer-links-col {
    border-right: none !important;
    padding-right: 0 !important;
  }
  .footer-newsletter {
    padding-left: 0 !important;
  }
  .newsletter-form {
    flex-direction: column !important;
  }
  .newsletter-form .form-control {
    min-width: 0 !important;
    width: 100% !important;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  /* About */
  .about-grid,
  .testimonial-grid {
    grid-template-columns: 1fr !important;
  }
  .values-grid {
    grid-template-columns: 1fr !important;
  }
  .about-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .about-team-grid {
    grid-template-columns: 1fr !important;
  }
  .about-pillars-grid {
    grid-template-columns: 1fr !important;
  }
  .timeline::before {
    left: 20px !important;
  }
  .timeline-item {
    width: 100% !important;
    padding: 1.5rem 0 1.5rem 3rem !important;
    text-align: left !important;
    left: 0 !important;
  }
  .timeline-item .timeline-dot {
    left: 10px !important;
  }

  /* Contact */
  .contact-layout {
    grid-template-columns: 1fr !important;
  }
  .contact-info-col {
    position: static !important;
  }
  .contact-form {
    padding: 1.75rem !important;
  }

  /* Author profile */
  .author-profile-name-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .author-profile-card {
    padding: 0 1.25rem 1.75rem !important;
  }
  .author-stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .author-posts-grid {
    grid-template-columns: 1fr !important;
  }

  /* Support */
  .support-tiers {
    grid-template-columns: 1fr !important;
  }
  .support-impact-grid {
    grid-template-columns: 1fr !important;
  }
  .support-method-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* How it works */
  .how-it-works-row {
    flex-direction: column !important;
  }
  .hiw-arrow {
    transform: rotate(90deg);
    align-self: center;
  }

  /* Profile page */
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .avatar-upload-wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* Post list cards */
  .post-list-card {
    flex-direction: column !important;
    gap: 1.25rem !important;
  }
  .post-list-image-wrap {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    height: 200px;
  }

  /* Notification dropdown */
  .notif-dropdown {
    width: 90vw !important;
    right: -1rem !important;
    left: auto !important;
  }

  /* Search results */
  .search-result-card {
    grid-template-columns: 1fr !important;
  }
  .search-result-thumb {
    height: 180px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
  }
  .search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* 404 */
  .error-404-recent-grid {
    grid-template-columns: 1fr !important;
  }
  .error-404-number {
    font-size: 5rem !important;
  }
  .error-404-actions {
    flex-direction: column;
    align-items: center;
  }
  .error-404-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Cookie banner */
  .mn-cookie-inner {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  .mn-cookie-actions {
    width: 100% !important;
    justify-content: stretch !important;
  }
  .mn-cookie-btn {
    flex: 1;
  }

  /* Comments — responsive handled in the Comments section above */

  /* Legal pages */
  .legal-content {
    padding: 1.5rem !important;
  }

  /* Article engagement bar */
  .article-engagement {
    gap: 1rem !important;
  }

  /* Reactions */
  .mn-reactions {
    gap: 0.5rem !important;
    flex-wrap: wrap;
  }

  /* Category grid */
  .category-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── 5. Mobile Small — ≤480px ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Container */
  .container {
    padding: 0 4.5%;
  }
  .section-padding {
    padding: 3.5rem 0;
  }

  /* Header */
  .nav-links {
    display: none;
    flex-direction: column !important;
    position: fixed !important;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-dark) !important;
    padding: 5rem 1.5rem 2rem !important;
    gap: 0 !important;
    z-index: 999;
    transition: right 0.3s ease !important;
    border-left: 1px solid var(--border-glass);
    box-shadow: -10px 0 50px rgba(0,0,0,0.2);
    overflow-y: auto;
  }
  .nav-links.active {
    display: flex !important;
    right: 0 !important;
  }
  .nav-links a {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.95rem !important;
    letter-spacing: 0 !important;
  }
  .dropdown-content {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 0 0 1rem !important;
    display: none !important;
  }
  .dropdown.active .dropdown-content {
    display: flex !important;
    flex-direction: column;
  }
  .mobile-toggle {
    display: flex !important;
  }
  /* Header: logo + auth side by side, toggle on far right */
  .nav-container {
    gap: 0.5rem;
  }
  .logo {
    font-size: 1.3rem !important;
  }
  .site-logo {
    width: 120px !important;
    height: auto !important;
  }
  .auth-buttons {
    gap: 0.25rem !important;
    margin-left: auto !important;
    margin-right: 0.5rem !important;
  }
  .auth-buttons a {
    font-size: 0.72rem !important;
    padding: 0.35rem 0.5rem !important;
    white-space: nowrap !important;
  }
  .header-avatar {
    width: 26px !important;
    height: 26px !important;
  }
  /* Hide "My Profile" text link on very small screens, keep avatar */
  .auth-buttons a[href*="my-profile"] {
    display: none !important;
  }
  /* Notification bell — tighter */
  .notif-dropdown {
    width: 95vw !important;
    right: -4vw !important;
    left: auto !important;
  }

  /* Hero */
  .hero-section {
    padding: 100px 4.5% 3rem;
    min-height: auto;
  }
  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
  }
  .hero-subtitle {
    font-size: 0.95rem !important;
    margin-bottom: 2rem !important;
  }
  .hero-tag {
    font-size: 0.75rem !important;
    padding: 0.4rem 1rem !important;
    margin-bottom: 1.25rem !important;
  }
  .hero-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem;
    padding: 0;
  }
  .hero-actions .btn {
    width: 100% !important;
    justify-content: center;
    text-align: center;
  }

  /* Headings */
  .page-title,
  .article-title {
    font-size: clamp(1.5rem, 7vw, 2.2rem) !important;
  }
  .section-header h2 {
    font-size: clamp(1.5rem, 7vw, 2.2rem) !important;
  }
  h1 { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  h2 { font-size: clamp(1.3rem, 6vw, 2rem); }
  h3 { font-size: clamp(1.1rem, 5vw, 1.5rem); }

  /* Page headers */
  .page-header,
  .article-header-wrapper {
    padding: 100px 4.5% 2rem !important;
  }

  /* Grids — all single column */
  .grid-3,
  .blog-grid,
  .related-posts-grid,
  .category-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* Blog layout */
  .blog-layout {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  /* Article */
  .article-layout {
    grid-template-columns: 1fr !important;
    row-gap: 0;
  }
  .toc {
    position: static !important;
    display: block !important;
    order: -1;
    padding: 1.25rem !important;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    margin-bottom: 2rem;
  }
  .article-content {
    font-size: 1rem !important;
  }
  .article-content blockquote {
    padding: 1rem 1.25rem !important;
    font-size: 1.05rem !important;
  }
  .article-cover {
    height: auto;
  }

  /* Author box */
  .author-box {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    padding: 1.5rem !important;
    gap: 1rem;
  }
  .author-bio h4 {
    font-size: 1.2rem !important;
  }

  /* Article engagement bar */
  .article-engagement {
    gap: 0.75rem !important;
    font-size: 0.82rem !important;
  }

  /* Reactions */
  .mn-reactions {
    gap: 0.5rem !important;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .mn-react-btn {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.82rem !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
    padding: 0 4.5% !important;
  }
  .footer-brand,
  .footer-links-col {
    border-right: none !important;
    padding-right: 0 !important;
  }
  .footer-newsletter {
    padding-left: 0 !important;
  }
  .newsletter-form {
    flex-direction: column !important;
    gap: 0.75rem;
  }
  .newsletter-form .form-control {
    min-width: 0 !important;
    width: 100% !important;
  }
  .newsletter-form .btn {
    width: 100%;
    border-radius: 8px !important;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  .footer-social {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* About page */
  .about-grid,
  .testimonial-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  .about-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .about-team-grid {
    grid-template-columns: 1fr !important;
  }
  .values-grid {
    grid-template-columns: 1fr !important;
  }
  .about-pillars-grid {
    grid-template-columns: 1fr !important;
  }
  .about-cta-card {
    padding: 2rem 1.25rem !important;
  }
  .about-cta-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .about-cta-btns .btn {
    width: 100%;
    text-align: center;
  }
  .timeline::before {
    left: 16px !important;
  }
  .timeline-item {
    width: 100% !important;
    padding: 1.25rem 0 1.25rem 2.5rem !important;
    text-align: left !important;
    left: 0 !important;
  }
  .timeline-item .timeline-dot {
    left: 6px !important;
  }

  /* Contact page */
  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  .contact-info-col {
    position: static !important;
  }
  .contact-form {
    padding: 1.25rem !important;
  }

  /* Author profile page */
  .author-profile-card {
    padding: 0 1rem 1.5rem !important;
  }
  .author-profile-name-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
  .author-profile-actions {
    flex-direction: column !important;
    gap: 0.75rem;
  }
  .author-profile-actions .btn {
    width: 100%;
    text-align: center;
  }
  .author-stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .author-posts-grid {
    grid-template-columns: 1fr !important;
  }

  /* Support page */
  .support-tiers {
    grid-template-columns: 1fr !important;
  }
  .support-impact-grid {
    grid-template-columns: 1fr !important;
  }
  .support-method-tabs {
    flex-direction: column !important;
    align-items: stretch;
  }
  .support-method-tab {
    width: 100% !important;
    text-align: center;
  }

  /* How it works (Share Ideas) */
  .how-it-works-row {
    flex-direction: column !important;
    gap: 1rem;
  }
  .hiw-arrow {
    transform: rotate(90deg) !important;
    align-self: center !important;
  }

  /* Profile page */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .avatar-upload-wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem;
  }
  .profile-section {
    padding: 1.25rem !important;
  }

  /* Post list cards */
  .post-list-card {
    flex-direction: column !important;
    gap: 1rem !important;
    padding: 1.25rem !important;
  }
  .post-list-image-wrap {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    height: 180px;
  }
  .post-list-card .post-title {
    font-size: 1.2rem !important;
  }

  /* Cards padding reduction */
  .card {
    padding: 1.25rem !important;
  }

  /* Comment nesting — responsive handled in the Comments section above */

  /* Search page */
  .search-results-section {
    padding: 6rem 0 3rem !important;
  }
  .search-page-title {
    font-size: clamp(1.5rem, 7vw, 2.2rem) !important;
  }
  .search-result-card {
    grid-template-columns: 1fr !important;
  }
  .search-result-footer {
    flex-direction: column !important;
    gap: 0.75rem;
    align-items: flex-start !important;
  }
  .search-page-form-wrap {
    flex-wrap: wrap !important;
    gap: 0.5rem;
  }
  .search-page-input {
    min-width: 0 !important;
    flex: 1 1 100% !important;
  }

  /* 404 page */
  .error-404-number {
    font-size: 4rem !important;
    letter-spacing: -4px !important;
  }
  .error-404-recent-grid {
    grid-template-columns: 1fr !important;
  }
  .error-404-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem;
  }
  .error-404-actions .btn {
    width: 100% !important;
    text-align: center;
  }
  .error-404-search-wrap {
    flex-direction: column !important;
    gap: 0.5rem;
  }
  .error-404-search-wrap input {
    width: 100% !important;
  }
  .error-404-search-wrap button {
    width: 100% !important;
  }

  /* Cookie banner */
  .mn-cookie-inner {
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
  }
  .mn-cookie-actions {
    width: 100% !important;
    flex-direction: column !important;
  }
  .mn-cookie-btn {
    width: 100% !important;
  }

  /* Report modal */
  .mn-modal-box {
    padding: 1.5rem 1.25rem !important;
    width: 95% !important;
    border-radius: 12px !important;
  }

  /* Back to top */
  #back-to-top {
    bottom: 1rem !important;
    right: 1rem !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 0.8rem !important;
  }

  /* Legal pages */
  .legal-content {
    padding: 1.25rem !important;
    font-size: 0.93rem !important;
  }

  /* Buttons — ensure they don't overflow */
  .btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    white-space: normal;
    word-break: break-word;
  }

  /* Forms */
  .form-control {
    font-size: 1rem !important; /* 16px prevents iOS zoom */
  }
  select.form-control {
    font-size: 1rem !important;
  }

  /* Badges / tags overflow */
  .badge-tag {
    font-size: 0.72rem !important;
    padding: 0.2rem 0.6rem !important;
  }

  /* Star rating widget */
  .star-rating-widget {
    margin-top: 0 !important;
    padding: 1.25rem !important;
  }
  .stars {
    font-size: 1.3rem !important;
  }

  /* Language switcher */
  .mn-lang-switcher {
    display: none !important; /* move into mobile menu on tiny screens */
  }
}

/* ── 6. Extra small — ≤375px ──────────────────────────────────────────────── */
@media (max-width: 375px) {
  .container {
    padding: 0 4%;
  }
  .hero-title {
    font-size: clamp(1.5rem, 9vw, 2.2rem) !important;
  }
  .auth-buttons a:not(.btn-primary):not(.header-avatar-link) {
    display: none !important; /* hide sign-in text link, keep sign-up + avatar */
  }
  .logo {
    font-size: 1.2rem !important;
  }
  .site-logo {
    width: 100px !important;
  }
  .error-404-number {
    font-size: 3.5rem !important;
  }
  .about-stats-grid {
    grid-template-columns: 1fr !important;
  }
  .footer-social a {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }
  .search-page-form-wrap .btn {
    width: 100% !important;
  }
}

/* ── 7. Touch device helpers ───────────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover-lift animations on touch (they fire on tap and feel broken) */
  .card:hover,
  .post-card:hover,
  .related-post-card:hover,
  .btn:hover {
    transform: none !important;
  }
  /* Larger tap targets */
  .nav-links a,
  .footer-links a,
  .toc a,
  .reply a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .footer-social a {
    width: 44px !important;
    height: 44px !important;
  }
  /* Dropdown on mobile nav — open on tap via .active class (JS) not hover */
  .dropdown:hover .dropdown-content {
    display: none;
  }
  .dropdown.active .dropdown-content {
    display: flex !important;
  }
}


/* =========================================================================
   HEADER & FOOTER REDESIGN + ARABIC FONTS + ALL FIXES
   ========================================================================= */

/* ── Cairo font for Arabic text ─────────────────────────────────────────── */
:lang(ar),
[dir="rtl"],
[dir="rtl"] body,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] p,
[dir="rtl"] a,
[dir="rtl"] span,
[dir="rtl"] li,
[dir="rtl"] button,
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select,
[dir="rtl"] label {
  font-family: 'Cairo', 'Outfit', sans-serif;
}

/* Arabic headings centered */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .page-title,
[dir="rtl"] .article-title,
[dir="rtl"] .hero-title,
[dir="rtl"] .section-header h2,
[dir="rtl"] .wiz-step-header h2,
[dir="rtl"] .post-title {
  text-align: center;
}

/* ── HEADER RESET ───────────────────────────────────────────────────────── */
header,
#mn-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-glass);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
#mn-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.mn-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ── Logo ───────────────────────────────────────────────────────────────── */
.mn-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.mn-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}
/* Light/Dark logo swap */
[data-theme="light"] .mn-logo-dark-img  { display: block; }
[data-theme="light"] .mn-logo-light-img { display: none;  }
[data-theme="dark"]  .mn-logo-dark-img  { display: none;  }
[data-theme="dark"]  .mn-logo-light-img { display: block; }
/* Fallback: if only one logo set show it always */
.mn-logo-img:only-child { display: block !important; }

.mn-logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
.mn-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1rem;
}
.mn-nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.mn-nav-link i {
  font-size: 0.85rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}
.mn-nav-link:hover,
.mn-nav-link.active {
  background: rgba(0,153,204,0.08);
  color: var(--accent-primary);
}
.mn-chevron {
  font-size: 0.65rem !important;
  color: var(--text-muted) !important;
  margin-left: 0.1rem;
  transition: transform 0.2s;
}

/* Dropdown */
.mn-dropdown {
  position: relative;
}
.mn-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 210px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 999;
}
.mn-dropdown:hover .mn-dropdown-menu,
.mn-dropdown.active .mn-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mn-dropdown:hover .mn-chevron,
.mn-dropdown.active .mn-chevron {
  transform: rotate(180deg);
}
.mn-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.mn-dropdown-item i {
  width: 16px;
  text-align: center;
  color: var(--accent-primary);
  font-size: 0.8rem;
}
.mn-dropdown-item:hover {
  background: rgba(0,153,204,0.08);
  color: var(--accent-primary);
}

/* ── Header Right Section ────────────────────────────────────────────────── */
.mn-header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

/* Write Article CTA */
.mn-write-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 12px rgba(0,153,204,0.3);
  flex-shrink: 0;
}
.mn-write-btn i {
  font-size: 0.8rem;
}
.mn-write-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,153,204,0.35);
}

/* Icon-only button (notif bell) */
.mn-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: none;
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.mn-icon-btn:hover {
  background: rgba(0,153,204,0.08);
  color: var(--accent-primary);
  border-color: rgba(0,153,204,0.2);
}

/* Notification wrap */
.mn-notif-wrap {
  position: relative;
}

/* ── User Avatar Dropdown ────────────────────────────────────────────────── */
.mn-user-menu {
  position: relative;
}
.mn-user-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 200px;
}
.mn-user-trigger:hover {
  background: rgba(0,153,204,0.06);
  border-color: rgba(0,153,204,0.25);
}
.mn-user-avatar {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  flex-shrink: 0;
}
.mn-user-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* User dropdown panel */
.mn-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.12);
  z-index: 10001;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.mn-user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.mn-user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(0,153,204,0.04);
}
.mn-udrop-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  flex-shrink: 0;
}
.mn-udrop-name {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mn-udrop-email {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mn-udrop-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  margin-top: 0.15rem;
}
.mn-user-dropdown-body {
  padding: 0.5rem;
}
.mn-udrop-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.mn-udrop-item i {
  width: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}
.mn-udrop-item:hover {
  background: rgba(0,153,204,0.08);
  color: var(--accent-primary);
}
.mn-udrop-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 0.35rem 0;
}
.mn-udrop-logout {
  color: #dc2626;
}
.mn-udrop-logout i {
  color: #dc2626;
}
.mn-udrop-logout:hover {
  background: rgba(220,38,38,0.08);
  color: #dc2626;
}

/* Sign-in / Sign-up buttons */
.mn-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.mn-signin-btn i {
  font-size: 0.85rem;
  color: var(--accent-primary);
}
.mn-signin-btn:hover {
  background: rgba(0,153,204,0.06);
  border-color: rgba(0,153,204,0.25);
  color: var(--accent-primary);
}
.mn-signup-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}
.mn-signup-btn i {
  font-size: 0.8rem;
}

/* ── Hamburger / Mobile Toggle ───────────────────────────────────────────── */
.mn-mobile-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.mn-mobile-toggle:hover {
  background: rgba(0,153,204,0.08);
  border-color: rgba(0,153,204,0.25);
}
.mn-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}
.mn-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, width 0.3s;
}
/* Open state */
.mn-mobile-toggle.open .mn-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mn-mobile-toggle.open .mn-hamburger span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.mn-mobile-toggle.open .mn-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay */
.mn-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(3px);
  z-index: 998;
}
.mn-nav-overlay.active { display: block; }

/* ── Mobile Nav Panel ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .mn-mobile-toggle { display: flex; }
  .mn-write-btn-text { display: none; }
  .mn-write-btn { padding: 0.5rem 0.7rem; }
  .mn-user-name { display: none; }
  .mn-user-trigger { padding: 0.3rem; border-radius: 50%; }
  .mn-user-trigger .mn-chevron { display: none; }
  .mn-signin-btn span,
  .mn-signup-btn span { display: none; }
  .mn-signin-btn,
  .mn-signup-btn { padding: 0.5rem 0.7rem; }

  .mn-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--bg-surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: calc(var(--header-height) + 1rem) 1rem 2rem;
    z-index: 999;
    overflow-y: auto;
    transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border-glass);
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
  }
  .mn-nav.open { right: 0; }

  .mn-nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-glass);
    border-radius: 0;
  }
  .mn-nav-link:last-child { border-bottom: none; }

  .mn-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(0,153,204,0.04);
    border-radius: 8px;
    padding: 0.25rem 0 0.25rem 1rem;
    display: none;
  }
  .mn-dropdown.active .mn-dropdown-menu { display: block; }
  .mn-dropdown.active .mn-chevron { transform: rotate(180deg); }
  .mn-dropdown-item {
    padding: 0.6rem 0.75rem;
    border-bottom: none;
  }

  /* Write button in mobile nav */
  .mn-nav::after {
    content: '';
    display: block;
    height: 1rem;
  }
}

@media (max-width: 480px) {
  .mn-header-inner { padding: 0 4%; gap: 0.5rem; }
  .mn-logo-img { height: 30px; }
  .mn-write-btn { display: none; } /* Only in mobile nav */
}

/* ── Mobile Dropdown Overflow Fix (phones ≤ 640px) ──────────────────────── */
/* position:absolute + right:0 overflows the left viewport edge on narrow
   screens. Switch to position:fixed anchored below the header instead.     */
@media (max-width: 640px) {
  .mn-user-dropdown {
    position: fixed !important;
    top: calc(var(--header-height) + 4px) !important;
    right: 0.5rem !important;
    left: auto !important;
    width: min(290px, calc(100vw - 1rem)) !important;
    max-height: calc(100vh - var(--header-height) - 1rem);
    overflow-y: auto;
    overflow-x: hidden;
  }
  .notif-dropdown {
    position: fixed !important;
    top: calc(var(--header-height) + 4px) !important;
    right: 0.5rem !important;
    left: auto !important;
    width: min(340px, calc(100vw - 1rem)) !important;
    max-height: calc(100vh - var(--header-height) - 1rem);
  }
  /* Let text fill the available container width instead of a hardcoded value */
  .mn-udrop-name,
  .mn-udrop-email,
  .mn-udrop-meta {
    max-width: 100% !important;
    min-width: 0;
  }
  /* RTL: open from the left side of the viewport instead */
  [dir="rtl"] .mn-user-dropdown,
  [dir="rtl"] .notif-dropdown {
    right: auto !important;
    left: 0.5rem !important;
  }
}

/* ── Dark mode header ────────────────────────────────────────────────────── */
[data-theme="dark"] #mn-header {
  background: rgba(10, 22, 40, 0.97);
  border-bottom-color: rgba(0,153,204,0.14);
}
[data-theme="dark"] #mn-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-theme="dark"] .mn-nav {
  background: #0A1628;
  border-left-color: rgba(0,153,204,0.14);
}
[data-theme="dark"] .mn-dropdown-menu {
  background: #0F1E38;
  border-color: rgba(0,153,204,0.14);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
[data-theme="dark"] .mn-user-dropdown {
  background: #0F1E38;
  border-color: rgba(0,153,204,0.14);
  box-shadow: 0 16px 50px rgba(0,0,0,0.5);
}
[data-theme="dark"] .mn-user-dropdown-header {
  background: rgba(0,153,204,0.06);
  border-bottom-color: rgba(0,153,204,0.12);
}
[data-theme="dark"] .mn-user-trigger {
  border-color: rgba(0,153,204,0.2);
}
[data-theme="dark"] .mn-mobile-toggle,
[data-theme="dark"] .mn-icon-btn,
[data-theme="dark"] .mn-signin-btn {
  border-color: rgba(0,153,204,0.2);
}

/* ── User trigger + dropdown header: lock to LTR visual order ──────────────
   These UI chrome elements (avatar pill, dropdown header) should always show
   avatar on the LEFT and text on the RIGHT, regardless of page direction.
   Setting direction:ltr directly on the flex containers is the most reliable
   approach — it overrides any inherited dir="rtl" without fighting flex-direction. */
.mn-user-trigger,
.mn-user-dropdown-header {
  direction: ltr !important;
}
/* Ensure the text info block inside the dropdown header aligns from the left */
.mn-user-dropdown-header > div {
  text-align: left;
}
/* Restore correct text flow for the name/meta text spans so Arabic names
   render naturally via the Unicode bidi algorithm */
.mn-udrop-name,
.mn-udrop-meta,
.mn-udrop-email {
  unicode-bidi: plaintext;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER REDESIGN
   ═══════════════════════════════════════════════════════════════════════════ */
.mn-footer {
  position: relative;
  z-index: 10;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
  font-family: var(--font-body);
}

.mn-footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4%;
}

.mn-footer-top {
  padding: 4rem 0 3rem;
}

.mn-footer-top .mn-footer-container {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.6fr;
  gap: 3rem;
  align-items: flex-start;
}

/* Brand column */
.mn-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mn-footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  pointer-events: auto;
}
.mn-footer-logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  display: block;
}
.mn-footer-logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}
.mn-footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 280px;
}
.mn-footer-social {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.mn-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.mn-social-icon:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,153,204,0.3);
}

/* Link columns */
.mn-footer-col {
  display: flex;
  flex-direction: column;
}
.mn-footer-heading {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent-primary);
  display: inline-block;
}
.mn-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.mn-footer-links a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
  padding: 0.35rem 0;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.mn-footer-links a i {
  width: 14px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--accent-primary);
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.mn-footer-links a:hover {
  color: var(--accent-primary);
  gap: 0.8rem;
}
.mn-footer-links a:hover i {
  opacity: 1;
}

/* Newsletter column */
.mn-footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mn-footer-newsletter p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}
.mn-newsletter-input-wrap {
  position: relative;
}
.mn-newsletter-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.mn-newsletter-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.4rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.mn-newsletter-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0,153,204,0.1);
}
.mn-newsletter-input::placeholder { color: var(--text-muted); }
.mn-newsletter-btn {
  width: 100%;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.mn-newsletter-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mn-newsletter-note i {
  font-size: 0.7rem;
  color: var(--accent-primary);
}

/* Footer bottom bar */
.mn-footer-bottom {
  border-top: 1px solid var(--border-glass);
  padding: 1.25rem 0;
  background: var(--bg-dark);
}
.mn-footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.mn-footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.mn-footer-copy strong {
  color: var(--text-main);
}
.mn-footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.mn-footer-bottom-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.2s;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.mn-footer-bottom-links a:hover { color: var(--accent-primary); }
.mn-footer-bottom-links span { color: var(--border-glass); }

/* Theme toggle */
.mn-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: border-color 0.2s, color 0.2s;
  font-family: var(--font-body);
}
.mn-theme-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.mn-theme-toggle-track {
  width: 32px;
  height: 18px;
  background: var(--border-glass);
  border-radius: 99px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.mn-theme-toggle-thumb {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.mn-theme-toggle-thumb i { font-size: 8px; color: #fff; }
[data-theme="dark"] .mn-theme-toggle-thumb { transform: translateX(14px); }

/* Footer responsive */
@media (max-width: 1024px) {
  .mn-footer-top .mn-footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .mn-footer-newsletter {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .mn-footer-top .mn-footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .mn-footer-newsletter { grid-column: auto; }
  .mn-footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  .mn-footer-social { justify-content: center; }
}

/* Dark mode footer */
[data-theme="dark"] .mn-footer {
  background: #0A1628;
  border-top-color: rgba(0,153,204,0.12);
}
[data-theme="dark"] .mn-footer-bottom {
  background: #060E1C;
  border-top-color: rgba(0,153,204,0.1);
}
[data-theme="dark"] .mn-social-icon {
  background: rgba(0,153,204,0.06);
  border-color: rgba(0,153,204,0.14);
  color: #6EA8C8;
}
[data-theme="dark"] .mn-newsletter-input {
  background: #0F1E38;
  border-color: rgba(0,153,204,0.2);
}

/* ── Notranslate: usernames never translated ─────────────────────────────── */
.notranslate,
[translate="no"] {
  font-family: var(--font-heading) !important;
}

/* ── JS-driven user menu / header toggles (new classes) ─────────────────── */
/* Backward compat — keep old mobile-toggle working */
.mobile-toggle { display: none; }


/* =========================================================================
   BUG FIXES — Admin bar, RTL icons, hover overlay, username overflow
   ========================================================================= */

/* ── Bug 2.9: Article heading anchor-icon hover glitch ───────────────────────
 *
 * Symptom: Hovering an h2/h3 in article content causes the heading text to
 *   visually split (e.g. "What" → "W hat"), a small anchor icon appears, and
 *   the line shifts slightly.
 *
 * Root cause: WordPress block editor, Rank Math TOC, or similar tooling injects
 *   a zero-content or icon-only <a href="#id"> as a DIRECT child of the heading.
 *   When that element is display:inline (or inline-block with width) it takes up
 *   inline flow space, shifting the heading text on hover when the icon becomes
 *   visible.
 *
 * Fix:
 *   1. Give article headings position:relative so an absolutely-placed anchor
 *      icon can live to the left of the heading without entering the text flow.
 *   2. Pull icon-only anchor links (<a> that are empty or contain only <i>/<svg>)
 *      out of flow with position:absolute — they never shift the heading text.
 *   3. Show them at reduced opacity on heading:hover via a smooth transition.
 *   4. Full-text-wrapping anchor links (where <a> holds the whole heading text)
 *      are intentionally NOT targeted by these rules.
 */

.article-content h2,
.article-content h3 {
  position: relative;
  /* Guarantee block layout — prevents any external rule from switching the
     heading to inline-flex, which would make text nodes wrap oddly. */
  display: block;
}

/* Target icon-only or empty anchor links that are direct children of headings.
 * :is(:empty, :has(> i, > svg, > span:empty)) matches anchors that carry no
 * readable text of their own, so full-content links are left untouched. */
.article-content h2 > a[href^="#"]:is(:empty, :has(> i, > svg, > span:empty)),
.article-content h3 > a[href^="#"]:is(:empty, :has(> i, > svg, > span:empty)) {
  position: absolute;
  left: -1.6em;       /* floats to the left of the heading, outside text flow */
  top: 0;
  height: 100%;
  width: 1.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78em;
  opacity: 0;
  color: var(--text-muted);
  text-decoration: none !important;
  transition: opacity 0.2s ease;
  pointer-events: none;  /* invisible = non-interactive */
}

.article-content h2:hover > a[href^="#"]:is(:empty, :has(> i, > svg, > span:empty)),
.article-content h3:hover > a[href^="#"]:is(:empty, :has(> i, > svg, > span:empty)) {
  opacity: 0.55;
  pointer-events: auto;
}

[data-theme="dark"] .article-content h2:hover > a[href^="#"]:is(:empty, :has(> i, > svg, > span:empty)),
[data-theme="dark"] .article-content h3:hover > a[href^="#"]:is(:empty, :has(> i, > svg, > span:empty)) {
  opacity: 0.45;
}

/* ── End Bug 2.9 ─────────────────────────────────────────────────────────── */

/* ── 1. Hide WordPress admin bar completely on frontend ──────────────────── */
#wpadminbar {
  display: none !important;
}
html body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ── 2. RTL icon fix — never apply Cairo font to icon elements ───────────── */
/* Font Awesome uses its own font-face; overriding it with Cairo breaks icons */
[dir="rtl"] i,
[dir="rtl"] i::before,
[dir="rtl"] i::after,
[dir="rtl"] .fa,
[dir="rtl"] .fas,
[dir="rtl"] .far,
[dir="rtl"] .fal,
[dir="rtl"] .fad,
[dir="rtl"] .fab,
[dir="rtl"] [class*="fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro" !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 3. Username overflow fix — wider dropdown, proper truncation ─────────── */
/* Desktop only — mobile override is in the @media (max-width: 640px) block   */
@media (min-width: 641px) {
  .mn-user-name {
    max-width: 140px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mn-user-trigger {
    max-width: 240px !important;
    padding: 0.35rem 0.9rem 0.35rem 0.35rem !important;
  }
  .mn-user-dropdown {
    width: 280px !important;
    right: 0 !important;
    left: auto !important;
    z-index: 10001 !important;
  }
  .mn-udrop-name {
    max-width: 180px !important;
    font-size: 0.95rem !important;
  }
  .mn-udrop-email,
  .mn-udrop-meta {
    max-width: 180px !important;
  }
  .mn-user-dropdown-header {
    padding: 1rem 1.1rem 0.9rem !important;
    gap: 0.85rem !important;
  }
}

/* ── 5. Google Translate balloon / tooltip — complete suppression ────────────
 *
 * GT wraps translated text in <font> elements and shows a floating balloon on
 * hover. The article title uses translate="no" / class="notranslate" so GT
 * never wraps it. For every other translated element we kill the balloon via
 * CSS — using both the stable class names AND a wildcard [class*="VIpgJd"]
 * to survive Google's periodic class-name rotations.
 */

/* ── Balloon containers & iframes ──────────────────────────────────────────── */
#goog-gt-tt,
.goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-ftab-float,
.goog-tooltip,
.goog-tooltip-content,
.goog-text-highlight,
.goog-te-tooltip,
.goog-te-tooltip-container,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-OvJMqd,
.VIpgJd-ZVi9od-aZ2wEe-OvJMqd-ti6hGc,
.adp-container,
.goog-te-gadget-icon,
#goog-gt-,
div[id^="goog-gt-"],
iframe.goog-te-menu-frame,
iframe.goog-te-banner-frame {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Nuclear wildcard — catches any GT class-name rotation Google ships */
[class*="VIpgJd-ZVi9od"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Prevent GT from pushing body down or adding top offset */
body.translated-ltr,
body.translated-rtl {
  top: 0 !important;
  margin-top: 0 !important;
}

/* Remove highlight background GT adds to translated text on hover.
 * Also strip pointer-events from GT's <font> wrappers so hovering
 * translated text never triggers the balloon at all. */
.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* GT wraps translated words in <font> tags. Strip pointer-events from ALL
 * <font> elements sitewide — they are deprecated HTML, used exclusively by
 * Google Translate. This prevents the hover balloon from ever firing,
 * regardless of which wrapper classes GT currently uses. */
font {
  pointer-events: none !important;
}

/* Article header area — belt-and-suspenders.
 * The wrapper already carries translate="no" in the HTML, but if an old
 * cached page is served, this CSS layer still blocks any balloon trigger. */
.article-header-wrapper font,
.article-title font {
  pointer-events: none !important;
  display: contents !important; /* flatten GT's <font> wrappers visually */
}

/* ── 6. Language switcher — globe icon already removed in JS ─────────────── */
/* Extra safety: hide any lingering globe icon inside the lang button */
#mn-lang-btn .fa-globe,
.mn-lang-btn .fa-globe {
  display: none !important;
}

/* =========================================================================
   Auth Modal (Sign In / Sign Up) — global overlay (used on every page)
   ========================================================================= */

/* Overlay — HIDDEN by default */
.mn-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
  overflow-y: auto;
}
.mn-auth-overlay.open {
  display: flex;
  opacity: 1;
  animation: mnAuthFade 0.25s ease forwards;
}
@keyframes mnAuthFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Card */
.mn-auth-card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.mn-auth-overlay.open .mn-auth-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Close button */
.mn-auth-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mn-auth-close:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: rotate(90deg);
}

/* Header: logo + tabs */
.mn-auth-header {
  padding: 2rem 2rem 0;
  flex-shrink: 0;
}
.mn-auth-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.mn-auth-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.mn-auth-logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-main);
}

/* Tabs */
.mn-auth-tabs {
  position: relative;
  display: flex;
  background: var(--bg-dark);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.mn-auth-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  background: none;
  border: none;
  padding: 0.7rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: color 0.25s;
}
.mn-auth-tab.active { color: #fff; }
.mn-auth-tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 8px;
  transition: transform 0.3s ease;
  z-index: 0;
  box-shadow: 0 4px 14px rgba(37,99,235,0.25);
}
.mn-auth-tab-indicator.signup {
  transform: translateX(100%);
}

/* Panes — show only the active one */
.mn-auth-panes {
  position: relative;
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
}
.mn-auth-pane {
  display: none;
  width: 100%;
  overflow-y: auto;
  max-height: calc(100vh - 13rem);
  animation: mnAuthPaneIn 0.3s ease;
}
.mn-auth-pane.active {
  display: block;
}
@keyframes mnAuthPaneIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mn-auth-body {
  padding: 1.5rem 2rem 2rem;
}

/* Flash banner */
.mn-auth-flash {
  display: none;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  align-items: center;
  gap: 0.5rem;
}
.mn-auth-flash.visible { display: flex; }
.mn-auth-flash.info    { background: rgba(37,99,235,0.10);  color: #1D4ED8; border: 1px solid rgba(37,99,235,0.25); }
.mn-auth-flash.success { background: rgba(16,185,129,0.10); color: #047857; border: 1px solid rgba(16,185,129,0.25); }
.mn-auth-flash.error   { background: rgba(239,68,68,0.10);  color: #B91C1C; border: 1px solid rgba(239,68,68,0.25); }

/* Fields */
.mn-auth-field { margin-bottom: 1rem; }
.mn-auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}
.mn-auth-input-wrap { position: relative; }
.mn-auth-input-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.88rem;
  pointer-events: none;
}
.mn-auth-input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.8rem 1rem 0.8rem 2.55rem;
  font-size: 0.94rem;
  font-family: var(--font-body);
  color: var(--text-main);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.mn-auth-input::placeholder { color: var(--text-muted); }
.mn-auth-input:focus {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.mn-auth-input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.12);
}
/* When a password toggle sits inside the wrap, leave room on the right */
.mn-auth-input-wrap .mn-pw-toggle ~ .mn-auth-input,
.mn-auth-input-wrap:has(.mn-pw-toggle) .mn-auth-input {
  padding-right: 2.75rem;
}

.mn-auth-field-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #EF4444;
  line-height: 1.4;
}
.mn-auth-field-error.visible { display: block; }

/* Password toggle */
.mn-pw-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.mn-pw-toggle:hover {
  color: var(--accent-primary);
  background: rgba(37,99,235,0.08);
}

/* Password strength meter */
.mn-pw-strength {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.mn-pw-strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--border-glass);
  overflow: hidden;
}
.mn-pw-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.3s, background 0.3s;
}
.mn-pw-strength-fill.weak   { width: 25%;  background: #EF4444; }
.mn-pw-strength-fill.fair   { width: 50%;  background: #F59E0B; }
.mn-pw-strength-fill.good   { width: 75%;  background: #3B82F6; }
.mn-pw-strength-fill.strong { width: 100%; background: #10B981; }
.mn-pw-strength-label {
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
  color: var(--text-muted);
}
.mn-pw-strength-label.weak   { color: #EF4444; }
.mn-pw-strength-label.fair   { color: #F59E0B; }
.mn-pw-strength-label.good   { color: #3B82F6; }
.mn-pw-strength-label.strong { color: #10B981; }

/* Remember row */
.mn-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.mn-auth-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  cursor: pointer;
}
.mn-auth-check-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.mn-auth-forgot {
  font-size: 0.86rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}
.mn-auth-forgot:hover { text-decoration: underline; }

/* Terms label */
.mn-auth-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}
.mn-auth-terms-label input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
}
.mn-auth-terms-label a {
  color: var(--accent-primary);
  text-decoration: none;
}
.mn-auth-terms-label a:hover { text-decoration: underline; }

/* Submit */
.mn-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.mn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37,99,235,0.28);
}
.mn-auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.mn-auth-submit-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

/* Divider */
.mn-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.mn-auth-divider::before,
.mn-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glass);
}

/* Social buttons */
.mn-auth-social {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
.mn-auth-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.mn-auth-social-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-dark);
  transform: translateY(-1px);
}
.mn-auth-social-btn.mn-social-unconfigured { opacity: 0.55; }

/* Switch link */
.mn-auth-switch {
  text-align: center;
  margin: 1.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.mn-auth-switch button {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 0 0.3rem;
  font-size: inherit;
  font-family: inherit;
}
.mn-auth-switch button:hover { text-decoration: underline; }

/* Avatar upload (signup) */
.mn-avatar-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.mn-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px dashed var(--border-glass);
  background: var(--bg-dark);
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s, color 0.2s;
}
.mn-avatar-preview:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.mn-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mn-avatar-upload-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.mn-avatar-upload-hint strong {
  display: inline-block;
  color: var(--accent-primary);
  cursor: pointer;
  font-weight: 600;
}
.mn-avatar-upload-hint strong:hover { text-decoration: underline; }

/* Lock body scroll when modal is open */
body.mn-auth-open { overflow: hidden; }

/* =========================================================================
   Article Quote Interactions — Feature 1.33
   Highlight · Respond · Share · Private Note
   ========================================================================= */

/* ── Highlighted text marks ──────────────────────────────────────────────── */
.mn-hl {
  border-radius: 2px;
  padding: 0 1px;          /* horizontal only — vertical padding inflates inline box height */
  margin: 0;
  line-height: inherit;    /* never override the paragraph's line-height */
  transition: background 0.2s;
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.mn-hl-highlight {
  background: rgba(37, 99, 235, 0.18);
  border-bottom: 2px solid rgba(37, 99, 235, 0.45);
  cursor: default;
}

.mn-hl-respond {
  background: rgba(22, 163, 74, 0.14);
  border-bottom: 2px solid rgba(22, 163, 74, 0.45);
  cursor: pointer;
}

.mn-hl-note {
  background: rgba(234, 179, 8, 0.18);
  border-bottom: 2px solid rgba(234, 179, 8, 0.5);
  cursor: pointer;
}

/* Dark mode variants */
[data-theme="dark"] .mn-hl-highlight { background: rgba(59, 130, 246, 0.25); border-bottom-color: rgba(59, 130, 246, 0.6); }
[data-theme="dark"] .mn-hl-respond   { background: rgba(34, 197, 94, 0.2);  border-bottom-color: rgba(34, 197, 94, 0.55); }
[data-theme="dark"] .mn-hl-note      { background: rgba(234, 179, 8, 0.2);  border-bottom-color: rgba(234, 179, 8, 0.55); }

/* ── Bug 4 fix: article body is the positioning ancestor for absolute indicators ── */
#mn-article-body {
  position: relative;
  width: 100%;       /* match cover image width exactly */
  box-sizing: border-box;
}
/* Indicator dots float in the column gap (negative offset) — no padding needed. */

/* ── Response & note indicators ──────────────────────────────────────────── */
/* Bug 4 fix: position: absolute (relative to #mn-article-body) so indicators
   appear in the right gutter and do NOT interrupt sentence flow. */
.mn-resp-indicator,
.mn-note-indicator {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.18s;
  line-height: 1;
  user-select: none;
  white-space: nowrap;
}

.mn-resp-indicator {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.28);
}
.mn-resp-indicator:hover { background: rgba(22, 163, 74, 0.22); transform: scale(1.05); }

.mn-note-indicator {
  background: rgba(234, 179, 8, 0.12);
  color: #b45309;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.mn-note-indicator:hover { background: rgba(234, 179, 8, 0.22); transform: scale(1.05); }

[data-theme="dark"] .mn-resp-indicator { background: rgba(34,197,94,0.15); color: #4ade80; border-color: rgba(34,197,94,0.3); }
[data-theme="dark"] .mn-note-indicator { background: rgba(234,179,8,0.18); color: #fcd34d; border-color: rgba(234,179,8,0.35); }

/* ── Arabic / RTL highlight rendering ───────────────────────────────────── */
/* Extra horizontal padding prevents adjacent mark edges from visually colliding.
   word-break: keep-all keeps Arabic words whole so glyphs join correctly at
   the mark boundary; it is a no-op for Latin text.
   border-bottom is suppressed — the underline is baked into the gradient below. */
[dir="rtl"] .mn-hl,
:lang(ar) .mn-hl {
  padding: 0 4px;
  word-break: keep-all;
  border-bottom: none !important;
  text-decoration: none !important;
}

/* ── Arabic highlight HEIGHT + underline fix ─────────────────────────────── */
/* Arabic fonts have a much larger em-square than Latin. background-color fills
   the entire em-square; we use a gradient + background-size to cap the band.
   The underline is baked into the gradient as the last 2px of the band, with a
   1px transparent gap before it — placing it at the bottom edge, outside the fill.
   calc(100% - Npx) refers to 100% of the background-size height (1.3em). */
[dir="rtl"] .mn-hl-highlight,
:lang(ar) .mn-hl-highlight {
  background: linear-gradient(
    rgba(37, 99, 235, 0.18)  0,
    rgba(37, 99, 235, 0.18)  calc(100% - 3px),
    transparent              calc(100% - 3px),
    transparent              calc(100% - 2px),
    rgba(37, 99, 235, 0.55)  calc(100% - 2px)
  ) 0 45% / 100% 1.3em no-repeat;
}
[dir="rtl"] .mn-hl-respond,
:lang(ar) .mn-hl-respond {
  background: linear-gradient(
    rgba(22, 163, 74, 0.14)  0,
    rgba(22, 163, 74, 0.14)  calc(100% - 3px),
    transparent              calc(100% - 3px),
    transparent              calc(100% - 2px),
    rgba(22, 163, 74, 0.55)  calc(100% - 2px)
  ) 0 45% / 100% 1.3em no-repeat;
}
[dir="rtl"] .mn-hl-note,
:lang(ar) .mn-hl-note {
  background: linear-gradient(
    rgba(234, 179, 8, 0.18)  0,
    rgba(234, 179, 8, 0.18)  calc(100% - 3px),
    transparent              calc(100% - 3px),
    transparent              calc(100% - 2px),
    rgba(234, 179, 8, 0.7)   calc(100% - 2px)
  ) 0 45% / 100% 1.3em no-repeat;
}
/* Dark mode */
[data-theme="dark"] [dir="rtl"] .mn-hl-highlight,
[data-theme="dark"] :lang(ar) .mn-hl-highlight {
  background: linear-gradient(
    rgba(59, 130, 246, 0.25)  0,
    rgba(59, 130, 246, 0.25)  calc(100% - 3px),
    transparent               calc(100% - 3px),
    transparent               calc(100% - 2px),
    rgba(59, 130, 246, 0.65)  calc(100% - 2px)
  ) 0 45% / 100% 1.3em no-repeat;
}
[data-theme="dark"] [dir="rtl"] .mn-hl-respond,
[data-theme="dark"] :lang(ar) .mn-hl-respond {
  background: linear-gradient(
    rgba(34, 197, 94, 0.2)   0,
    rgba(34, 197, 94, 0.2)   calc(100% - 3px),
    transparent              calc(100% - 3px),
    transparent              calc(100% - 2px),
    rgba(34, 197, 94, 0.65)  calc(100% - 2px)
  ) 0 45% / 100% 1.3em no-repeat;
}
[data-theme="dark"] [dir="rtl"] .mn-hl-note,
[data-theme="dark"] :lang(ar) .mn-hl-note {
  background: linear-gradient(
    rgba(234, 179, 8, 0.2)   0,
    rgba(234, 179, 8, 0.2)   calc(100% - 3px),
    transparent              calc(100% - 3px),
    transparent              calc(100% - 2px),
    rgba(234, 179, 8, 0.75)  calc(100% - 2px)
  ) 0 45% / 100% 1.3em no-repeat;
}

/* ── Note card: multi-note group panel view ──────────────────────────────── */
.mn-note-card {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  background: var(--bg-dark);
}
.mn-note-card:last-child { margin-bottom: 0; }
.mn-note-card-quote {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.55rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--accent-primary);
  line-height: 1.5;
}
[dir="rtl"] .mn-note-card-quote {
  padding-left: 0;
  padding-right: 0.6rem;
  border-left: none;
  border-right: 3px solid var(--accent-primary);
}
.mn-note-card-body {
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.65;
  white-space: pre-wrap;
}
.mn-note-card-date {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.45rem;
}
.mn-note-card-actions {
  margin-top: 0.6rem;
}
[data-theme="dark"] .mn-note-card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); }

/* ── Floating selection menu ──────────────────────────────────────────────── */
.mn-sel-menu {
  position: absolute;
  display: none;
  align-items: center;
  gap: 0;
  background: #1E293B;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.28), 0 1px 4px rgba(0,0,0,0.18);
  z-index: 9100;
  overflow: hidden;
  white-space: nowrap;
  animation: mn-menu-in 0.12s ease-out;
}

@keyframes mn-menu-in {
  from { opacity: 0; transform: translateY(4px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mn-sel-btn {
  background: none;
  border: none;
  color: #E2E8F0;
  font-size: 0.82rem;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}
.mn-sel-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.mn-sel-btn i     { font-size: 0.78rem; }

.mn-sel-sep {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* ── Share popover ───────────────────────────────────────────────────────── */
.mn-share-pop {
  position: absolute;
  display: none;
  flex-direction: column;
  background: #1E293B;
  border-radius: 10px;
  padding: 4px 0;
  box-shadow: 0 6px 28px rgba(0,0,0,0.3);
  z-index: 9100;
  min-width: 190px;
  animation: mn-menu-in 0.12s ease-out;
}

.mn-share-btn {
  background: none;
  border: none;
  color: #E2E8F0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
  width: 100%;
}
.mn-share-btn:hover { background: rgba(255,255,255,0.1); }
.mn-share-btn i     { width: 16px; text-align: center; }

/* ── Side panel ──────────────────────────────────────────────────────────── */
.mn-quote-panel {
  position: fixed;
  inset: 0;
  z-index: 9050;
  pointer-events: none;
}

.mn-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
}

.mn-panel-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-glass);
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.mn-quote-panel.mn-panel-open {
  pointer-events: all;
}
.mn-quote-panel.mn-panel-open .mn-panel-backdrop {
  background: rgba(0,0,0,0.25);
}
.mn-quote-panel.mn-panel-open .mn-panel-inner {
  transform: translateX(0);
}

.mn-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.mn-panel-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.mn-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}
.mn-panel-close:hover { color: var(--text-main); }

.mn-panel-quote {
  margin: 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-secondary);
  background: rgba(79, 70, 229, 0.05);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex-shrink: 0;
  word-break: break-word;
}

.mn-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mn-panel-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-glass);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mn-panel-ta {
  width: 100%;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-main);
  background: var(--bg-dark);
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.mn-panel-ta:focus {
  outline: none;
  border-color: var(--accent-secondary);
}

.mn-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.mn-panel-submit {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.mn-panel-submit:hover     { background: var(--accent-secondary); }
.mn-panel-submit:disabled  { opacity: 0.55; cursor: not-allowed; }

.mn-btn-ghost {
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s;
}
.mn-btn-ghost:hover { background: var(--bg-dark); }

.mn-panel-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 1.2rem;
}

.mn-panel-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
  padding: 1.5rem 0;
}

.mn-login-prompt {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}
.mn-login-prompt a { color: var(--accent-primary); }

/* ── Response items ───────────────────────────────────────────────────────── */
.mn-resp-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--bg-dark);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
}
.mn-resp-item:last-of-type { margin-bottom: 0; }
[data-theme="dark"] .mn-resp-item { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }

/* ── Response group sections ─────────────────────────────────────────────── */
.mn-resp-group-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}
.mn-resp-group-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.mn-resp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-dark);
}

.mn-resp-content {
  flex: 1;
  min-width: 0;
}

.mn-resp-author {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  text-decoration: none;
}
.mn-resp-author:hover { color: var(--accent-primary); }
.mn-resp-avatar-link { display: contents; }

.mn-resp-body {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.55;
  word-break: break-word;
}

.mn-resp-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── Response ⋮ menu (per own response item) ─────────────────────────────── */
.mn-resp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}
/* .mn-resp-menu-wrap removed — dropdown is now portalled to <body> */
.mn-resp-menu-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-main);
  opacity: 0.55;
  cursor: pointer;
  padding: 2px 7px;
  line-height: 1;
  border-radius: 4px;
  transition: opacity 0.15s, background 0.15s;
}
.mn-resp-menu-btn:hover { opacity: 1; background: var(--bg-dark); }
/* Global response action dropdown — lives on <body>, outside any transform context */
#mn-resp-dropdown {
  display: none;
  position: fixed;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  min-width: 145px;
  overflow: hidden;
  z-index: 9999;
}
#mn-resp-dropdown.mn-resp-menu-open { display: block; }
.mn-resp-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 1rem;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.mn-resp-menu-item:hover { background: var(--bg-dark); }
.mn-resp-menu-delete { color: var(--accent-tertiary) !important; }

/* Inline edit textarea for responses */
.mn-resp-edit-ta {
  width: 100%;
  min-height: 60px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  margin-top: 0.3rem;
}
.mn-resp-edit-ta:focus { border-color: var(--accent-primary); }
.mn-resp-edit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.mn-resp-save-btn {
  background: none; border: none; font-size: 0.75rem;
  color: var(--accent-primary); cursor: pointer; padding: 0;
  font-family: var(--font-body); font-weight: 600; transition: opacity 0.2s;
}
.mn-resp-save-btn:hover { opacity: 0.7; }
.mn-resp-cancel-btn {
  background: none; border: none; font-size: 0.75rem;
  color: var(--text-muted); cursor: pointer; padding: 0;
  font-family: var(--font-body); font-weight: 500; transition: opacity 0.2s;
}
.mn-resp-cancel-btn:hover { opacity: 0.7; }

[data-theme="dark"] .mn-resp-menu { background: #0F1E38; border-color: rgba(0,153,204,0.2); }
[data-theme="dark"] .mn-resp-menu-item { color: #E2EAF5; }
[data-theme="dark"] .mn-resp-menu-item:hover { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .mn-resp-edit-ta { background: rgba(255,255,255,0.05); color: #E2EAF5; }

/* ── Private note frame in view mode ─────────────────────────────────────── */
.mn-note-frame {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
}
[data-theme="dark"] .mn-note-frame { border-color: rgba(255,255,255,0.1); }
.mn-note-frame-sep {
  height: 1px;
  background: rgba(0,0,0,0.08);
}
[data-theme="dark"] .mn-note-frame-sep { background: rgba(255,255,255,0.08); }
.mn-note-frame-body {
  padding: 0.9rem 1rem 0.7rem;
}
/* Direct Edit + Delete buttons for note view */
.mn-note-view-actions {
  gap: 0.75rem;
}
.mn-note-direct-del {
  color: var(--accent-tertiary) !important;
}

/* ── Bug 5 fix: note panel view mode ─────────────────────────────────────── */
.mn-note-view {
  padding: 0.25rem 0;
}

.mn-note-body-text {
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
  margin: 0 0 0.75rem;
}

.mn-note-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.mn-note-view-actions {
  justify-content: space-between;
  align-items: center;
}

.mn-note-more-wrap {
  position: relative;
}

.mn-note-more-btn {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  line-height: 1;
}

.mn-note-more-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 155px;
  overflow: hidden;
  z-index: 100;
}

.mn-note-more-menu.mn-note-more-open {
  display: block;
}

.mn-note-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.mn-note-menu-item:hover { background: var(--bg-dark); }
.mn-note-menu-delete { color: var(--accent-tertiary) !important; }

/* Note textarea full-height in panel body */
.mn-panel-body .mn-panel-ta {
  width: 100%;
  height: 100%;
  min-height: 160px;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg-dark);
  color: var(--text-main);
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}
.mn-panel-body .mn-panel-ta:focus { border-color: var(--accent-secondary); }

[data-theme="dark"] .mn-note-body-text { color: #E2EAF5; }
[data-theme="dark"] .mn-note-more-menu {
  background: #0F1E38;
  border-color: rgba(0,153,204,0.2);
}
[data-theme="dark"] .mn-note-menu-item { color: #E2EAF5; }
[data-theme="dark"] .mn-note-menu-item:hover { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .mn-panel-body .mn-panel-ta {
  background: rgba(255,255,255,0.04);
  border-color: rgba(0,153,204,0.2);
  color: #E2EAF5;
}

/* ── Toast notification ──────────────────────────────────────────────────── */
.mn-quote-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.6rem 1.25rem;
  border-radius: 24px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9200;
  white-space: nowrap;
}
.mn-quote-toast.mn-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.mn-toast-ok       { background: #1E293B; color: #E2E8F0; }
.mn-toast-err      { background: #DC2626; color: #fff; }
.mn-toast-follow   { background: #059669; color: #fff; }
.mn-toast-unfollow { background: #1E293B; color: #E2E8F0; }

/* ── Prevent body scroll when panel open ─────────────────────────────────── */
body.mn-panel-body-lock { overflow: hidden; }

/* ── Mobile / tablet adjustments ────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Panel becomes bottom sheet */
  .mn-panel-inner {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    border-left: none;
    border-top: 1px solid var(--border-glass);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -6px 40px rgba(0,0,0,0.18);
    transform: translateY(100%);
  }
  .mn-quote-panel.mn-panel-open .mn-panel-inner {
    transform: translateY(0);
  }

  /* Selection menu: wrap on very small screens */
  .mn-sel-menu {
    flex-wrap: wrap;
    max-width: calc(100vw - 16px);
  }

  /* Indicators: on mobile, JS sets left position just past the mark end.
     Ensure they don't overflow the viewport edge. */
  .mn-resp-indicator,
  .mn-note-indicator {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 400px) {
  .mn-sel-btn { padding: 9px 10px; font-size: 0.78rem; }
}

/* ── Dark mode panel ─────────────────────────────────────────────────────── */
[data-theme="dark"] .mn-panel-inner {
  background: #0F1E38;
  border-color: rgba(0,153,204,0.18);
}
[data-theme="dark"] .mn-panel-quote {
  background: rgba(99,102,241,0.08);
  border-left-color: var(--accent-secondary);
}
[data-theme="dark"] .mn-panel-ta {
  background: rgba(255,255,255,0.04);
  border-color: rgba(0,153,204,0.2);
  color: #E2EAF5;
}
[data-theme="dark"] .mn-panel-ta:focus { border-color: var(--accent-secondary); }
[data-theme="dark"] .mn-panel-title    { color: #F1F5F9; }
[data-theme="dark"] .mn-resp-body,
[data-theme="dark"] .mn-resp-author    { color: #E2EAF5; }
[data-theme="dark"] .mn-btn-ghost {
  border-color: rgba(255,255,255,0.12);
  color: #94A3B8;
}
[data-theme="dark"] .mn-btn-ghost:hover { background: rgba(255,255,255,0.06); }

/* Responsive */
@media (max-width: 560px) {
  .mn-auth-overlay { padding: 0; align-items: flex-end; }
  .mn-auth-card {
    max-width: 100%;
    max-height: 96vh;
    border-radius: 20px 20px 0 0;
  }
  .mn-auth-header { padding: 1.5rem 1.25rem 0; }
  .mn-auth-body   { padding: 1.25rem 1.25rem 1.5rem; }
  .mn-auth-pane   { max-height: calc(96vh - 11rem); }
  .mn-auth-close  { top: 0.65rem; right: 0.65rem; }
  .mn-auth-logo-text { font-size: 1.1rem; }
  .mn-auth-tab { padding: 0.6rem 0.5rem; font-size: 0.85rem; }
}

/* Dark mode */
[data-theme="dark"] .mn-auth-card {
  background: #0F1E38;
  border-color: rgba(0,153,204,0.22);
}
[data-theme="dark"] .mn-auth-close {
  background: #0F1E38;
  border-color: rgba(0,153,204,0.22);
  color: #94A3B8;
}
[data-theme="dark"] .mn-auth-logo-text,
[data-theme="dark"] .mn-auth-field label,
[data-theme="dark"] .mn-auth-tab.active { color: #F1F5F9; }
[data-theme="dark"] .mn-auth-tabs { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .mn-auth-input {
  background: rgba(255,255,255,0.04);
  border-color: rgba(0,153,204,0.25);
  color: #E2EAF5;
}
[data-theme="dark"] .mn-auth-social-btn {
  background: rgba(255,255,255,0.04);
  border-color: rgba(0,153,204,0.25);
  color: #E2EAF5;
}

/* =====================================================================
   ARTICLE LAYOUT — single.php
   All frames (topbar, cover image, content, author box, engagement,
   reactions, comments) use the FULL article column width so everything
   lines up perfectly edge-to-edge.
   PDF viewer and video embeds are also full column-width.
   The topbar spans BOTH grid columns (article + sidebar) so the
   sidebar "Rate / TOC / Share / Report" block starts level with the
   cover image, not pushed down by the topbar.
   ===================================================================== */

/* ── Topbar: spans both grid columns, semi-transparent glass frame ── */
/* Explicit grid rows: row1=topbar, row2=engagement, row3=article+sidebar */
.mn-article-topbar  { grid-column: 1 / -1; grid-row: 1; }
.mn-engagement-row  { grid-column: 1;      grid-row: 2; margin: 0 0 1rem; }
.article-content    { grid-column: 1;      grid-row: 3; }
.toc                { grid-column: 2;      grid-row: 3; }

.mn-article-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  flex-wrap: wrap;
}
.mn-atb-author {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.mn-atb-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-block;
}
.mn-atb-name {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mn-atb-author-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  overflow: hidden;
}
.mn-atb-name-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.mn-atb-followers {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1.2;
}
.mn-atb-author-link:hover .mn-atb-name { color: var(--accent-primary); }
.mn-atb-sep {
  opacity: 0.3;
  flex-shrink: 0;
}
.mn-atb-date {
  white-space: nowrap;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.mn-atb-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 1.1rem;
  background: var(--accent-primary);
  color: #fff;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(37,99,235,0.25);
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
}
.mn-atb-edit-btn:hover {
  background: var(--accent-secondary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,70,229,0.30);
}
.mn-atb-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 1.1rem;
  background: transparent;
  color: #dc2626;
  border: 1.5px solid #dc2626;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.15s, box-shadow 0.18s;
}
.mn-atb-delete-btn:hover {
  background: #dc2626;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(220,38,38,0.30);
}

/* ── Topbar Follow Button ── */
.mn-atb-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 1.1rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-heading);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: 1.5px solid var(--accent-primary);
  background: transparent;
  color: var(--accent-primary);
  text-decoration: none;
  transition: background 0.18s, color 0.18s, transform 0.15s, box-shadow 0.18s;
}
.mn-atb-follow-btn:hover {
  background: var(--accent-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,0.28);
}
/* Followed state — green/teal check */
.mn-atb-follow-btn.is-following {
  border-color: #059669;
  color: #059669;
  background: rgba(5,150,105,0.07);
}
.mn-atb-follow-btn.is-following:hover {
  background: #059669;
  color: #fff;
  box-shadow: 0 4px 14px rgba(5,150,105,0.30);
}
/* Follow Back state — indigo accent */
.mn-atb-follow-btn.follow-back {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  background: rgba(79,70,229,0.06);
}
.mn-atb-follow-btn.follow-back:hover {
  background: var(--accent-secondary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,70,229,0.30);
}
.mn-atb-follow-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Delete confirmation modal ── */
.mn-delete-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.mn-delete-overlay[aria-hidden="true"] { display: none; }
.mn-delete-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  padding: 2.5rem 2rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.mn-delete-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(220,38,38,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.4rem;
  color: #dc2626;
}
.mn-delete-box h3 {
  font-size: 1.2rem;
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 0.6rem;
}
.mn-delete-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}
.mn-delete-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.mn-delete-cancel-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1.5px solid var(--border-glass);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.mn-delete-cancel-btn:hover { border-color: var(--text-muted); color: var(--text-main); }
.mn-delete-confirm-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: none;
  background: #dc2626;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.mn-delete-confirm-btn:hover:not(:disabled) { background: #b91c1c; transform: translateY(-1px); }
.mn-delete-confirm-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── PDF viewer & video: centered by default, alignable ──────────────────
   Default (no data-align / data-align="center"):
     85% of column width, centred — visible equal space on both sides.
   data-align="left":   65% width, left edge.
   data-align="right":  65% width, right edge.
   data-align="full":   100% width (explicit override).
   Left/right are visually absolute — same meaning for LTR (EN) and RTL (AR).
   ─────────────────────────────────────────────────────────────────────────── */
/* Shared: auto-centering for both PDF and video */
#mn-article-body .mn-pdf-viewer,
#mn-article-body .mn-video-embed {
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
/* PDF viewer: fixed compact width — mirrors LinkedIn's ~470px viewer.
   On screens narrower than 520px the 85% fallback keeps it responsive. */
#mn-article-body .mn-pdf-viewer {
  width: 85%;
  max-width: 520px;
}
/* Video: wider for a cinematic feel */
#mn-article-body .mn-video-embed {
  width: 85%;
  max-width: 85%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
}
#mn-article-body .mn-video-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}
/* Alignment overrides — PDF */
#mn-article-body .mn-pdf-viewer[data-align="center"] {
  max-width: 520px;
  width: 85%;
  margin-left: auto;
  margin-right: auto;
}
#mn-article-body .mn-pdf-viewer[data-align="left"] {
  max-width: 520px;
  width: 65%;
  margin-left: 0;
  margin-right: auto;
}
#mn-article-body .mn-pdf-viewer[data-align="right"] {
  max-width: 520px;
  width: 65%;
  margin-left: auto;
  margin-right: 0;
}
#mn-article-body .mn-pdf-viewer[data-align="full"] {
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
/* Alignment overrides — Video */
#mn-article-body .mn-video-embed[data-align="center"] {
  max-width: 85%;
  width: 85%;
  margin-left: auto;
  margin-right: auto;
}
#mn-article-body .mn-video-embed[data-align="left"] {
  max-width: 65%;
  width: 65%;
  margin-left: 0;
  margin-right: auto;
}
#mn-article-body .mn-video-embed[data-align="right"] {
  max-width: 65%;
  width: 65%;
  margin-left: auto;
  margin-right: 0;
}
#mn-article-body .mn-video-embed[data-align="full"] {
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* ── Responsive ── */

/* Mobile: tighter article header, prevent overflow */
@media (max-width: 768px) {
  .article-header-wrapper {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  .mn-atb-edit-btn span { font-size: 0.78rem; }
  #mn-article-body pre,
  #mn-article-body .table { overflow-x: auto; }
}

/* Small mobile: compact topbar */
@media (max-width: 480px) {
  .mn-article-topbar {
    gap: 0.6rem;
    padding: 0.65rem 1rem;
  }
  .mn-atb-date { display: none; }
  .mn-atb-sep  { display: none; }
}

/* =========================================================================
   Reviews — Modal + Author Profile Tab
   ========================================================================= */

/* ── Review Modal ── */
#mn-review-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  z-index: 9990;
  display: none;
}
#mn-review-overlay.open { display: block; }

#mn-review-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(520px, 94vw);
  background: var(--bg-surface);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
  padding: 2rem 2rem 1.5rem;
  z-index: 9991;
  display: none;
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
#mn-review-modal.open {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
#mn-review-close {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
}
#mn-review-close:hover { color: var(--text-main); }

.mn-review-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.3rem;
  font-family: var(--font-heading);
}
.mn-review-modal-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}
.mn-review-modal-stars {
  display: flex;
  gap: 0.4rem;
  font-size: 1.7rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
  color: var(--accent-primary);
}
.mn-review-modal-stars i { transition: transform 0.1s; }
.mn-review-modal-stars i:hover { transform: scale(1.15); }

#mn-review-text {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-main);
  background: var(--bg-dark);
  resize: vertical;
  margin-bottom: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#mn-review-text:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.09);
}
.mn-review-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}
#mn-review-feedback {
  font-size: 0.84rem;
  margin-top: 0.75rem;
  display: none;
  text-align: center;
}

/* ── Reviews Tab — Header Summary ── */
.reviews-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
}
.reviews-avg-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
  font-family: var(--font-heading);
}
.reviews-avg-stars {
  font-size: 1.1rem;
  color: var(--accent-primary);
  margin: 0.3rem 0 0.2rem;
}
.reviews-avg-count {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Review Cards ── */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.review-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.review-card:hover {
  border-color: rgba(37,99,235,0.3);
  box-shadow: 0 4px 20px rgba(37,99,235,0.06);
}
.review-card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.review-card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-glass);
  flex-shrink: 0;
}
.review-card-meta {
  flex: 1;
  min-width: 0;
}
.review-card-name {
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.92rem;
  display: block;
}
.review-card-name:hover { color: var(--accent-primary); }
.review-card-article {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-card-article a { color: var(--text-muted); text-decoration: none; }
.review-card-article a:hover { color: var(--accent-primary); }
.review-card-stars {
  display: flex;
  gap: 2px;
  font-size: 0.85rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}
.review-card-date {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.review-card-text {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-glass);
}
.review-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.review-empty-state i {
  font-size: 2.4rem;
  margin-bottom: 0.9rem;
  display: block;
  opacity: 0.5;
}

/* ── Dark mode ── */
[data-theme="dark"] #mn-review-modal { background: var(--bg-surface); }
[data-theme="dark"] #mn-review-text  { background: var(--bg-dark); color: var(--text-main); }
[data-theme="dark"] .review-card     { background: var(--bg-surface); }

/* ═══════════════════════════════════════════════════════════════════════════
   Review Card — Actions Row
   ═══════════════════════════════════════════════════════════════════════════ */
.review-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-glass);
}
.review-action-spacer { flex: 1; }
.review-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s, color 0.16s;
  line-height: 1;
}
.review-action-btn:hover {
  background: var(--bg-dark);
  color: var(--text-main);
}
.review-action-btn.report-btn:hover { color: var(--accent-tertiary); }
.review-action-btn i { font-size: 0.78rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   Review — Nested Author Reply Block
   ═══════════════════════════════════════════════════════════════════════════ */
.review-reply-block {
  margin-top: 0.9rem;
  margin-left: 1rem;
  padding: 0.8rem 1rem;
  background: rgba(37, 99, 235, 0.03);
  border-left: 3px solid rgba(37, 99, 235, 0.2);
  border-radius: 0 10px 10px 0;
}
.review-reply-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.review-reply-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.review-reply-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}
.review-reply-name {
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--text-main);
}
.review-reply-label {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(37, 99, 235, 0.09);
  padding: 0.13rem 0.48rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.review-reply-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}
.review-reply-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.58;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Review — Inline Reply Form
   ═══════════════════════════════════════════════════════════════════════════ */
.review-reply-form {
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
}
.review-reply-form textarea {
  width: 100%;
  min-height: 78px;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-main);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.5;
}
.review-reply-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.review-reply-form-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.6rem;
}
.review-reply-feedback {
  font-size: 0.81rem;
  margin-top: 0.45rem;
  display: none;
}

/* ── Dark mode overrides ── */
[data-theme="dark"] .review-reply-block    { background: rgba(37,99,235,0.07); }
[data-theme="dark"] .review-reply-form     { background: rgba(0,0,0,0.18); }
[data-theme="dark"] .review-reply-form textarea { background: var(--bg-dark); }

/* ═══════════════════════════════════════════════════════════════════════════
   Report — Reported State (button after successful report)
   ═══════════════════════════════════════════════════════════════════════════ */
.mn-report-btn.reported {
  color: #d97706;
  background: rgba(217, 119, 6, 0.08);
  border-radius: 6px;
  cursor: default;
  pointer-events: auto; /* allow click → already-reported modal */
}
.mn-report-btn.reported:hover {
  background: rgba(217, 119, 6, 0.13);
  color: #b45309;
}
.mn-report-btn.reported i { color: inherit; }

/* ═══════════════════════════════════════════════════════════════════════════
   Report Modal — "Other" Textarea
   ═══════════════════════════════════════════════════════════════════════════ */
#mn-report-other-text {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-main);
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#mn-report-other-text:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Report Modal — Already-Reported Panel
   ═══════════════════════════════════════════════════════════════════════════ */
#mn-report-already-msg {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}
.mn-report-already-icon {
  font-size: 2.2rem;
  color: #d97706;
  margin-bottom: 0.75rem;
}
.mn-report-already-title {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-main);
  margin: 0 0 0.5rem;
}
.mn-report-already-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Dark mode */
[data-theme="dark"] #mn-report-other-text { background: var(--bg-surface); }

/* =============================================================================
   Composer Widget — inline comment composer between title and comment list
   ============================================================================= */
.mn-composer {
  margin-bottom: 1.5rem;
}

/* ── User row (always visible) ── */
.mn-composer-user-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.mn-composer-username-inline {
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-heading);
  color: var(--text-main);
}

/* ── Avatar ── */
.mn-composer-avatar-wrap {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-dark);
  border: 2px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mn-composer-avatar-img {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: none;
}
.mn-composer-avatar-guest {
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ── Toolbar — hidden by default, slides in below editor ── */
.mn-composer-toolbar {
  display: none;
  overflow: visible;
}

/* ── Content-editable editor area ── */
.mn-composer-editor {
  width: 100%;
  min-height: 82px;
  max-height: 280px;
  overflow-y: auto;
  border: 1.5px solid var(--border-glass);
  border-radius: 9px;
  padding: 0.7rem 0.9rem;
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.68;
  outline: none;
  background: var(--bg-dark);
  transition: border-color 0.18s, box-shadow 0.18s;
  box-sizing: border-box;
  word-break: break-word;
}
.mn-composer-editor:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}
.mn-composer-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  opacity: 0.5;
  pointer-events: none;
}

/* ── Toolbar row (inner layout) ── */
.mn-composer-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.mn-composer-fmt-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

/* Format buttons (B, I) */
.mn-composer-fmt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  padding: 0;
  line-height: 1;
}
.mn-composer-fmt-btn:hover,
.mn-composer-fmt-btn.active {
  background: var(--bg-dark);
  border-color: var(--border-glass);
  color: var(--text-main);
}
.mn-composer-fmt-btn b  { font-weight: 800; font-size: 0.88rem; }
.mn-composer-fmt-btn em { font-style: italic; font-size: 0.88rem; }

/* ── Emoji toggle + picker ── */
.mn-composer-emoji-wrap {
  position: relative;
}
.mn-composer-emoji-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  padding: 0;
}
.mn-composer-emoji-toggle:hover,
.mn-composer-emoji-toggle.active {
  background: var(--bg-dark);
  border-color: var(--border-glass);
  color: var(--text-main);
}
.mn-composer-emoji-picker {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
  padding: 0.55rem;
  z-index: 400;
  width: 264px;
}
.mn-composer-emoji-picker.open { display: block; }
.mn-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
}
.mn-emoji-btn {
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.28rem 0.18rem;
  cursor: pointer;
  transition: background 0.1s, transform 0.12s;
  text-align: center;
}
.mn-emoji-btn:hover {
  background: var(--bg-dark);
  transform: scale(1.22);
}

/* ── Action buttons ── */
.mn-composer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mn-composer-cancel {
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  font-family: var(--font-body);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.mn-composer-cancel:hover {
  background: var(--bg-dark);
  color: var(--text-main);
  border-color: rgba(0,0,0,0.12);
}
.mn-composer-submit { padding: 0.35rem 1.1rem; font-size: 0.82rem; }
.mn-composer-submit:disabled { opacity: 0.38; cursor: not-allowed; }

/* ── Feedback line ── */
.mn-composer-feedback {
  font-size: 0.82rem;
  margin-top: 0.5rem;
  min-height: 0;
  display: none;
}
.mn-composer-feedback.success { color: var(--accent-primary); display: block; }
.mn-composer-feedback.error   { color: var(--accent-tertiary); display: block; }
