/*
Theme Name: FinanceNS
Theme URI: https://FinanceNS.com
Author: FinanceNS
Author URI: https://FinanceNS.com
Description: Modern, fast, and secure WordPress theme for FinanceNS — 5,700+ free online calculators and personal finance guides. Fully compatible with Rank Math SEO and Google Site Kit integration.
Version: 1.6.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calculator-platform
Tags: calculators, tools, education, responsive, custom-menu, translation-ready
*/

/* ============================================
   DESIGN SYSTEM — CSS Custom Properties
   ============================================ */
:root {
  --primary: #667eea;
  --primary-dark: #764ba2;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hover: linear-gradient(135deg, #5a71d4 0%, #6a4299 100%);
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --text-main: #1f2937;
  --text-muted: #475569;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--gray-50);
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center {
  text-align: center;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-categories {
  position: relative;
}

.nav-categories-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: var(--gray-700);
  font-weight: 500;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

.nav-categories-btn:hover {
  color: var(--primary);
}

.nav-categories-arrow {
  font-size: 0.75rem;
}

.nav-categories-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.nav-categories:hover .nav-categories-dropdown,
.nav-categories-dropdown:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-categories-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--gray-700);
  transition: all 0.2s ease;
}

.nav-categories-dropdown a:hover {
  background: #f5f3ff;
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--gray-700);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-menu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid var(--gray-200);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.5rem 0;
  color: var(--gray-700);
}

.mobile-menu-category-title {
  font-weight: 600;
  color: var(--gray-800);
  padding: 0.5rem 0;
}

