/* Google Fonts — Outfit (Heading) + Inter (Body) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

/* Phase 4: Accessibility — Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 
  Geodetic Precision - Premium Design System 
  for Coordinate-Converter.com
*/

:root {
  /* Premium Geodetic Palette - HSL for maximal flexibility */
  --primary: hsl(222, 47%, 11%);
  --primary-light: hsl(217, 33%, 20%);
  --accent: hsl(217, 91%, 60%);
  --accent-hover: hsl(221, 83%, 53%);
  --accent-soft: hsla(217, 91%, 60%, 0.1);
  --gold: hsl(45, 93%, 47%); /* Precision Gold */
  --gold-hover: hsl(45, 93%, 40%);
  --gold-soft: hsla(45, 93%, 47%, 0.12);
  --bg: hsl(210, 40%, 98%);
  --surface: hsl(0, 0%, 100%);
  --surface-muted: hsl(210, 40%, 96%);
  --text: hsl(215, 25%, 27%);
  --text-muted: hsl(215, 16%, 47%);
  --text-heading: hsl(222, 47%, 11%);
  --border: hsl(214, 32%, 91%);
  --border-hover: hsl(214, 20%, 80%);
  --success: hsl(158, 64%, 52%);
  --error: hsl(0, 84%, 60%);

  /* Engineering Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Precision Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  
  /* Modern Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --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 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --shadow-premium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* 
  Geodetic Precision - Layout Utilities 
*/

/* AdSense Mobile Safeguard */
.adsbygoogle {
  max-width: 100% !important;
  overflow: hidden !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* SPCS Hubs Responsive Grid */
@media (max-width: 600px) {
  .spcs-hubs ul {
    grid-template-columns: 1fr !important;
  }
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.tool-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Glassmorphism Navigation */
body > nav:first-of-type {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
  transition: var(--transition-normal);
}

body > nav:first-of-type .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  letter-spacing: -0.03em;
  transition: var(--transition-normal);
}

.nav-brand:hover {
  filter: brightness(1.2);
  transform: scale(1.02);
}

.nav-list {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  list-style: none;
  gap: var(--space-2);
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  transition: var(--transition-fast);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nav-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-link.active {
  background: var(--primary);
  color: white;
}

/* Hero Section */
.hero {
  padding: var(--space-12) 0;
  background: radial-gradient(circle at 70% 20%, hsla(202, 100%, 94%, 1) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, hsla(45, 100%, 96%, 1) 0%, transparent 50%),
              var(--bg);
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 2px 2px, var(--border) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.3;
  pointer-events: none;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto var(--space-8);
}

/* Professional Cards (Bento Style) */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
  padding: var(--space-12) 0;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: var(--space-8);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
  background-clip: padding-box;
}

.article-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  background: linear-gradient(135deg, var(--accent-hover), var(--gold));
  border-radius: 20px;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.article-card:hover::before {
  opacity: 1;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
  transition: var(--transition-fast);
}

.article-card:hover h3 {
  color: var(--accent);
}

.article-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Forms - Modern Engineering Feel */
form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
}

/* Override form max-width inside batch tool cards */
.batch-tool-card form,
.tool-card form {
  max-width: none;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.form-group {
  margin-bottom: var(--space-6);
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}

input[type="text"], 
input[type="file"],
select,
textarea {
  width: 100%;
  padding: var(--space-4);
  background: var(--surface-muted);
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text-heading);
  transition: var(--transition-fast);
}

input:focus, 
select:focus,
textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
  border: none;
}

.btn-primary, .convert-btn {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  border: 1px solid var(--primary);
}

.btn-primary:hover, .convert-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
  border-color: var(--primary-light);
}

/* Specific high-contrast highlight for Conversion actions */
.convert-btn {
  background: var(--accent);
  border-color: var(--accent);
  width: 100%;
  margin-top: var(--space-4);
  font-size: 1.1rem;
  padding: var(--space-4);
}

.convert-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface-muted);
  color: var(--text-heading);
}

.btn-secondary:hover {
  background: var(--border);
}

/* Footer - Clean & Professional */
footer {
  background: var(--primary);
  color: white;
  padding: var(--space-12) 0;
  margin-top: var(--space-12);
}

footer h4 {
  color: white;
  margin-bottom: var(--space-6);
  font-size: 1.125rem;
}

footer ul {
  list-style: none;
}

footer li {
  margin-bottom: var(--space-3);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
  font-size: 0.9375rem;
}

footer a:hover {
  color: white;
}

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* AdSense Integration & Safe Area Wrappers */
.ad-slot {
  margin: var(--space-8) 0;
  background: var(--surface-muted);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.content-display-frame {
  text-align: center;
  margin: 32px auto;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  /* Prevent accidental ad clicks with minimum safe margins */
  padding-top: 16px;
  padding-bottom: 16px;
  box-sizing: border-box;
}

.content-display-frame ins.adsbygoogle {
  display: block;
  max-width: 100%;
}

/* Dropdown Menus */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  padding: var(--space-2) 0;
  z-index: 9999; /* Increased to ensure visibility */
  list-style: none;
}

/* Bridge the gap to maintain hover state */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  width: 100%;
  height: 30px;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: var(--space-2) var(--space-4);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.dropdown-menu li a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 12px 16px; /* 48px touch target */
  color: var(--text-heading);
  transition: var(--transition-fast);
}

.mobile-menu-toggle::after {
  content: '';
  display: block;
}

.mobile-menu-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100vw;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    padding: var(--space-4);
    z-index: 1050;
    overflow-x: hidden;
  }

  .nav-list.mobile-open {
    display: flex;
  }

  .nav-link {
    padding: var(--space-3) var(--space-4);
    font-size: 1rem;
    border-radius: 8px;
  }

  .nav-link:hover {
    background: var(--accent-soft);
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: var(--space-4);
    min-width: auto;
  }

  .dropdown:hover .dropdown-menu,
  .dropdown .dropdown-menu {
    display: block;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

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

@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  form {
    padding: var(--space-4);
  }

  .convert-btn {
    font-size: 1rem;
  }

  /* Responsive tables — horizontal scroll on mobile */
  .article-body table,
  .content-block table,
  .reference-table-container table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Ensure content isn't hidden behind mobile bottom nav */
  body.fnb-active {
    padding-bottom: 120px;
  }

  footer {
    padding-bottom: 80px;
  }
}

