/* ================================================================
   SHARED STYLES — DiabetOver Blog / Tools / Legal Pages
   Professional redesign — clean, scientific, easy to read
   ================================================================ */

:root {
  --primary: #F27A1A;
  --primary-deep: #D4620E;
  --primary-mid: #F5923E;
  --primary-light: #F9B36D;
  --primary-pale: #FEF3E6;
  --primary-ultra-pale: #FFFAF3;
  --accent: #E8452E;
  --accent-dark: #C73821;
  --accent-pale: #FDE8E4;
  --green: #1B9E5C;
  --green-pale: #E8F7EF;
  --blue: #2B7BC2;
  --blue-pale: #E9F2FB;
  --red: #D94040;
  --red-pale: #FDECEC;
  --yellow: #E6A817;
  --yellow-pale: #FDF5E0;
  --gradient-cta: linear-gradient(135deg, #F27A1A, #E8452E);
  --gradient-brand: linear-gradient(135deg, #F27A1A, #E8452E);
  --gradient-hero: linear-gradient(170deg, #FFF7EF 0%, #FEF0E0 40%, #FFFAF5 100%);
  --white: #fff;
  --off-white: #FFFCF9;
  --gray-50: #F8F6F3;
  --gray-100: #EFEBE6;
  --gray-200: #DDD5CC;
  --gray-300: #8A7E72;
  --text: #1F1710;
  --text-mid: #4A3D30;
  --text-light: #6B5D4F;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 4px rgba(31,23,16,.04);
  --shadow-md: 0 4px 20px rgba(31,23,16,.06);
  --shadow-lg: 0 12px 40px rgba(31,23,16,.09);
  --shadow-card: 0 2px 12px rgba(31,23,16,.05);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  background: var(--white);
}

h1, h2, h3, h4, h5 {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.3;
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-deep); text-decoration: underline; }

/* Force white text on ALL orange/gradient backgrounds */
.header-cta,
.header-cta:hover,
.btn-cta,
.btn-cta:hover,
.tool-btn,
.tool-btn:hover { color: #fff !important; text-decoration: none !important; }
.article-cta .btn, .article-cta .btn:hover { color: var(--primary-deep) !important; text-decoration: none !important; }
img { max-width: 100%; height: auto; display: block; }
strong { color: var(--text); font-weight: 700; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }


/* ================================================================
   HEADER
   ================================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 1px 8px rgba(0,0,0,.03);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-deep);
  text-decoration: none;
}
.header-logo:hover { text-decoration: none; }

.header-logo .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.header-logo .logo-icon img { width: 100%; height: 100%; object-fit: contain; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-mid);
  transition: color .2s;
  text-decoration: none;
  position: relative;
}
.header-nav a:hover { color: var(--primary); text-decoration: none; }
.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .25s;
  border-radius: 1px;
}
.header-nav a:hover::after { width: 100%; }

.header-cta {
  background: var(--gradient-cta);
  color: var(--white);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: .84rem;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  letter-spacing: .01em;
}
.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(242,122,26,.25);
  text-decoration: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


/* ================================================================
   BREADCRUMB
   ================================================================ */
.breadcrumb {
  padding: 16px 0 0;
  font-size: .82rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0;
}
.breadcrumb a {
  color: var(--text-mid);
  font-weight: 500;
  transition: color .2s;
}
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }
.breadcrumb span { margin: 0 8px; color: var(--gray-300); font-size: .75rem; }


/* ================================================================
   ARTICLE HERO — top banner for blog posts
   ================================================================ */
.article-hero {
  background: var(--gradient-hero);
  padding: 52px 0 44px;
  text-align: center;
  position: relative;
}
.article-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-100), transparent);
}

.article-tag {
  display: inline-block;
  background: var(--white);
  color: var(--primary-deep);
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}

.article-hero h1 {
  font-size: 2.3rem;
  font-weight: 800;
  max-width: 780px;
  margin: 0 auto 16px;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: .84rem;
  color: var(--text-light);
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}


/* ================================================================
   ARTICLE BODY — main content styling
   ================================================================ */