.mobile-menu-category a {
  padding-left: 1rem;
  color: var(--gray-600);
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.site-main {
  padding: 2rem 1rem;
}

.site-main.has-bg {
  background: var(--gray-100);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: var(--radius-2xl);
  margin-bottom: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.hero-brand {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: 1.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--gray-700);
  line-height: 1.4;
}

.hero p:not(.hero-brand) {
  font-size: 1.25rem;
  color: var(--gray-700);
}

.search-box {
  max-width: 600px;
  margin: 2rem auto 0;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  border: none;
  border-radius: var(--radius-full);
  outline: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.search-input::placeholder {
  color: var(--gray-400);
}

/* ============================================
   CATEGORY BUTTONS
   ============================================ */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.category-btn {
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.category-btn.active {
  color: var(--white);
  background: var(--gradient);
}

.category-btn:not(.active) {
  background: var(--white);
  color: var(--primary);
}

.category-btn:not(.active):hover {
  transform: translateY(-2px);
}

/* ============================================
   CALCULATOR GRID & CARDS
   ============================================ */
.calculator-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .calculator-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .calculator-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .calculator-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.calculator-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.calculator-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.calculator-card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.calculator-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.calculator-card p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ============================================
   SEO CONTENT SECTIONS
   ============================================ */
.seo-section {
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.seo-section h2 {
  font-size: 1.875rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.seo-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.seo-section p {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.seo-section ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: var(--gray-600);
}

.seo-section li {
  margin-bottom: 0.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.feature-card p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

.cta-box {
  padding: 2rem;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: var(--gradient);
  margin: 2rem 0;
}

.cta-box h2,
.cta-box h3 {
  color: var(--white);
  margin-top: 0;
}

.cta-box ul {
  color: rgba(255, 255, 255, 0.9);
}

.cta-box li::marker {
  color: var(--white);
}

.info-box {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--gray-50);
  border-left: 4px solid var(--primary);
}

.info-box h4 {
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

/* ============================================
   LOAD MORE
   ============================================ */
.load-more-container {
  text-align: center;
  margin-bottom: 2.5rem;
}

.load-more-btn {
  padding: 1rem 3rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--white);
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
}

/* ============================================
   PAGE HEADERS
   ============================================ */
.page-header {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  color: var(--white);
  background: var(--gradient);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.page-header p {
  font-size: 1.25rem;
  opacity: 0.9;
}

.page-header .subtitle {
  margin-top: 0.5rem;
  opacity: 0.7;
  font-size: 1rem;
}

.page-header .search-box {
  max-width: 400px;
  margin-top: 1.5rem;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  background: transparent;
  padding: 0;
}

.breadcrumb a {
  color: var(--primary) !important;
}

.breadcrumb a:hover {
  color: var(--primary-dark) !important;
  text-decoration: underline;
}

.breadcrumb span {
  color: #6b7280 !important;
  margin: 0 0.5rem;
}

.breadcrumb-light a {
  color: #ffffff !important;
}

.breadcrumb-light a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.breadcrumb-light span {
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   CALCULATOR ENGINE
   ============================================ */
.calculator-engine {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
}

.calculator-engine-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.calculator-engine-icon {
  font-size: 3rem;
}

.calculator-engine h1,
.calculator-engine h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.75rem;
  color: var(--primary);
}

.calculator-engine .description {
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.form-group input::placeholder {
  color: var(--gray-400);
}

.button-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-primary {
  flex: 1;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--white);
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 1rem;
}

.btn-secondary:hover {
  border-color: var(--gray-300);
}

.btn-white {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--white);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 1rem;
  margin-top: 1rem;
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-dark);
}

.result-box {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  text-align: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.result-box h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.result-box .result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

/* ============================================
   ARTICLE / SEO CONTENT
   ============================================ */
.article-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.article-content p {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--gray-600);
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content .info-list {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--gray-50);
  margin: 1.5rem 0;
}

.article-content .info-list h4 {
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

.article-content .info-list li {
  list-style: none;
  padding-left: 1.5rem;
  position: relative;
}

.article-content .info-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.faq-item {
  padding: 1.25rem;
  border-radius: var(--radius-xl);
  background: var(--gray-50);
  margin-bottom: 1rem;
}

.faq-item h4 {
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.faq-item p {
  margin-bottom: 0;
}

/* ============================================
   RELATED CALCULATORS
   ============================================ */
.related-section {
  margin-top: 2rem;
}

.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ============================================
   STATIC PAGE CONTENT
   ============================================ */
.static-page {
  padding: 2rem 0;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .value-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--gray-50);
}

.value-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.value-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  }
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-brand h3 span {
  margin-right: 0.5rem;
}

.footer-section h4 {
  color: var(--white);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--gray-400);
  transition: color 0.2s ease;
  font-size: 0.875rem;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.footer-bottom .disclaimer {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-results-header {
  margin-bottom: 2rem;
}

.search-results-header h1 {
  font-size: 1.5rem;
  color: var(--gray-800);
}

.search-results-header .search-count {
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* ============================================
   LIVE SEARCH DROPDOWN
   ============================================ */
.live-search-wrap {
  position: relative;
}

.live-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.live-search-results.active {
  display: block;
}

.live-search-results a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s ease;
}

.live-search-results a:hover {
  background: var(--gray-50);
}

.live-search-results .search-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.live-search-results .search-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.live-search-results .search-desc {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc-box {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.toc-box h4 {
  margin: 0 0 1rem 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.toc-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 2rem;
}

.toc-box li {
  margin-bottom: 0.5rem;
}

.toc-box a {
  color: var(--gray-600);
  text-decoration: none;
}

.toc-box a:hover {
  color: var(--primary);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
}

.pagination a {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.pagination a:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.pagination .current {
  background: var(--gradient);
  color: var(--white);
}

/* ============================================
   WORDPRESS-SPECIFIC OVERRIDES
   ============================================ */
.wp-block-group,
.entry-content {
  line-height: 1.8;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.alignwide {
  max-width: 1400px;
}

.alignfull {
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

/* ============================================
   WCAG AA ACCESSIBILITY & CONTRAST ENHANCEMENTS
   ============================================ */
body, p, li, td, th {
  color: #1e293b;
}

.text-muted, .meta-text, .post-meta, .published-date, .category-desc {
  color: #475569 !important;
}

a {
  color: #1d4ed8;
}

a:hover, a:focus {
  color: #1e40af;
  text-decoration: underline;
}

.site-footer {
  color: #f1f5f9;
}

.site-footer a {
  color: #93c5fd;
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer p {
  color: #cbd5e1;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ============================================
   MOBILE RESPONSIVENESS & TOUCH TARGETS (320px–480px)
   ============================================ */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 480px) {
  .calculator-engine {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .button-group {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .form-group input,
  .form-group select {
    font-size: 16px; /* Prevents auto-zoom on mobile safari */
    min-height: 46px;
    padding: 0.75rem;
  }

  .entry-content table,
  .calculator-engine table,
  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