/* Phase 42: Revenue & UX Optimization Styles */
#try-example-btn {
  touch-action: manipulation;
  min-height: 32px;
  padding: 6px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#try-example-btn:hover {
  background: var(--accent-hover) !important;
}

#sticky-anchor-ad {
  transition: transform 0.3s ease-in-out;
}

@media (max-width: 728px) {
  #sticky-anchor-ad ins {
    width: 320px !important;
    height: 50px !important;
  }
  
  /* Prevent content overlap with sticky ad on small screens */
  body {
    padding-bottom: 100px !important;
  }
}

.pro-context h2 {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}

/* ==========================================
   PHASE 2A: PREMIUM GEODETIC DESIGN SYSTEM
   Deep Blue (#0f172a) / Gold (#fbbf24)
   Utilitarian Minimalism — Precision Engineering
   ========================================== */

/* High-Contrast Primary CTA — Geodetic Grade */
.btn-primary-geodetic {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #fbbf24;
  border: 2px solid #fbbf24;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.02em;
  text-transform: none;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary-geodetic:hover {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(251, 191, 36, 0.3);
}

.btn-primary-geodetic:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.btn-primary-geodetic:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Secondary variant (outline) */
.btn-secondary-geodetic {
  background: transparent;
  color: #0f172a;
  border: 2px solid #334155;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  min-height: 48px;
}

.btn-secondary-geodetic:hover {
  background: var(--surface-muted);
  border-color: #0f172a;
}

/* Download group — multi-format */
.download-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.download-group .download-btn-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: 2px solid transparent;
  min-height: 44px;
  touch-action: manipulation;
}

.download-btn-csv {
  background: #059669;
  color: white;
}
.download-btn-csv:hover {
  background: #047857;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.download-btn-kml {
  background: #2563eb;
  color: white;
}
.download-btn-kml:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.download-btn-geojson {
  background: #7c3aed;
  color: white;
}
.download-btn-geojson:hover {
  background: #6d28d9;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Pre-flight Validation Card */
.preflight-card {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 20px;
  margin: 16px 0;
}

.preflight-card.preflight-pass {
  background: #f0fdf4;
  border-color: #10b981;
  border-left-color: #059669;
}

.preflight-card.preflight-fail {
  background: #fef2f2;
  border-color: #ef4444;
  border-left-color: #dc2626;
}

.preflight-card h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preflight-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.preflight-stat {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(0,0,0,0.05);
}

.preflight-stat-valid { color: #059669; }
.preflight-stat-invalid { color: #dc2626; }
.preflight-stat-empty { color: #92400e; }

/* Quick Steps Guide */
.steps-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.step-item {
  text-align: center;
  padding: 20px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0f172a;
  color: #fbbf24;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 12px;
}

.step-item h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #0f172a;
}

.step-item p {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

/* Sticky Mobile Download Bar */
.sticky-download-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 16px;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  border-top: 2px solid #fbbf24;
}

.sticky-download-bar.visible {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.sticky-download-bar a {
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  color: white;
  white-space: nowrap;
  flex: 1;
  text-align: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Conversion Result Stats */
.result-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0;
}

.result-stat-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

.result-stat-success {
  background: #dcfce7;
  color: #166534;
}

.result-stat-error {
  background: #fef2f2;
  color: #991b1b;
}

.result-stat-skipped {
  background: #fef3c7;
  color: #92400e;
}

/* Global Touch Optimization */
* {
  -webkit-tap-highlight-color: transparent;
}

button, a, select, input[type="file"] {
  touch-action: manipulation;
}

/* Phase 2A Responsive Overrides */
@media (max-width: 768px) {
  .steps-guide {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .download-group {
    flex-direction: column;
  }

  .download-group .download-btn-item {
    width: 100%;
    justify-content: center;
  }

  .btn-primary-geodetic {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
  }

  .preflight-stats {
    flex-direction: column;
    gap: 8px;
  }
}

/* Utility */
.mb-4 { margin-bottom: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.text-center { text-align: center; }

/* ========================================= */
/* Phase 3: Universal Tool Card Component   */
/* ========================================= */

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-8);
  position: relative;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 20px 20px 0 0;
}

.tool-card h1 {
  font-size: 1.75rem;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.tool-card .input-group {
  margin-bottom: var(--space-6);
}

@media (max-width: 768px) {
  .tool-card {
    padding: var(--space-4);
    border-radius: 16px;
  }
  .tool-card h1 {
    font-size: 1.35rem;
  }
}


/* ========================================= */
/* Phase 2B: Stickiness & Dashboard Styles   */
/* ========================================= */

.dashboard-widget {
    background: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border-top: 5px solid var(--primary);
    margin: 24px 0;
    text-align: center;
}

.metrics-authority-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.metrics-entry {
    padding-bottom: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.metrics-entry:last-child {
    border-right: none;
}

.metrics-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
}

.metrics-label {
    color: #cbd5e1;
    font-size: 0.8rem;
    margin-top: 4px;
}

.dual-path-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.quick-convert-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
}

.pro-mode-card {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    border-radius: 12px;
    padding: 24px;
    border-left: 5px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.pro-mode-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gold);
    color: #0f172a;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 0 0 0 8px;
    letter-spacing: 1px;
}

.link-list-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-secondary {
    display: block;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.95rem;
    transition: all 0.2s;
    text-align: center;
}
.btn-secondary:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.btn-pro-action {
    display: block;
    padding: 11px 16px;
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.2s;
}
.btn-pro-action:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--gold);
}

.promo-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 32px;
    border-radius: 12px;
    margin: 40px 0;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.promo-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary);
}

.failures-carousel {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left: 5px solid #dc2626;
    padding: 40px;
    border-radius: 12px;
    margin: 40px 0;
}

@media (max-width: 680px) {
    .metrics-authority-bar {
        grid-template-columns: 1fr;
    }
    .metrics-entry {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .metrics-entry:last-child {
        border-bottom: none;
    }
}

/* History Sidebar (Stickiness Engine) */
#history-sidebar-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: none;
}

.history-item {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--primary);
    transition: background 0.2s;
}
.history-item:hover {
    background: #f1f5f9;
}
.history-item:last-child {
    border-bottom: none;
}
.history-item-icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