.article-body {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

/* Typography */
.article-body p {
  margin-bottom: 18px;
  color: var(--text-mid);
  font-size: .95rem;
  line-height: 1.8;
}

.article-body h2 {
  text-align: left;
  font-size: 1.55rem;
  font-weight: 800;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-pale);
  letter-spacing: -.01em;
  position: relative;
}
.article-body h2::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text);
}

/* Lists */
.article-body ul, .article-body ol {
  margin: 0 0 20px 0;
  padding-left: 0;
  color: var(--text-mid);
  list-style: none;
}

.article-body ul li, .article-body ol li {
  margin-bottom: 10px;
  padding-left: 28px;
  position: relative;
  font-size: .94rem;
  line-height: 1.7;
}

.article-body ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid var(--primary);
}

.article-body ol {
  counter-reset: ol-counter;
}
.article-body ol li {
  counter-increment: ol-counter;
}
.article-body ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  background: var(--primary-pale);
  color: var(--primary-deep);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
}

/* Blockquote */
.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-ultra-pale), var(--primary-pale));
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: 28px 0;
  font-style: normal;
  color: var(--text-mid);
  font-size: .94rem;
  line-height: 1.75;
  position: relative;
}
.article-body blockquote::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 16px;
  font-size: 3.5rem;
  font-family: Georgia, serif;
  color: var(--primary-light);
  opacity: .5;
  line-height: 1;
}

/* Info box */
.article-body .info-box {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 28px 28px 20px;
  margin: 32px 0;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.article-body .info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-cta);
  border-radius: 4px 0 0 4px;
}
.article-body .info-box h4 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--gray-100);
  box-shadow: var(--shadow-card);
  font-size: .9rem;
}

.article-body thead th {
  background: var(--primary);
  color: var(--white);
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  font-size: .84rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: none;
}
.article-body thead th:first-child { border-radius: 0; }
.article-body thead th:last-child { border-radius: 0; }

.article-body tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--text-mid);
  font-size: .9rem;
}

.article-body tbody tr:last-child td { border-bottom: none; }

.article-body tbody tr:nth-child(even) {
  background: var(--gray-50);
}
.article-body tbody tr:hover {
  background: var(--primary-ultra-pale);
}

.article-body tbody td:first-child {
  font-weight: 600;
  color: var(--text);
}

/* Related posts section at bottom */
.article-body .related-title,
.article-body p:last-of-type:has(+ ul:last-of-type) {
  font-weight: 700;
}

.article-body > ul:last-child li a,
.article-body > ul:last-of-type li a {
  font-weight: 500;
}


/* ================================================================
   ARTICLE CTA — product callout inside articles
   ================================================================ */
.article-cta {
  background: var(--gradient-cta);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  text-align: center;
  margin: 44px 0;
  color: #fff;
}

.article-cta h3 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.article-cta p {
  color: rgba(255,255,255,.95);
  margin-bottom: 20px;
  font-size: .95rem;
}
.article-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 36px;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  background: var(--white);
  color: var(--primary-deep);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.article-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  text-decoration: none;
}


/* ================================================================
   BLOG INDEX — card grid
   ================================================================ */
.blog-hero {
  background: var(--gradient-hero);
  padding: 56px 0 36px;
  text-align: center;
  position: relative;
}
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-100), transparent);
}
.blog-hero h1 {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -.02em;
}
.blog-hero p {
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
  font-size: .95rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 48px 0 72px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .3s, box-shadow .3s;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.blog-card-thumb {
  height: 190px;
  background: linear-gradient(135deg, var(--primary-pale), var(--primary-ultra-pale));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}
.blog-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(255,255,255,.4));
}

.blog-card-body { padding: 22px 24px 24px; }

.blog-card-tag {
  display: inline-block;
  background: var(--primary-pale);
  color: var(--primary-deep);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}

.blog-card-body h2 {
  text-align: left;
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}
.blog-card-body h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}
.blog-card-body h2 a:hover { color: var(--primary); text-decoration: none; }

.blog-card-body p {
  font-size: .86rem;
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  font-size: .76rem;
  color: var(--gray-300);
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: 12px;
}


/* ================================================================
   TOOL PAGES — calculators
   ================================================================ */
.tool-section { padding: 48px 0 60px; }

.tool-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-cta);
}

.tool-card h2 {
  font-size: 1.35rem;
  margin-bottom: 24px;
  text-align: center;
}

