/* ---------- BASE STYLES & GLOBAL RESET ---------- */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    body {
      background-color: #f8fafc;
      color: #0f172a;
      font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
      line-height: 1.5;
    }

    /* ---------- DARK MODE GLOBAL OVERRIDES ---------- */
    body.dark {
      background-color: #0f172a;
      color: #e2e8f0;
    }
    body.dark .navbar-full {
      background: #0a0f1f;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
    body.dark .logo {
      color: #f1f5f9;
    }
    body.dark .nav-links a {
      color: #cbd5e1;
    }
    body.dark .nav-links a:hover,
    body.dark .nav-links a.active {
      color: #60a5fa;
      background: rgba(96, 165, 250, 0.1);
    }
    body.dark .hamburger {
      color: #e2e8f0;
    }
    body.dark .search-wrapper input {
      background: #1e293b;
      border-color: #334155;
      color: #f1f5f9;
    }
    body.dark .search-wrapper input::placeholder {
      color: #94a3b8;
    }
    body.dark .clear-search {
      color: #94a3b8;
    }
    body.dark .filter-bar .filter-btn {
      background: #1e293b;
      border-color: #334155;
      color: #cbd5e1;
    }
    body.dark .filter-bar .filter-btn.active,
    body.dark .filter-bar .filter-btn:hover {
      background: #2563eb;
      color: white;
    }
    body.dark .calculators-grid .calculator-card {
      background: #1e293b;
      border-color: #334155;
      box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    }
    body.dark .calculators-grid .calculator-card h3 {
      color: #facc15;
    }
    body.dark .calculators-grid .calculator-card p {
      color: #cbd5e1;
    }
    body.dark .article {
      background: #111827;
      color: #e2e8f0;
    }
    body.dark .article h1, 
    body.dark .article h2, 
    body.dark .article h3 {
      color: #facc15;
    }
    body.dark .faq-item {
      background: #1e293b;
      border-left-color: #3b82f6;
    }
    body.dark .faq-question {
      color: #facc15;
    }
    body.dark footer.footer {
      background: #0a0f1f;
      border-top-color: #1e2a3a;
    }
    body.dark .footer-links a {
      color: #cbd5e1;
    }
    body.dark .social-icons a {
      background: #1e293b;
      color: #cbd5e1;
    }
    body.dark .backToTopBtn {
      background: #2d3a5e;
      color: white;
    }

    /* ---------- NAVBAR ---------- */
    .navbar-full {
      background: white;
      border-bottom: 1px solid #e2e8f0;
      position: sticky;
      top: 0;
      z-index: 100;
    }
    .navbar-container {
      max-width: 100%;
      margin: 0 auto;
      padding: 0.3rem 2rem;
      display: flex;
      align-items: center;
      gap: 2rem;
      flex-wrap: wrap;
    }
    .logo {
      font-size: 1.4rem;
      font-weight: 800;
      background: linear-gradient(135deg, #1e293b, #2563eb);
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
    }
    body.dark .logo {
      background: linear-gradient(135deg, #e2e8f0, #60a5fa);
      background-clip: text;
      -webkit-background-clip: text;
    }
    .nav-links {
      display: flex;
      gap: 1.5rem;
      align-items: center;
    }
    .nav-links a {
      text-decoration: none;
      font-weight: 500;
      font-size: 0.85rem;

      color: #334155;
      transition: 0.2s;
      cursor: pointer;
      padding: 0.4rem 0;
      border-bottom: 2px solid transparent;
    }
    .nav-links a.active, .nav-links a:hover {
      color: #2563eb;
      border-bottom-color: #2563eb;
    }
    .domain a {text-decoration:none;}
    .search-wrapper {
      position: relative;
      flex: 1;
      max-width: 320px;
      margin-left: auto;
    }
    .search-wrapper i {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: #94a3b8;
      font-size: 0.9rem;
    }
    .search-wrapper input {
      width: 100%;
      padding: 0.65rem 2rem 0.65rem 2.4rem;
      border-radius: 60px;
      border: 1px solid #e2e8f0;
      background: #f8fafc;
      font-size: 0.9rem;
      outline: none;
    }
    .search-wrapper input:focus {
      border-color: #2563eb;
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    }
    .clear-search {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      color: #94a3b8;
      font-size: 1rem;
      display: none;
    }
    .search-wrapper input:not(:placeholder-shown) ~ .clear-search {
      display: block;
    }
    .hamburger {
      display: none;
      font-size: 1.8rem;
      background: none;
      border: none;
      cursor: pointer;
    }
    /* Dark mode toggle (blue knob) */
    .dark-mode-toggle {
      background: #e2e8f0;
      border: none;
      border-radius: 40px;
      width: 58px;
      height: 26px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 6px;
      cursor: pointer;
      position: relative;
      margin-left: 12px;
      flex-shrink: 0;
    }
    .dark-mode-toggle i {
      font-size: 0.9rem;
      z-index: 1;
    }
    .dark-mode-toggle .fa-sun { color: #f59e0b; }
    .dark-mode-toggle .fa-moon { color: #4b5563; }
    .toggle-knob {
      position: absolute;
      width: 24px;
      height: 24px;
      background: #007bff;
      border-radius: 50%;
      left: 3px;
      top: 50%;
      transform: translateY(-50%);
      transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
    .dark-mode-toggle.active .toggle-knob {
      transform: translateX(28px) translateY(-50%);
    }
    .dark-mode-toggle.active {
      background: #334155;
    }
    .dark-mode-toggle.active .fa-moon { color: #facc15; }

    /* Main container */
    .wrap {
      max-width: 1400px;
      margin: 0 auto;
      padding: 2rem 2rem 1rem;
    }
    .header h1 {
      font-size: 2.2rem;
      font-weight: 700;
      text-align: center;
      background: linear-gradient(135deg, #1e293b, #2563eb);
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
    }
    body.dark .header h1 {
      background: linear-gradient(135deg, #e2e8f0, #60a5fa);
      background-clip: text;
    }
    .filter-bar {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.7rem;
      margin: 1.5rem 0 1.8rem;
    }
    .filter-btn {
      background: white;
      border: 1px solid #e2e8f0;
      padding: 0.5rem 1.4rem;
      border-radius: 40px;
      font-weight: 600;
      cursor: pointer;
      font-size: 0.9rem;
      color: #334155;
      transition: all 0.2s;
    }
    .filter-btn.active, .filter-btn:hover {
      background: #2563eb;
      color: white;
      border-color: #2563eb;
    }
    .stats-badge {
      display: inline-block;
      background: #eef2ff;
      padding: 0.3rem 1.2rem;
      border-radius: 40px;
      font-size: 0.9rem;
      margin-top: 0.5rem;
      font-weight: 500;
      text-align: center;
    }
    body.dark .stats-badge {
      background: #334155;
      color: #e2e8f0;
    }
    .calculators-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 1.8rem;
      margin: 1.5rem 0 2rem;
    }
    .calculator-card {
      background: white;
      border-radius: 1.5rem;
      padding: 1.5rem;
      border: 1px solid #eef2ff;
      box-shadow: 0 8px 20px rgba(0,0,0,0.02);
      transition: all 0.25s ease;
      text-decoration: none;
      display: flex;
      flex-direction: column;
    }
    .calculator-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 20px 30px rgba(0,0,0,0.08);
      border-color: #cbd5e1;
    }
    .card-icon {
      width: 54px;
      height: 54px;
      background: #eff6ff;
      border-radius: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      color: #2563eb;
      margin-bottom: 1.2rem;
    }
    .calculator-card h3 {
      font-size: 1.3rem;
      font-weight: 700;
      margin-bottom: 0.6rem;
      color: #0f172a;
    }
    .calculator-card p {
      color: #475569;
      font-size: 0.9rem;
      line-height: 1.45;
      margin-bottom: 1.2rem;
      flex: 1;
    }
    .card-link {
      margin-top: auto;
      font-weight: 600;
      color: #2563eb;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
    }
    .no-results {
      text-align: center;
      padding: 3rem;
      grid-column: 1 / -1;
      background: white;
      border-radius: 1.5rem;
    }
    /* Article & FAQ */
    .article {
   max-width: 1200px;
   margin: 2rem auto;
   padding: 0 1.5rem;
 }

 .article h1,
 .article h2,
 .article h3 {
   margin-top: 1.8rem;
   margin-bottom: 1rem;
 }

 .article h1 {
   font-size: 1.9rem;
   border-left: 5px solid #007bff;
   padding-left: 1rem;
 }

 .article h2 {
   font-size: 1.6rem;
   border-bottom: 2px solid #e9ecef;
   padding-bottom: 0.5rem;
 }

 .article p {
   line-height: 1.6;
   margin-bottom: 1rem;
 }

 .article ul,
 .article ol {
   margin: 1rem 0 1rem 1.8rem;
 }

 .article li {
   margin: 0.5rem 0;
 }

 .article table {
   width: 100%;
   border-collapse: collapse;
   margin: 1.5rem 0;
   background: white;
   border-radius: 12px;
   overflow: hidden;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
 }

 .article th,
 .article td {
   border: 1px solid #dee2e6;
   padding: 10px 12px;
   text-align: left;
 }

 .article th {
   background: #f8f9fa;
   font-weight: 600;
 }

 .pro-tip-box,
 .mistake-box {
   background: #fef9e6;
   border-left: 5px solid #ffc107;
   padding: 1rem 1.5rem;
   margin: 1.5rem 0;
   border-radius: 12px;
 }

 .benefits-grid {
   display: flex;
   flex-wrap: wrap;
   gap: 1rem;
   margin: 1.5rem 0;
 }

 .benefit-card {
   background: #f1f9ff;
   border-radius: 16px;
   padding: 1rem 1.2rem;
   flex: 1 1 200px;
   text-align: center;
 }

 .benefit-card i {
   font-size: 1.8rem;
   color: #007bff;
   margin-bottom: 0.5rem;
   display: block;
 }

 .faq-item {
   margin-bottom: 1.5rem;
   border-bottom: 1px solid #e9ecef;
   padding-bottom: 1rem;
 }

 .faq-question {
   font-weight: 700;
   font-size: 1.1rem;
   color: #0a2540;
   margin-bottom: 0.5rem;
   display: flex;
   align-items: center;
   gap: 8px;
 }

 .faq-question i {
   color: #007bff;
 }

 .cta-button {
   background: #007bff;
   color: white;
   border: none;
   padding: 12px 28px;
   font-size: 1.1rem;
   border-radius: 40px;
   cursor: pointer;
   display: inline-flex;
   align-items: center;
   gap: 10px;
   margin: 1rem 0;
   transition: 0.2s;
 }

 .cta-button:hover {
   background: #0056b3;
   transform: scale(1.02);
 }



 ul, ol {
      margin: 0.8rem 0 1rem 1.6rem;
    }
    li {
      margin: 0.4rem 0;
    }
    table {
      width: 100%;
      border-collapse: collapse;
      margin: 1.5rem 0;
      background: white;
      border-radius: 20px;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    th, td {
      border: 1px solid #dee2e6;
      padding: 10px 12px;
      text-align: left;
    }
    th {
      background: #f1f5f9;
      font-weight: 700;
    }
   
    .tool-note {
      background: #eaf9ff;
      border-radius: 20px;
      padding: 1rem 1.5rem;
      text-align: center;
      margin: 1rem 0 1.5rem;
      font-weight: 500;
    }

    /* Footer */
    .footer {
      background: #0f2b3d;
      color: #cddfe7;
      text-align: center;
      padding: 2rem 1rem 1.5rem;
      margin-top: 2rem;
      font-size: 0.85rem;
    }
    .footer-links {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1.5rem;
      margin-bottom: 1.2rem;
    }
    .footer-links a {
      color: #ffd966;
      text-decoration: none;
      font-weight: 500;
      transition: 0.2s;
    }
    .footer-links a:hover {
      color: white;
    }
    .social-icons {
      display: flex;
      justify-content: center;
      gap: 1.5rem;
      margin: 1rem 0;
    }
    .social-icons a {
      color: #cddfe7;
      font-size: 1.3rem;
      transition: 0.2s;
      text-decoration: none;
    }
    .social-icons a:hover {
      color: #ffd966;
      transform: translateY(-2px);
    }
    .copyright {
      font-size: 0.75rem;
      opacity: 0.8;
      margin-top: 1rem;
    }
    /* ========== BACK TO TOP BUTTON ========== */
    .backToTopBtn {
      position: fixed;
      bottom: 24px;
      right: 24px;
      width: 48px;
      height: 48px;
      background: #007bff;
      color: white;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.4rem;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0.3s ease, background 0.2s, transform 0.2s;
      z-index: 999;
      backdrop-filter: blur(2px);
    }
    .backToTopBtn.show {
      opacity: 1;
      visibility: visible;
    }
    .backToTopBtn:hover {
      background: #2c5985;
      transform: translateY(-3px);
    }
    .backToTopBtn:active {
      transform: translateY(1px);
    }
    @media (max-width: 768px) {
      .backToTopBtn {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        bottom: 16px;
        right: 16px;
      }
    }
    
    @media (max-width: 860px) {
      .navbar-container { flex-wrap: wrap; padding: 0.8rem 1.2rem; }
      .hamburger { display: block; margin-left: auto; }
      .nav-links { display: none; width: 100%; flex-direction: column; gap: 0.8rem; padding: 1rem 0; align-items: flex-start; }
      .nav-links.show { display: flex; }
      .search-wrapper { order: 3; max-width: 100%; margin-top: 0.8rem; }
      .wrap { padding: 1rem; }
      .calculators-grid { grid-template-columns: 1fr; }
    }