#history-sidebar-container h4 {
    margin: 0 0 15px 0;
    color: var(--primary);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 8px;
    display: inline-block;
}

/* ========================================= */
/* Phase 4: Progressive Disclosure           */
/* ========================================= */

.advanced-options-toggle {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 20px 0;
  background: var(--surface);
  overflow: hidden;
}

.advanced-options-toggle summary {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-fast);
  list-style: none;
  user-select: none;
}

.advanced-options-toggle summary::-webkit-details-marker {
  display: none;
}

.advanced-options-toggle summary::before {
  content: '▸';
  font-size: 0.85rem;
  transition: transform 0.2s ease;
  display: inline-block;
  color: var(--accent);
}

.advanced-options-toggle[open] summary::before {
  transform: rotate(90deg);
}

.advanced-options-toggle summary:hover {
  background: var(--surface-muted);
}

.advanced-options-toggle .options-content {
  padding: 0 20px 20px;
  animation: slideDown 0.25s ease forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========================================= */
/* Phase 4: FAQ Accordion                    */
/* ========================================= */

.faq-accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 18px 20px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-heading);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-fast);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  margin-left: auto;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item summary:hover {
  background: var(--surface-muted);
}

.faq-item .faq-answer {
  padding: 0 20px 20px;
  color: var(--text);
  line-height: 1.7;
  font-size: 0.95rem;
  animation: slideDown 0.2s ease forwards;
}

/* ========================================= */
/* Phase 4: AdSense Decision Point           */
/* ========================================= */

.adsense-decision-point {
  text-align: center;
  margin: 32px 0;
  padding: 4px 0;
  position: relative;
}

.adsense-decision-point::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
}

/* ========================================= */
/* Phase 4: Enhanced Tool Card Hover         */
/* ========================================= */

.tool-card {
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Template Save/Restore Indicator */
.template-restored-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: #92400e;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  animation: slideDown 0.3s ease;
}

.template-restored-badge a {
  color: #92400e;
  margin-left: 8px;
}

/* Enhanced Pre-flight Card */
.preflight-detail-list {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-height: 120px;
  overflow-y: auto;
  padding: 8px 12px;
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
}

.preflight-detail-list .error-row {
  padding: 4px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  gap: 8px;
}

.preflight-detail-list .error-row:last-child {
  border-bottom: none;
}

.preflight-detail-list .row-num {
  font-weight: 700;
  color: var(--error);
  min-width: 60px;
}

.preflight-detail-list .row-msg {
  color: var(--text);
}

/* ========================================= */
/* Phase 4: EPSG Searchable Autocomplete     */
/* ========================================= */

.epsg-autocomplete-wrapper {
  position: relative;
}

.epsg-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  display: none;
}

.epsg-autocomplete-dropdown.visible {
  display: block;
  animation: slideDown 0.15s ease;
}

.epsg-option {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
  min-height: 44px;
}

.epsg-option:hover,
.epsg-option.highlighted {
  background: var(--accent-soft);
}

.epsg-option:last-child {
  border-bottom: none;
}

.epsg-option-code {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  min-width: 70px;
  flex-shrink: 0;
}

.epsg-option-name {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epsg-option-region {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

/* Phase 4: SVG Drop Zone Icon */
.drop-zone-icon-svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: #e0f2fe;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-zone-icon-svg svg {
  width: 28px;
  height: 28px;
  stroke: #0369a1;
  stroke-width: 2;
  fill: none;
}

/* Phase 4: Template Restored Badge (enhanced) */
.template-restored-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: #92400e;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  animation: slideDown 0.3s ease;
}

.template-restored-badge svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.template-restored-badge a {
  color: #92400e;
  margin-left: 8px;
  text-decoration: underline;
}

/* Phase 4: Per-row error list in pre-flight */
.preflight-error-row {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  align-items: baseline;
}

.preflight-error-row:last-child {
  border-bottom: none;
}

.preflight-error-row .err-row-num {
  font-weight: 700;
  color: var(--error);
  min-width: 55px;
  font-family: 'Courier New', monospace;
}

.preflight-error-row .err-field {
  font-weight: 600;
  color: var(--text-heading);
  min-width: 80px;
}

.preflight-error-row .err-msg {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   Phase 4B: Floating Quick Jump Button (Geodetic FAB)
   ═══════════════════════════════════════════════════ */

.geodetic-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.geodetic-fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--accent);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  pointer-events: auto;
}

.geodetic-fab-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(15, 23, 42, 0.45);
}

.geodetic-fab-btn:active {
  transform: scale(0.95);
}

.geodetic-fab-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--gold);
  stroke-width: 2;
  fill: none;
}

.geodetic-fab-btn.open svg.icon-grid { display: none; }
.geodetic-fab-btn:not(.open) svg.icon-close { display: none; }

/* Quick Jump Panel */
.quick-jump-panel {
  background: var(--primary);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 0;
  width: 320px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease, padding 0.3s ease;
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.5);
  pointer-events: auto;
}

.quick-jump-panel.open {
  max-height: 480px;
  opacity: 1;
  transform: translateY(0) scale(1);
  padding: 20px;
}

.quick-jump-panel h4 {
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-jump-panel h4 svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
}

.quick-jump-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.quick-jump-item:hover {
  background: rgba(59, 130, 246, 0.15);
  color: white;
}

.quick-jump-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.quick-jump-time {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
}

.quick-jump-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 12px 0;
}

/* EPSG Quick Picks */
.epsg-quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.epsg-chip {
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-size: 0.72rem;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.epsg-chip:hover {
  background: rgba(59, 130, 246, 0.25);
  color: white;
}

/* ═══════════════════════════════════════════════════
   Phase 4B: Contextual Risk Block
   ═══════════════════════════════════════════════════ */

.contextual-risk-block {
  background: #f8fafc;
  padding: 30px;
  border-radius: 12px;
  margin: 40px 0;
}

.contextual-risk-block h3 {
  margin-top: 0;
  color: #0f172a;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contextual-risk-block h3 svg {
  flex-shrink: 0;
}

.contextual-risk-block p {
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #334155;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .geodetic-fab {
    bottom: 16px;
    right: 16px;
  }
  .geodetic-fab-btn {
    width: 46px;
    height: 46px;
  }
  .quick-jump-panel {
    width: calc(100vw - 40px);
    max-width: 320px;
  }
}