.tool-card label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.tool-card input, .tool-card select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-family: inherit;
  margin-bottom: 18px;
  transition: border-color .2s, box-shadow .2s;
  background: var(--gray-50);
}
.tool-card input:focus, .tool-card select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(242,122,26,.1);
}

.tool-btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--gradient-cta);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  letter-spacing: .01em;
}
.tool-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(242,122,26,.25);
}

.tool-result {
  margin-top: 24px;
  padding: 28px;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-xl);
  text-align: center;
  display: none;
  box-shadow: var(--shadow-card);
}
.tool-result.show {
  display: block;
  animation: fadeInUp .4s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-result .result-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary-deep);
  line-height: 1.2;
}
.tool-result .result-label {
  font-size: .95rem;
  color: var(--text);
  margin-top: 6px;
  font-weight: 700;
}
.tool-result .result-desc {
  font-size: .88rem;
  color: var(--text-mid);
  margin-top: 12px;
  line-height: 1.7;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}


/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: #1F1710;
  color: rgba(255,255,255,.7);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 14px;
}
.footer-logo:hover { text-decoration: none; color: var(--white); }
.footer-logo img { width: 40px; height: 40px; border-radius: 10px; }
.footer-logo span { color: var(--white); }

.footer h4 {
  color: var(--white);
  margin-bottom: 14px;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
}
.footer-h4-mt { margin-top: 20px; }

.footer p {
  font-size: .84rem;
  line-height: 1.7;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: rgba(255,255,255,.55);
  font-size: .84rem;
  transition: color .2s;
  text-decoration: none;
}
.footer-links a:hover { color: rgba(255,255,255,.95); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  font-size: .76rem;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ===== TABLET — 1024px ===== */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .footer-about { grid-column: 1 / -1; }
  .article-hero h1 { font-size: 1.9rem; }
}