/* ═══════════════════════════════════════════════════
   Phase 7: Unified Page Component Library
   Consolidated CSS for all page types (tool pages, hubs, content pages)
   ═══════════════════════════════════════════════════ */

/* BATCH CONVERTER & TOOL PAGES */
.batch-tool-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ecfdf5;
  color: #065f46;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #a7f3d0;
  margin-bottom: 24px;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: var(--surface-muted);
}

.drop-zone:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.drop-zone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.drop-zone h3 {
  font-size: 1.15rem;
  color: var(--text-heading);
  margin: 0 0 8px;
}

.drop-zone p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.mapping-ui {
  background: var(--surface);
  padding: 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.mapping-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 24px 0;
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: var(--surface-muted);
  font-size: 0.95rem;
  color: var(--text-heading);
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.form-select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.preview-scroll {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.preview-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

.preview-scroll th {
  background: var(--surface-muted);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--text-heading);
  border-bottom: 2px solid var(--border);
}

.preview-scroll td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: 'Courier New', monospace;
  color: var(--text);
}

.progress-card {
  background: var(--surface);
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
}

#progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin: 20px 0;
}

#progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 5px;
  transition: width 0.3s ease;
}

.download-btn {
  display: none;
  margin-top: 20px;
  padding: 14px 32px;
  background: var(--success);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.download-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.content-section {
  margin-top: 48px;
}

.content-section h2 {
  color: var(--text-heading);
  margin-bottom: 12px;
}

.content-section p {
  line-height: 1.7;
  color: var(--text);
}

.content-section ul {
  padding-left: 20px;
  color: var(--text);
  line-height: 1.8;
}

.related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

/* HUB & CONTENT PAGES */

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.nav-hub {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}

.nav-hub ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-hub a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.nav-hub a:hover {
  color: var(--accent);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.section-title {
  font-size: 2rem;
  color: var(--text-heading);
  border-left: 5px solid var(--accent);
  padding-left: 15px;
  margin-bottom: 30px;
}

.grid-section {
  margin-bottom: 60px;
}

/* CONTENT PAGES (Reference Standards, etc.) */
.canon-block {
  border: 1px solid var(--border);
  padding: 25px;
  margin-bottom: 40px;
  background: var(--surface);
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  transition: all var(--transition-normal);
}

.canon-block:target {
  border-color: var(--accent);
  background: var(--surface-muted);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.label-official {
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: block;
  font-weight: 600;
}

.quote-verbatim {
  font-size: 1.1em;
  line-height: 1.6;
  color: var(--text-heading);
  font-style: normal;
  border-left: none;
  padding-left: 0;
  margin: 15px 0;
  font-weight: 500;
}

.source-link {
  font-family: monospace;
  font-size: 0.85em;
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}

.consensus-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.consensus-table th,
.consensus-table td {
  padding: 15px;
  border: 1px solid var(--border);
  text-align: left;
  background: var(--surface);
}

.consensus-table th {
  background: var(--surface-muted);
  font-weight: 700;
  color: var(--text-heading);
}

.consensus-table tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.insufficient-notice {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--error);
  padding: 20px;
  text-align: center;
  margin-top: 50px;
  border-radius: 8px;
}

.insufficient-notice h3 {
  margin-top: 0;
  color: #991b1b;
}

.insufficient-notice p {
  color: #7f1d1d;
  margin-bottom: 16px;
}

.risk-callout {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--error);
  padding: 24px;
  border-radius: 8px;
  margin: 32px 0;
}

.risk-callout h3 {
  color: #991b1b;
  margin: 0 0 12px;
}

.risk-callout p {
  color: #7f1d1d;
  margin: 0;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   PHASE 7C: UNIFIED UI DESIGN SYSTEM - Page Type Templates
   Applied across all 400+ pages for visual consistency
   ═══════════════════════════════════════════════════════════ */

/* TOOL PAGE TEMPLATES */
.unified-tool-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-8);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.unified-tool-hero h1 {
  font-size: 1.8rem;
  margin-bottom: var(--space-2);
  color: var(--text-heading);
  font-family: var(--font-heading);
}

.unified-tool-hero p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* HUB PAGE TEMPLATES */
.unified-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.unified-hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-6);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.unified-hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.unified-hub-card h3 {
  margin: 0 0 var(--space-2);
  color: var(--text-heading);
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

.unified-hub-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* CONTENT BLOCK TEMPLATES */
.unified-content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  border-radius: 8px;
  transition: all var(--transition-normal);
}

.unified-content-block:target {
  border-color: var(--accent);
  background: var(--surface-muted);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* SHARED STAT BARS */
.unified-stats-bar {
  background: var(--primary);
  color: white;
  padding: var(--space-8);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  margin: var(--space-8) 0;
}

.unified-stat-item h3 {
  margin: 0 0 var(--space-2);
  font-size: 1.8rem;
  color: var(--gold);
  font-family: var(--font-heading);
}

.unified-stat-item p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* CTA SECTIONS */
.unified-cta-section {
  background: linear-gradient(135deg, var(--accent-soft), rgba(251, 191, 36, 0.05));
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: var(--space-8);
  text-align: center;
  margin: var(--space-8) 0;
}

.unified-cta-section h2 {
  margin-top: 0;
  color: var(--text-heading);
  font-family: var(--font-heading);
}

.unified-cta-section p {
  color: var(--text);
  margin-bottom: var(--space-4);
}

/* FAQ ACCORDION */
.unified-faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-4);
  background: var(--surface-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-3);
}

.unified-faq-item:hover {
  background: #e8f4ff;
}

.unified-faq-item summary {
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.95rem;
  padding: var(--space-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.unified-faq-item summary::before {
  content: '▸';
  transition: transform 0.2s ease;
}

.unified-faq-item[open] summary::before {
  transform: rotate(90deg);
}

.unified-faq-item p {
  margin-top: var(--space-3);
  color: var(--text);
  line-height: 1.6;
  font-size: 0.9rem;
}

/* RESPONSIVE - Tablet and Mobile */
@media (max-width: 768px) {
  .mapping-grid {
    grid-template-columns: 1fr;
  }

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

  .nav-hub ul {
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero {
    padding: 40px 20px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .drop-zone {
    padding: 32px 16px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Phase 13: Content Page Design System (Hub Pages, Articles)
   Ensures sub-pages visually match the homepage exactly.
   ═══════════════════════════════════════════════════════════ */

/* Section Title — used across hub/index pages */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Grid Section — wrapper for content grids */
.grid-section {
  padding: var(--space-8) 0;
}

/* Unified Hub Grid — card grid layout for knowledge/liability/hub pages */
.unified-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

/* Unified Hub Card — professional card for article links */
.unified-hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-6);
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.unified-hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.unified-hub-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--space-3);
  line-height: 1.35;
}

.unified-hub-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

.unified-hub-card h3 a:hover {
  color: var(--accent);
}

.unified-hub-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Article Grid (used in some content pages) */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

/* Content Page Wrapper */
.content-page {
  padding: var(--space-8) 0 var(--space-12);
}

.content-page h1 {
  font-size: 2rem;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.content-page h2 {
  font-size: 1.5rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.content-page p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: var(--space-4);
  color: var(--text);
}

.content-page ul, .content-page ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.content-page li {
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

/* Mapping Grid — for country/comparison pages */
.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* Inline CTA Banner */
.inline-cta {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border-radius: 16px;
  padding: var(--space-8);
  text-align: center;
  margin: var(--space-8) 0;
}

.inline-cta h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: var(--space-3);
}

.inline-cta p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-6);
}

/* Navigation Hub (some pages use this) */
.nav-hub {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.nav-hub a, .nav-hub button {
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition-fast);
  cursor: pointer;
}

.nav-hub a:hover, .nav-hub button:hover,
.nav-hub a.active, .nav-hub button.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Data Tables — professional styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: 0.9rem;
}

.data-table th {
  background: var(--primary);
  color: var(--gold);
  font-weight: 700;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.data-table tr:hover td {
  background: var(--accent-soft);
}

.data-table code, .data-table .mono {
  font-family: 'Courier New', monospace;
  background: var(--surface-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Risk/Warning Cards */
.risk-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  padding: var(--space-6);
  margin: var(--space-6) 0;
}

.risk-card h3 {
  color: #dc2626;
  margin-bottom: var(--space-3);
}

.risk-card p {
  color: #7f1d1d;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Info/Tip Cards */
.info-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: var(--space-6);
  margin: var(--space-6) 0;
}

.info-card h3 {
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.info-card p {
  color: #1e3a5a;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Responsive: Content Pages */
@media (max-width: 768px) {
  .unified-hub-grid {
    grid-template-columns: 1fr;
  }
  
  .unified-hub-card {
    padding: var(--space-4);
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .content-page h1 {
    font-size: 1.5rem;
  }
  
  .data-table {
    font-size: 0.8rem;
  }
  
  .data-table th, .data-table td {
    padding: var(--space-2) var(--space-3);
  }
  
  .inline-cta {
    padding: var(--space-6);
  }
}

/* ═══════════════════════════════════════════════════════════
   HOMEPAGE INLINE COMPONENTS (UNIFIED INTO GLOBAL CSS)
   ═══════════════════════════════════════════════════════════ */

/* Hero Quick Converter */
    .hero-converter {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 32px;
      box-shadow: var(--shadow-lg);
      max-width: 800px;
      margin: 0 auto;
    }

    .converter-method-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  gap: 12px !important;
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 24px;
  scrollbar-width: none;
}

    .method-tab {
  flex: 0 0 auto !important;
  min-width: 140px !important;
  padding: 12px 16px !important;
  white-space: nowrap !important;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
}

    .method-tab:hover { background: rgba(59,130,246,0.08); color: var(--accent); }
    .method-tab.active { background: var(--primary); color: #fbbf24; box-shadow: var(--shadow-sm); }

    .converter-input-area {
      display: grid;
      gap: 12px;
      margin-bottom: 16px;
    }

    .converter-input-area input {
      width: 100%;
      padding: 14px 16px;
      border: 2px solid var(--border);
      border-radius: 12px;
      font-size: 1rem;
      font-family: 'Courier New', monospace;
      background: var(--surface-muted);
      color: var(--text-heading);
      transition: var(--transition-fast);
    }

    .converter-input-area input:focus {
      outline: none;
      border-color: var(--accent);
      background: white;
      box-shadow: 0 0 0 4px var(--accent-soft);
    }

    .converter-input-area input::placeholder { color: var(--text-muted); font-family: var(--font-body); }

    .convert-action-btn {
      width: 100%;
      padding: 16px;
      background: linear-gradient(135deg, #0f172a, #1e3a5f);
      color: #fbbf24;
      border: 2px solid #fbbf24;
      border-radius: 12px;
      font-size: 1.1rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
      font-family: var(--font-heading);
      letter-spacing: 0.02em;
      min-height: 52px;
    }

    .convert-action-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(15,23,42,0.35);
    }

    .convert-action-btn:active { transform: translateY(0); }

    /* Result box */
    .result-display {
      display: none;
      margin-top: 20px;
      padding: 20px;
      background: #f0fdf4;
      border: 2px solid #86efac;
      border-radius: 12px;
      animation: slideIn 0.3s ease-out;
    }

    .result-display.show { display: block !important; }

    @keyframes slideIn {
      from { opacity: 0; transform: translateY(-8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .result-value {
      font-family: 'Courier New', monospace;
      font-size: 1.2rem;
      font-weight: 700;
      color: #0f172a;
      word-break: break-all;
      margin-bottom: 8px;
    }

    .result-meta { font-size: 0.85rem; color: var(--text-muted); }

    .result-copy-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 12px;
      padding: 8px 20px;
      background: var(--accent);
      color: white;
      border: none;
      border-radius: 8px;
      font-weight: 600;
      font-size: 0.9rem;
      cursor: pointer;
      transition: var(--transition-fast);
    }

    .result-copy-btn:hover { background: var(--accent-hover); }

    /* Privacy badge */
    .privacy-inline {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-top: 12px;
      justify-content: center;
    }

    .privacy-inline svg { width: 14px; height: 14px; flex-shrink: 0; }

    /* Batch Converter CTA */
    .batch-hero-cta {
      background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
      border-radius: 20px;
      padding: 40px;
      text-align: center;
      margin-top: 40px;
      box-shadow: var(--shadow-lg);
    }

    .batch-hero-cta h2 { color: white; margin-bottom: 8px; font-size: 1.6rem; }
    .batch-hero-cta p { color: rgba(255,255,255,0.7); margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }

    .batch-start-btn {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 16px 40px;
      background: #fbbf24;
      color: #0f172a;
      border: none;
      border-radius: 12px;
      font-size: 1.1rem;
      font-weight: 800;
      cursor: pointer;
      transition: all 0.2s;
      text-decoration: none;
      font-family: var(--font-heading);
    }

    .batch-start-btn:hover {
      background: #f59e0b;
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(251,191,36,0.35);
    }

    .batch-features {
      display: flex;
      gap: 24px;
      justify-content: center;
      flex-wrap: wrap;
      margin-top: 24px;
      font-size: 0.85rem;
      color: rgba(255,255,255,0.6);
    }

    .batch-features span { display: flex; align-items: center; gap: 6px; }

    /* Quick Links Grid */
    .tool-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 16px;
      margin-top: 32px;
    }

    .tool-card-link {
      display: block;
      padding: 20px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      text-decoration: none;
      color: inherit;
      transition: var(--transition-normal);
    }

    .tool-card-link:hover {
      transform: translateY(-3px);
      border-color: var(--accent);
      box-shadow: var(--shadow-md);
    }

    .tool-card-link strong { display: block; color: var(--text-heading); margin-bottom: 4px; }
    .tool-card-link small { color: var(--text-muted); font-size: 0.82rem; line-height: 1.4; }

    /* Content sections */
    .content-block {
      margin-top: 48px;
      padding: 32px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
    }

    .content-block h2 { margin-bottom: 16px; }

    /* Guide grid */
    .guide-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 20px;
      margin-top: 20px;
    }

    .guide-card {
      padding: 24px;
      background: var(--surface-muted);
      border-radius: 12px;
      border: 1px solid var(--border);
      transition: var(--transition-normal);
    }

    .guide-card:hover { border-color: var(--accent); }
    .guide-card h3 { font-size: 1rem; margin-bottom: 8px; }
    .guide-card p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
    .guide-card a { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 0.88rem; }
    .guide-card a:hover { text-decoration: underline; }

    /* Responsive */
    @media (max-width: 768px) {
      .hero-converter { padding: 20px; }
      .converter-method-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  gap: 12px !important;
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 24px;
  scrollbar-width: none;
}
      .method-tab {
  flex: 0 0 auto !important;
  min-width: 140px !important;
  padding: 12px 16px !important;
  white-space: nowrap !important;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
}
      .batch-hero-cta { padding: 24px; }
      .batch-hero-cta h2 { font-size: 1.3rem; }
      .tool-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
      .tool-card-link { padding: 14px; }
    }



/* ═══════════════════════════════════════════════════════════
   UNIVERSAL GEO ENGINE (PHASE 15)
   ═══════════════════════════════════════════════════════════ */
.universal-engine {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  margin: 0 auto 32px;
  max-width: 900px;
  overflow: hidden;
  position: relative;
  z-index: 20;
}

.engine-tabs {
  display: flex;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}

.engine-tab {
  flex: 1;
  padding: 18px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.engine-tab:hover {
  background: rgba(0,0,0,0.02);
  color: var(--text);
}

.engine-tab.active {
  background: var(--surface);
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.engine-body {
  padding: 32px;
}

.dual-pane-converter {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.pane {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pane label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-heading);
  display: flex;
  justify-content: space-between;
}

.pane textarea {
  flex: 1;
  min-height: 140px;
  padding: 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  resize: none;
  background: #f8fafc;
  transition: all 0.2s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.pane textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.pane.output-pane textarea {
  background: #f1f5f9;
  border-color: transparent;
  color: var(--primary);
  font-weight: 600;
}

.pane.output-pane select {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.pane-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.convert-arrow {
  color: var(--border-hover);
  background: var(--surface);
  border-radius: 50%;
  padding: 8px;
  width: 44px;
  height: 44px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.format-detect {
  margin-top: 10px;
}

.detect-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #e2e8f0;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.detect-badge.valid {
  background: #dcfce7;
  color: #166534;
}

.copy-result-btn {
  margin-top: 12px;
  padding: 10px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.copy-result-btn:hover {
  background: #f1f5f9;
  border-color: var(--border-hover);
}

.batch-drop-zone {
  border: 2px dashed var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.batch-drop-zone:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-hover);
}

.batch-launch-btn {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.2s;
}

.batch-launch-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .dual-pane-converter {
    flex-direction: column;
  }
  .pane-controls {
    transform: rotate(90deg);
    padding: 10px 0;
  }
  .engine-tab {
    padding: 14px 10px;
    font-size: 0.95rem;
  }
}

/* ═══════════════════════════════════════════════════
   EXPLANATION ENGINE — Step-by-step math display
   ═══════════════════════════════════════════════════ */

.explanation-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.explanation-panel.visible {
  opacity: 1;
  transform: translateY(0);
}

.explain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
}

.explain-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.explain-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
}

.explain-toggle:hover {
  background: var(--surface-muted);
  color: var(--accent);
}

.explain-toggle svg {
  transition: transform 0.2s ease;
}

.explain-body {
  padding: 20px;
}

.explain-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.explain-step {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.explain-step:last-child {
  border-bottom: none;
}

.explain-step .step-marker {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.step-content h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 6px;
}

.step-detail {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.step-detail code {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--accent);
  font-weight: 600;
}

.step-detail ul {
  padding-left: 1.2rem;
  margin: 8px 0;
}

.step-detail ul li {
  margin-bottom: 4px;
}

.explain-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 0.85rem;
}

.explain-table th, .explain-table td {
  padding: 8px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.explain-table th {
  background: var(--surface-muted);
  font-weight: 700;
}

.explain-table tr.highlight {
  background: var(--accent-soft);
  font-weight: 600;
}

.explain-result {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: var(--gold);
  padding: 14px 20px;
  border-radius: 10px;
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 10px 0;
}

.explain-learn-more {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.explain-learn-more h4 {
  font-size: 0.9rem;
  color: var(--text-heading);
  margin: 0 0 12px;
}

.learn-more-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.learn-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  transition: var(--transition-fast);
}

.learn-more-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateX(2px);
}

@media (max-width: 768px) {
  .explain-body { padding: 14px; }
  .explain-step { gap: 12px; padding: 10px 0; }
  .explain-step .step-marker { width: 28px; height: 28px; font-size: 0.8rem; }
  .step-content h4 { font-size: 0.85rem; }
  .step-detail { font-size: 0.82rem; }
  .explain-result { font-size: 0.9rem; padding: 10px 14px; }
  .learn-more-links { flex-direction: column; }
  .learn-more-link { width: 100%; }
}


/* ═══════════════════════════════════════════════════
   COOKIE CONSENT BANNER
   ═══════════════════════════════════════════════════ */

#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 2px solid var(--gold);
}

#cookie-consent-banner.visible {
  transform: translateY(0);
}

#cookie-consent-banner.hiding {
  transform: translateY(100%);
}

.consent-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.consent-text p {
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

.consent-text a {
  color: var(--gold);
  text-decoration: underline;
}

.consent-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.consent-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-height: 44px;
  touch-action: manipulation;
}

.consent-accept {
  background: var(--gold);
  color: #0f172a;
}

.consent-accept:hover {
  background: var(--gold-hover);
}

.consent-reject {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.2);
}

.consent-reject:hover {
  background: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
  .consent-inner {
    flex-direction: column;
    text-align: center;
    padding: 14px 16px;
    gap: 12px;
  }
  .consent-actions { width: 100%; }
  .consent-btn { flex: 1; padding: 12px 16px; }
}


/* ═══════════════════════════════════════════════════
   INTERNAL LINKER — Related content sections
   ═══════════════════════════════════════════════════ */

.related-section {
  margin: 48px auto;
}

.related-block {
  margin-bottom: 32px;
}

.related-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-title svg {
  color: var(--accent);
}

.related-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.related-card {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  padding-right: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
  position: relative;
}

.related-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-card strong {
  font-size: 0.95rem;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.related-card:hover strong {
  color: var(--accent);
}

.related-card small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.related-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--border-hover);
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.related-card:hover .related-arrow {
  color: var(--accent);
  transform: translateY(-50%) translateX(3px);
}

.related-card-guide {
  border-left: 3px solid var(--accent);
}


/* ═══════════════════════════════════════════════════
   BEGINNER NAVIGATION BAR
   ═══════════════════════════════════════════════════ */

.beginner-bar {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f7ff 100%);
  border-bottom: 1px solid #bfdbfe;
  padding: 8px 0;
  text-align: center;
  font-size: 0.85rem;
  color: #1e40af;
}

.beginner-bar a {
  color: #1e40af;
  text-decoration: underline;
  font-weight: 600;
  margin: 0 6px;
}

.beginner-bar a:hover {
  color: #1d4ed8;
}


/* ═══════════════════════════════════════════════════
   PEOPLE ALSO CONVERT
   ═══════════════════════════════════════════════════ */

.also-convert-section {
  margin: 40px 0;
}

.also-convert-section h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.also-convert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.also-convert-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.also-convert-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.also-convert-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.also-convert-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
}