/* ===== MOBILE — 768px ===== */
@media (max-width: 768px) {
  /* Header mobile menu */
  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--white);
  }
  .header-nav {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    overflow-y: auto;
    z-index: 9998;
    border-top: 1px solid var(--gray-100);
  }
  .header-nav.open { display: flex; }
  .header-nav a {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--gray-100);
  }
  .header-nav a:last-of-type:not(.header-cta) { border-bottom: none; }
  .header-nav a::after { display: none; }
  .header-nav a:hover { background: var(--gray-50); text-decoration: none; color: var(--primary); }
  .header-nav .header-cta,
  .header-nav .header-cta:hover {
    display: flex;
    margin-top: 12px;
    text-align: center;
    justify-content: center;
    padding: 16px 24px;
    font-size: 1rem;
    color: #fff !important;
    border-bottom: none;
    border-radius: var(--radius-full);
    background: var(--gradient-cta);
  }
  .hamburger { display: flex; }

  /* Blog index */
  .blog-hero { padding: 36px 0 24px; }
  .blog-hero h1 { font-size: 1.6rem; }
  .blog-hero p { font-size: .88rem; }
  .blog-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    padding: 28px 0 48px;
    gap: 20px;
  }
  .blog-card-thumb { height: 160px; font-size: 2.8rem; }
  .blog-card-body { padding: 18px 20px 20px; }
  .blog-card-body h2 { font-size: 1.02rem; }
  .blog-card-body p { font-size: .84rem; }

  /* Article pages */
  .article-hero { padding: 32px 0 28px; }
  .article-hero h1 { font-size: 1.5rem; line-height: 1.3; }
  .article-meta { gap: 14px; font-size: .8rem; }
  .article-tag { font-size: .68rem; padding: 3px 10px; }

  .article-body { padding: 28px 16px 44px; }
  .article-body h2 {
    font-size: 1.25rem;
    margin-top: 32px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  .article-body h2::before { width: 36px; }
  .article-body h3 { font-size: 1.05rem; margin-top: 24px; }
  .article-body p { font-size: .9rem; margin-bottom: 14px; }
  .article-body ul li, .article-body ol li { font-size: .88rem; padding-left: 24px; }
  .article-body ul li::before { left: 2px; top: 8px; width: 7px; height: 7px; }
  .article-body ol li::before { width: 20px; height: 20px; font-size: .68rem; }

  .article-body blockquote {
    padding: 16px 18px;
    margin: 20px 0;
    font-size: .88rem;
  }
  .article-body blockquote::before { font-size: 2.5rem; top: -4px; left: 12px; }

  .article-body .info-box { padding: 20px 18px 16px; margin: 20px 0; }
  .article-body .info-box h4 { font-size: .95rem; }

  /* Tables */
  .article-body table { margin: 16px -16px; width: calc(100% + 32px); border-radius: 0; border-left: none; border-right: none; }
  .article-body thead th { padding: 10px 12px; font-size: .72rem; letter-spacing: .02em; white-space: nowrap; }
  .article-body tbody td { padding: 10px 12px; font-size: .8rem; }

  /* Article CTA */
  .article-cta { padding: 28px 20px; margin: 28px 0; border-radius: var(--radius-lg); }
  .article-cta h3 { font-size: 1.12rem; }
  .article-cta p { font-size: .88rem; }
  .article-cta .btn { padding: 13px 28px; font-size: .92rem; }

  /* Tool pages */
  .tool-section { padding: 36px 0 48px; }
  .tool-card { padding: 28px 20px; }
  .tool-card h2 { font-size: 1.2rem; margin-bottom: 18px; }
  .tool-card label { font-size: .82rem; }
  .tool-card input, .tool-card select { padding: 12px 14px; font-size: .9rem; margin-bottom: 14px; }
  .tool-btn { padding: 14px; font-size: .95rem; }
  .tool-result { padding: 22px 18px; }
  .tool-result .result-value { font-size: 1.8rem; }
  .tool-result .result-label { font-size: .88rem; }
  .tool-result .result-desc { font-size: .84rem; }

  /* Breadcrumb */
  .breadcrumb { font-size: .78rem; padding: 12px 0 0; }

  /* Footer */
  .footer { padding: 36px 0 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-about { grid-column: 1 / -1; }
  .footer-logo img { width: 32px; height: 32px; }
  .footer-logo { font-size: 1.05rem; }
  .footer h4 { font-size: .8rem; margin-bottom: 10px; }
  .footer-h4-mt { margin-top: 16px; }
  .footer-links a { font-size: .8rem; }
  .footer-links li { margin-bottom: 5px; }
  .footer-bottom p { font-size: .72rem; }
}

/* ===== SMALL MOBILE — 480px ===== */
@media (max-width: 480px) {
  .container { padding: 0 14px; }

  .blog-hero h1 { font-size: 1.35rem; }
  .blog-card-thumb { height: 140px; font-size: 2.4rem; }

  .article-hero h1 { font-size: 1.28rem; }
  .article-meta { gap: 10px; font-size: .75rem; flex-direction: column; align-items: center; }
  .article-body { padding: 22px 12px 36px; }
  .article-body h2 { font-size: 1.15rem; }
  .article-body h3 { font-size: 1rem; }
  .article-body p { font-size: .87rem; }
  .article-body .info-box { padding: 16px 14px 12px; border-radius: var(--radius-md); }
  .article-body table { margin: 12px -12px; width: calc(100% + 24px); }
  .article-body thead th { padding: 8px 8px; font-size: .68rem; }
  .article-body tbody td { padding: 8px 8px; font-size: .76rem; }
  .article-cta { padding: 22px 16px; }
  .article-cta h3 { font-size: 1.02rem; }
  .article-cta .btn { padding: 12px 22px; font-size: .86rem; width: 100%; justify-content: center; }

  .tool-card { padding: 22px 16px; }
  .tool-card h2 { font-size: 1.1rem; }
  .tool-result .result-value { font-size: 1.6rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-about { grid-column: auto; }
}

/* ===== VERY SMALL — 360px ===== */
@media (max-width: 360px) {
  .container { padding: 0 10px; }
  .article-hero h1 { font-size: 1.15rem; }
  .article-body { padding: 18px 10px 32px; }
  .article-body h2 { font-size: 1.08rem; }
  .article-body thead th { font-size: .64rem; padding: 6px; }
  .article-body tbody td { font-size: .72rem; padding: 6px; }
  .article-cta .btn { font-size: .82rem; }
  .tool-card { padding: 18px 12px; }
  .blog-hero h1 { font-size: 1.2rem; }
}