.also-convert-text strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.also-convert-text small {
  font-size: 0.78rem;
  color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════
   MOBILE BOTTOM NAV
   ═══════════════════════════════════════════════════ */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}

.mobile-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.15s;
  min-width: 56px;
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.mobile-nav-item.active {
  color: var(--accent);
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: block;
    top: auto;
    bottom: 0;
    height: auto;
    max-height: 64px;
  }
  body { padding-bottom: 72px; }
  footer { margin-bottom: 20px; }
  .related-cards { grid-template-columns: 1fr; }
  .also-convert-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════
   ARTICLE PAGE LAYOUT
   ═══════════════════════════════════════════════════ */

.article-hero {
  text-align: center;
  padding: 48px 0 32px;
}

.article-hero h1 {
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article-hero .article-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.article-meta-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.article-body h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-body h3 {
  font-size: 1.15rem;
  margin: 28px 0 12px;
}

.article-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 16px;
}

.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 16px;
}

.article-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}

.article-body table th,
.article-body table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article-body table th {
  background: var(--surface-muted);
  font-weight: 700;
}

.info-callout {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.92rem;
  line-height: 1.7;
}

.warning-callout {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-left: 4px solid #f59e0b;
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.92rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .article-hero h1 { font-size: 1.6rem; }
  .article-hero { padding: 32px 0 24px; }
  .article-body h2 { font-size: 1.3rem; }
}

.also-convert-icon { font-size: 18px; color: var(--gold); }

/* ==========================================
   PHASE 26: Full-Site Audit CSS Improvements
   ========================================== */

/* Beginner Bar — mobile-first fix for horizontal overflow */
.beginner-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  font-size: 0.85rem;
}

.beginner-bar::-webkit-scrollbar { display: none; }

.beginner-bar-label {
  font-weight: 600;
  color: var(--text-heading);
  flex-shrink: 0;
  font-size: 0.85rem;
}

.beginner-bar a {
  flex-shrink: 0;
  padding: 4px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  transition: var(--transition-fast);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.beginner-bar a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Tool Grid Cards — hover effects */
.tool-card-link {
  display: block;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tool-card-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.tool-card-link:hover strong {
  color: var(--accent);
}

.tool-card-link strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
  transition: color 0.15s;
}

.tool-card-link small {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Tool Grid layout */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* Guide Grid layout */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.guide-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.guide-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.guide-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.guide-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.guide-card a:hover {
  text-decoration: underline;
}

/* Table responsive mobile wrapper */
@media (max-width: 768px) {
  .reference-table-container,
  .article-body table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .article-body table {
    min-width: 500px;
  }
  
  .beginner-bar {
    padding: 8px 12px;
    gap: 6px;
  }
  
  .beginner-bar a {
    font-size: 0.75rem;
    padding: 3px 8px;
  }
}

/* CLS Prevention — ad frame minimum height reservation */
.content-display-frame {
  min-height: 90px;
  contain: layout style;
}

/* Try Coordinates row — interactive hover */
.try-coord-row:hover {
  background: var(--accent-soft) !important;
}

.try-coord-row:active {
  background: var(--border) !important;
}

/* Content Block spacing */
.content-block {
  margin-bottom: 40px;
}

/* Batch Hero CTA */
.batch-hero-cta {
  text-align: center;
  margin: 40px 0;
  padding: 40px 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border-radius: 16px;
  color: white;
}

.batch-hero-cta h2 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.batch-hero-cta p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
  font-size: 1rem;
}

.batch-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #fbbf24;
  color: #0f172a;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.2s;
  min-height: 48px;
}

.batch-start-btn:hover {
  background: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3);
}

.batch-features {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.batch-features span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* Privacy inline badge */
.privacy-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.privacy-inline svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  transition: color 0.15s;
  min-width: 60px;
  min-height: 44px;
  justify-content: center;
}

.mobile-nav-item.active {
  color: var(--accent);
}

.mobile-nav-item svg {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: block;
  }
  
  /* Prevent content from being hidden behind bottom nav */
  body {
    padding-bottom: 70px;
  }
  
  footer {
    margin-bottom: 0;
  }
}

/* Hero converter styling */
.hero-converter {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.converter-method-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  gap: 12px !important;
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 24px;
  scrollbar-width: none;
}

.method-tab {
  flex: 0 0 auto !important;
  min-width: 140px !important;
  padding: 12px 16px !important;
  white-space: nowrap !important;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
}

.method-tab:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.method-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.converter-input-area {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.converter-input-area input {
  flex: 1;
  min-width: 150px;
}

.convert-action-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition-fast);
  min-height: 48px;
}

.convert-action-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.result-display {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  border-radius: 10px;
}

.result-display.show {
  display: block !important;
  animation: fadeIn 0.25s ease-out;
}

/* Unified tool result visibility (legacy #result + hero #result-box) */
#result.cc-visible,
#result-box.cc-visible,
#result-box.show,
#result[style*="display: block"],
#result[style*="display:block"] {
  display: block !important;
}

#result-box.show {
  display: block !important;
}

.cc-tool-toolbar .result-copy-btn,
#cc-copy-result-btn {
  background: #16a34a;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

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

.result-value {
  font-family: 'Courier New', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  word-break: break-all;
}

.result-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  min-height: 36px;
}

.result-copy-btn:hover {
  background: var(--primary-light);
}

/* Also Convert Grid (tool pages) */
.also-convert-section h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.also-convert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.also-convert-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.also-convert-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.also-convert-text strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.also-convert-text small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Article pages */
.article-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.article-hero h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.article-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 700px;
}

.article-meta-bar {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-meta-bar span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.article-body {
  max-width: 750px;
}

.article-body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

.article-body h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.75rem;
}

.article-body p {
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text);
}

.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.article-body th {
  background: var(--surface-muted);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

.article-body td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.article-body tr:hover {
  background: var(--surface-muted);
}

/* ================================================
   PHASE 27: FORCED NAVIGATION SYSTEM
   ================================================ */

/* 1. Sticky Bottom "Next Step" Bar */
.forced-nav-bar {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
}
.forced-nav-bar.visible {
  bottom: 0;
}
.forced-nav-bar .fnb-text {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.92;
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forced-nav-bar .fnb-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: var(--primary);
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(234,179,8,0.3);
}
.forced-nav-bar .fnb-cta:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234,179,8,0.4);
}
.forced-nav-bar .fnb-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 14px 16px; /* 48px touch target */
  line-height: 1;
}
.forced-nav-bar .fnb-close:hover {
  color: #fff;
}
@media (max-width: 768px) {
  .forced-nav-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
  }
  .forced-nav-bar .fnb-text {
    font-size: 0.85rem;
    flex: 1 1 100%;
    text-align: center;
    white-space: normal;
  }
  .forced-nav-bar .fnb-cta {
    flex: 1;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

/* 2. Post-Content Full CTA Block */
.post-content-cta {
  background: linear-gradient(135deg, hsl(222, 47%, 11%) 0%, hsl(217, 33%, 20%) 100%);
  color: #fff;
  padding: 40px 32px;
  border-radius: 16px;
  margin: 48px 0 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.post-content-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(234,179,8,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.post-content-cta h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
}
.post-content-cta p {
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 24px;
  line-height: 1.6;
  position: relative;
}
.post-content-cta .pcc-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.post-content-cta .pcc-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--primary);
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(234,179,8,0.3);
}
.post-content-cta .pcc-btn-primary:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234,179,8,0.4);
}
.post-content-cta .pcc-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all var(--transition-fast);
}
.post-content-cta .pcc-btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .post-content-cta {
    padding: 28px 20px;
  }
  .post-content-cta h3 { font-size: 1.3rem; }
  .post-content-cta .pcc-actions { flex-direction: column; }
  .post-content-cta .pcc-btn-primary,
  .post-content-cta .pcc-btn-secondary { width: 100%; justify-content: center; }
}

/* 3. Mistake Warning Box */
.mistake-warning-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 5px solid #ef4444;
  border-radius: 10px;
  padding: 24px;
  margin: 32px 0;
  position: relative;
}
.mistake-warning-box h4 {
  color: #991b1b;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mistake-warning-box p {
  color: #7f1d1d;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.mistake-warning-box a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dc2626;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}
.mistake-warning-box a:hover {
  color: #991b1b;
  text-decoration: underline;
}

/* 4. Inline scroll CTA */
.inline-scroll-cta {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-fast);
}
.inline-scroll-cta:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.inline-scroll-cta .isc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.inline-scroll-cta .isc-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
}
.inline-scroll-cta .isc-body {
  flex: 1;
}
.inline-scroll-cta .isc-body strong {
  display: block;
  font-size: 1rem;
  color: #312e81;
  margin-bottom: 2px;
}
.inline-scroll-cta .isc-body span {
  font-size: 0.85rem;
  color: #4338ca;
}
.inline-scroll-cta .isc-arrow {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
}
@media (max-width: 640px) {
  .inline-scroll-cta { flex-wrap: wrap; gap: 12px; }
}

/* Ensure forced nav doesn't overlap mobile bottom nav */
body.fnb-active .mobile-bottom-nav {
  bottom: 60px;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Phase 32: Map Skeleton Loader */
@keyframes skeletonPulse {
  0% { background-color: #f1f5f9; }
  50% { background-color: #e2e8f0; }
  100% { background-color: #f1f5f9; }
}
.map-skeleton {
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.map-skeleton::after {
  content: "Loading interactive map...";
  opacity: 0.6;
}
