/* ============================================================
   ML to Ounces – Design System
   ============================================================ */

/* --- Custom Properties (Luxury Light Theme) --- */
:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  --accent-cyan: #0284c7;
  --accent-cyan-light: #38bdf8;
  --accent-purple: #6366f1;
  --accent-btn: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --dark-header: #080c17;
  --dark-header-border: rgba(255, 255, 255, 0.08);
  --dark-footer: #080c17;
  --dark-footer-card: #0d1527;
  --dark-pill-bg: #151d2f;
  --dark-pill-text: #94a3b8;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --error: #ef4444;
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --white: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-serif: 'KaTeX_Main', 'Cambria Math', 'Times New Roman', serif;
  --container: 1200px;
  --container-narrow: 820px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image: 
    radial-gradient(1200px 600px at 50% -80px, rgba(14, 165, 233, 0.08), transparent 70%),
    radial-gradient(800px 500px at 85% 35%, rgba(99, 102, 241, 0.05), transparent 70%),
    radial-gradient(800px 500px at 15% 75%, rgba(2, 132, 199, 0.04), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
button, input, select, textarea {
  font-family: inherit; font-size: inherit; color: inherit;
  border: none; outline: none; background: none;
}
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  margin-bottom: 0.5em;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.85rem, 4.2vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); margin-top: 2rem; }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.55rem); margin-top: 1.5rem; }
h4 { font-size: 1.15rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
strong { color: #0f172a; }
code {
  font-family: var(--font-mono);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #1d4ed8;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  padding: 3.5rem 0;
}
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ============================================================
   NEW DARK SLEEK HEADER (Matches Reference Image)
   ============================================================ */
.site-header {
  background: var(--dark-header);
  border-bottom: 1px solid var(--dark-header-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.5rem;
  max-width: var(--container);
  margin: 0 auto;
  gap: 1.5rem;
}

/* Brand Logo with Icon Box */
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  flex-shrink: 0;
}
.brand-icon-box svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
}
.brand-text-col {
  display: flex;
  flex-direction: column;
}
.brand-title {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.063rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.brand-subtitle {
  color: var(--accent-cyan);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-links a {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.938rem;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-links a:hover {
  color: #38bdf8;
  background: rgba(255, 255, 255, 0.08);
}

/* Cyan Highlight Link: "⚡ 16 Calculators" */
.nav-item-highlight {
  color: var(--accent-cyan) !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-item-highlight .nav-bolt {
  color: #facc15;
  font-size: 0.95rem;
}
.nav-item-highlight:hover {
  color: #67e8f9 !important;
}

/* Header Dropdown (Dark Styled) */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > button {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.938rem;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-dropdown > button:hover {
  color: #38bdf8;
  background: rgba(255, 255, 255, 0.08);
}
.nav-dropdown > button::after {
  content: '';
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 2.5px;
  transform: rotate(45deg);
  margin-top: -2px;
  transition: var(--transition);
}
.nav-dropdown.open > button::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d1527;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  min-width: 270px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
}
.dropdown-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 400;
}
.dropdown-menu a:hover {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
}
.dropdown-group-title {
  padding: 0.5rem 0.75rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.5rem 0;
}

/* Header Right "Calculate Now →" Button */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.btn-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: 9px;
  background: var(--accent-btn);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.938rem;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  transition: var(--transition);
  white-space: nowrap;
}
.btn-header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
  color: #ffffff;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   NEW DARK SLEEK FOOTER (Matches Reference Image)
   ============================================================ */
.site-footer {
  background: var(--dark-footer);
  color: #94a3b8;
  padding: 4.5rem 0 2rem;
  border-top: 1px solid var(--dark-header-border);
}
.footer-main-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.3fr 0.9fr 1.4fr;
  gap: 2.5rem;
  align-items: start;
}

/* Footer Col 1: Brand */
.footer-col-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-bottom: 1.25rem;
}
.footer-col-brand .brand-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.footer-col-brand .brand-icon-box svg {
  width: 24px;
  height: 24px;
}
.footer-col-brand .brand-title {
  font-size: 1.125rem;
}
.footer-col-brand .brand-subtitle {
  font-size: 0.688rem;
}
.footer-brand-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #cbd5e1;
  max-width: 320px;
}

/* Footer Col 2: Key Formula Card */
.footer-col-formula h4 {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-formula-card {
  background: var(--dark-footer-card);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.footer-formula-math {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  color: #ffffff;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.footer-formula-subtext {
  font-size: 0.813rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin-top: 0.875rem;
}

/* Footer Col 3: Pages Links */
.footer-col-pages h4 {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-pages-list a {
  display: block;
  color: #cbd5e1;
  font-size: 0.875rem;
  padding: 0.35rem 0;
  transition: var(--transition);
}
.footer-pages-list a:hover {
  color: #ffffff;
  transform: translateX(2px);
}

/* Footer Col 4: Language Selector Grid */
.footer-col-lang h4 {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.lang-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.375rem;
}
.lang-pill {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.688rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--dark-pill-bg);
  color: var(--dark-pill-text);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.lang-pill:hover {
  background: #1e293b;
  color: #ffffff;
}
.lang-pill.active {
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* Footer Bottom Bar */
.footer-bottom-bar {
  border-top: 1px solid var(--dark-header-border);
  padding-top: 1.75rem;
  margin-top: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.813rem;
  color: #64748b;
}
.footer-bottom-copy {
  color: #64748b;
}
.btn-back-to-top {
  color: #818cf8;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
  cursor: pointer;
  background: none;
  border: none;
}
.btn-back-to-top:hover {
  color: #a5b4fc;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 1.25rem 0 0;
  font-size: 0.875rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.breadcrumbs li { display: flex; align-items: center; gap: 0.25rem; }
.breadcrumbs li + li::before {
  content: '›';
  color: var(--text-light);
  margin-right: 0.25rem;
}
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .current { color: var(--text-secondary); font-weight: 500; }

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: var(--white);
  padding: 3.5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(56,189,248,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 { color: var(--white); margin-bottom: 0.75rem; font-size: clamp(2rem, 4.5vw, 2.75rem); }
.hero p { color: #ffffff; opacity: 0.95; font-size: 1.125rem; max-width: 620px; margin: 0 auto 1.75rem; }
.hero .breadcrumbs { margin-bottom: 1.5rem; }
.hero .breadcrumbs a { color: #ffffff; opacity: 0.85; }
.hero .breadcrumbs a:hover { color: #38bdf8; opacity: 1; }
.hero .breadcrumbs .current { color: #ffffff; font-weight: 600; opacity: 1; }
.hero .breadcrumbs li + li::before { color: rgba(255, 255, 255, 0.6); }

/* --- Calculator Card (Luxury Light Theme) --- */
.calculator-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 0 15px rgba(37, 99, 235, 0.04);
  padding: 2.25rem;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  border: 1px solid #e2e8f0;
}
.calculator-card h2 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
  text-align: center;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.calc-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.calc-field {
  flex: 1;
  min-width: 120px;
}
.calc-field label {
  display: block;
  font-size: 0.813rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.calc-field input[type="number"],
.calc-field select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  font-size: 1.125rem;
  font-weight: 600;
  background: #ffffff;
  transition: var(--transition);
  color: #0f172a;
}
.calc-field input[type="number"]:focus,
.calc-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #ffffff;
}
.calc-field select option {
  background: #ffffff;
  color: #0f172a;
}
.calc-field input[type="number"]::placeholder { color: #94a3b8; font-weight: 400; }

/* Preset Quick Buttons */
.calc-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1.25rem;
  justify-content: center;
}
.btn-preset {
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-preset:hover,
.btn-preset.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

/* Result display (Clean Light Luxury Card) */
.calc-result {
  background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #86efac;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  text-align: center;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.08);
  transition: var(--transition-slow);
}
.calc-result.hidden { opacity: 0.5; }
.calc-result-label {
  font-size: 0.813rem;
  font-weight: 700;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.calc-result-value {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.calc-result-detail {
  font-size: 0.875rem;
  color: #475569;
  margin-top: 0.35rem;
}

/* Calculator buttons */
.calc-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.938rem;
  transition: var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0369a1 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}
.btn-secondary {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.btn-secondary:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background: #f8fafc;
}
.btn-copy {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.btn-copy:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-copy.copied {
  background: #ecfdf5;
  color: #059669;
  border-color: #86efac;
}
.btn-reset {
  background: transparent;
  color: #64748b;
  border-color: transparent;
}
.btn-reset:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.813rem; }

/* --- Content Sections (Clean Light Luxury) --- */
.content-section {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  padding: 2.25rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}
.content-section h2 {
  margin-top: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1.25rem;
  color: #0f172a;
}
.content-section h2 .icon {
  margin-right: 0.5rem;
}

/* --- Formula Box --- */
.formula-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #1d4ed8;
}
.formula-box .formula-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* --- Worked Examples --- */
.example-card {
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
}
.example-card .example-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.example-card .example-steps {
  font-size: 0.875rem;
  color: #475569;
}
.example-card .example-steps .step {
  margin-bottom: 0.375rem;
  padding-left: 1.25rem;
  position: relative;
}
.example-card .example-steps .step::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}
.example-card .example-result {
  font-weight: 700;
  color: #059669;
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* --- Conversion Table (Clean Light Luxury) --- */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
}
.conversion-table {
  width: 100%;
  font-size: 0.938rem;
  border-collapse: collapse;
}
.conversion-table thead {
  background: #f1f5f9;
}
.conversion-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.813rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: #0f172a;
  border-bottom: 2px solid #cbd5e1;
}
.conversion-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}
.conversion-table tbody tr:nth-child(even) { background: #f8fafc; }
.conversion-table tbody tr:hover { background: #eff6ff; }
.conversion-table td:first-child { font-weight: 600; color: #0f172a; }
.conversion-table td:not(:first-child) { color: #475569; }
.table-note {
  font-size: 0.813rem;
  color: #64748b;
  margin-top: 0.5rem;
  font-style: italic;
}

/* --- Accordion / FAQ (Clean Light Luxury) --- */
.accordion { margin: 1.25rem 0; }
.accordion-item {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  margin-bottom: 0.875rem;
  overflow: hidden;
  background: #ffffff;
  transition: var(--transition);
}
.accordion-item:hover,
.accordion-item.open {
  border-color: #93c5fd;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.05);
}
.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: #0f172a;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  gap: 1rem;
}
.accordion-header:hover { color: var(--primary); }
.accordion-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  transition: var(--transition);
  color: var(--primary);
}
.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: var(--transition);
}
.accordion-icon::before {
  top: 50%;
  left: 2px;
  right: 2px;
  height: 2px;
  transform: translateY(-50%);
}
.accordion-icon::after {
  left: 50%;
  top: 2px;
  bottom: 2px;
  width: 2px;
  transform: translateX(-50%);
}
.accordion-item.open .accordion-icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f8fafc;
}
.accordion-content {
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.7;
  border-top: 1px solid #e2e8f0;
}

/* --- Related Calculators Cards --- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  color: #0f172a;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.related-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 20px -2px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
  color: inherit;
}
.related-icon-img-box {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  padding: 6px;
  box-shadow: var(--shadow-sm);
}
.related-icon-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.related-card .related-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.related-card .related-title {
  font-weight: 700;
  font-size: 0.938rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}
.related-card .related-desc {
  font-size: 0.813rem;
  color: #64748b;
}

/* --- 16 Calculators Showcase Grid (Light Theme) --- */
.calc-showcase-section {
  background: #f1f5f9;
  padding: 4.5rem 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}
.calc-showcase-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem;
}
.calc-showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0284c7;
  font-size: 0.813rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.calc-showcase-header h2 {
  color: #0f172a;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.calc-showcase-header p {
  color: #64748b;
  font-size: 1.063rem;
  line-height: 1.6;
  margin-bottom: 0;
}
.calc-grid-4x4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.calc-showcase-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  min-height: 140px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.calc-showcase-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.25s ease;
}
.calc-showcase-card:hover {
  background: #ffffff;
  border-color: #38bdf8;
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -6px rgba(15, 23, 42, 0.08), 0 0 15px rgba(56, 189, 248, 0.15);
  color: #0f172a;
}
.calc-showcase-card:hover::before {
  background: linear-gradient(90deg, #0284c7, #2563eb);
}
.calc-showcase-icon-wrapper {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.875rem;
  transition: transform 0.25s ease;
}
.calc-showcase-card:hover .calc-showcase-icon-wrapper {
  transform: scale(1.12);
}
.calc-showcase-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}
.calc-showcase-title {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}
.calc-showcase-card:hover .calc-showcase-title {
  color: var(--primary);
}
.calc-showcase-card.active-calc {
  border-color: #2563eb;
  background: #f0f9ff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}
.calc-showcase-card.active-calc::before {
  background: #2563eb;
}
.current-calc-tag {
  display: inline-block;
  font-size: 0.688rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

/* --- Blog Cards (Clean Light Luxury) --- */
.blog-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
}
.blog-card:hover {
  box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.1);
  border-color: #93c5fd;
  transform: translateY(-4px);
}
.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  width: fit-content;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.blog-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.blog-card-title a { color: #0f172a; }
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt {
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.6;
}
.blog-card-meta {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* --- Article Detail Page (Clean Light Luxury) --- */
.article-header {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}
.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 1rem;
}
.article-body {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}
.article-body h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  color: #0f172a;
}
.article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.article-body h3 { margin-top: 1.5rem; color: #0f172a; }
.article-body p { margin-bottom: 1.25rem; color: #334155; line-height: 1.8; }
.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.375rem; color: #334155; }
.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  color: #1e293b;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}
.article-featured-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

/* Related articles */
.related-articles {
  margin-top: 2.5rem;
}
.related-articles h2 {
  margin-bottom: 1.25rem;
}

/* --- Homepage Sections --- */
.home-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: var(--white);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero h1 {
  color: var(--white);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  margin-bottom: 1rem;
}
.home-hero p {
  color: #cbd5e1;
  font-size: 1.2rem;
  max-width: 680px;
  margin: 0 auto 2.25rem;
}
.home-calculators {
  padding: 3.5rem 0;
}
.home-calculators h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}
.home-calculators .subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2.5rem;
}
.calc-category {
  margin-bottom: 2.5rem;
}
.calc-category h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
.home-blog {
  background: var(--white);
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.home-blog h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}
.home-blog .subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2.5rem;
}

/* --- Utilities & Notices --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-primary { background: var(--primary-50); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.notice {
  padding: 1.125rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.25rem 0;
  font-size: 0.938rem;
  line-height: 1.6;
}
.notice-warning {
  background: #fffbeb;
  border-left: 4px solid var(--warning);
  color: #92400e;
}

@media (max-width: 992px) {
  .calc-grid-4x4 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 680px) {
  .calc-grid-4x4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }
  .calc-showcase-card {
    padding: 1.25rem 0.875rem;
    min-height: 120px;
  }
  .calc-showcase-icon-wrapper {
    width: 44px;
    height: 44px;
    margin-bottom: 0.625rem;
  }
  .calc-showcase-icon {
    width: 40px;
    height: 40px;
  }
  .calc-showcase-title {
    font-size: 0.875rem;
  }
}

/* ============================================================
   CONE VOLUME FORMULA MATCHING LUXURY SECTIONS
   ============================================================ */

/* --- Hero Layout with Side-by-Side Visualizer --- */
.home-hero {
  padding: 3.5rem 0 4rem;
  position: relative;
}
.home-hero-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}
.home-hero-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}
.home-hero-header p {
  color: #ffffff;
  font-size: 1.125rem;
  line-height: 1.65;
  opacity: 0.95;
}
.home-hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}
.home-hero-layout .calculator-card {
  max-width: 100%;
  margin: 0;
}

/* --- Interactive Liquid Volume Visualizer (Matches 3D Diagram) --- */
.visualizer-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 0 20px -3px rgba(37, 99, 235, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  text-align: left;
}
.visualizer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.visualizer-title {
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}
.cylinder-wrapper {
  position: relative;
  width: 220px;
  height: 280px;
  margin: 0 auto 1.5rem;
  display: block;
}
.glass-cylinder {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 64px;
  width: 88px;
  border: 3px solid #38bdf8;
  border-top: none;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2) inset, 0 10px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  cursor: ns-resize;
  user-select: none;
  touch-action: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}
.glass-cylinder:hover {
  border-color: #0284c7;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35) inset, 0 10px 25px rgba(2, 132, 199, 0.15);
}
.glass-cylinder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6px;
  width: 10px;
  bottom: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), transparent);
  pointer-events: none;
  z-index: 5;
}
.liquid-fill {
  width: 100%;
  height: 10%;
  background: linear-gradient(180deg, #00e5ff 0%, #2563eb 100%);
  position: relative;
  transition: height 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}
.liquid-meniscus {
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 8px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 10px #00e5ff;
}
.cylinder-ticks {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 152px;
  right: 0;
  pointer-events: none;
  z-index: 3;
}
.tick-mark {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transform: translateY(50%);
  line-height: 1;
  pointer-events: none;
}
.tick-line {
  width: 10px;
  height: 2px;
  background: #0284c7;
  border-radius: 1px;
  flex-shrink: 0;
}
.tick-mark.sub .tick-line {
  width: 5px;
  height: 1px;
  background: #94a3b8;
}
.tick-label {
  font-size: 0.688rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.tick-mark.major .tick-label {
  color: #0369a1;
  font-weight: 700;
}
.vis-current-level {
  position: absolute;
  left: 0;
  width: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transform: translateY(50%);
  transition: bottom 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 4;
}
.vis-current-level .level-badge {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.688rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
  white-space: nowrap;
}
.vis-current-level .level-line {
  width: 8px;
  height: 2px;
  background: #2563eb;
  border-radius: 1px;
  flex-shrink: 0;
}
.visualizer-status {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  width: 100%;
  text-align: center;
}
.status-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}
.status-pct {
  font-size: 0.813rem;
  color: #0284c7;
  margin-top: 2px;
  font-weight: 600;
}
.visualizer-slider-box {
  width: 100%;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
}
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.813rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.5rem;
}
.slider-header span:last-child {
  color: #2563eb;
  font-family: var(--font-mono);
  font-weight: 700;
}
.realtime-slider {
  width: 100%;
  height: 7px;
  border-radius: 9999px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.realtime-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.realtime-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}
.realtime-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  border: none;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
  cursor: pointer;
}
.liquid-type-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-liquid-type {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-liquid-type.active,
.btn-liquid-type:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #0369a1;
}

/* --- Proof & Derivation Section (Matches Proof & Why 1/3) --- */
.proof-section {
  padding: 5rem 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}
.proof-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 3.5rem;
}
.proof-header h2 {
  color: #0f172a;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.proof-header p {
  color: #475569;
  font-size: 1.063rem;
  line-height: 1.6;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.proof-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}
.proof-card:hover {
  border-color: #93c5fd;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -5px rgba(37, 99, 235, 0.12);
}
.proof-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-weight: 800;
  font-size: 0.875rem;
  border: 1px solid rgba(37, 99, 235, 0.25);
  margin-bottom: 1rem;
}
.proof-card h3 {
  color: #0f172a;
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}
.proof-card p {
  color: #475569;
  font-size: 0.938rem;
  line-height: 1.7;
}
.proof-math-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-family: var(--font-mono);
  color: #1d4ed8;
  font-size: 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

/* --- All Formulas Section (Matches All Formulas) --- */
.formulas-section {
  padding: 5rem 0;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.formulas-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3rem;
}
.formulas-header h2 {
  color: #0f172a;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.formulas-header p {
  color: #475569;
  font-size: 1.063rem;
  line-height: 1.6;
}
.formulas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.formula-solver-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}
.formula-solver-card:hover {
  border-color: #93c5fd;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -5px rgba(37, 99, 235, 0.12);
}
.formula-solver-card h3 {
  color: #0f172a;
  font-size: 1.125rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.formula-solver-card p {
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.formula-display {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: center;
  font-family: var(--font-mono);
  color: #0369a1;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* --- Interactive Worked Examples (Matches Examples) --- */
.examples-section {
  padding: 5rem 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.btn-try-example {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.45rem 0.85rem;
  font-size: 0.813rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #2563eb;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.btn-try-example:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.4);
  color: #1d4ed8;
}

/* --- Interactive Knowledge Quiz (Matches Quiz) --- */
.quiz-section {
  padding: 5rem 0;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.quiz-card {
  max-width: 760px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.06), 0 0 20px -5px rgba(37, 99, 235, 0.05);
}
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.quiz-score-badge {
  font-size: 0.875rem;
  font-weight: 700;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(37, 99, 235, 0.25);
}
.quiz-question-box {
  margin-bottom: 1.5rem;
}
.quiz-question-title {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}
.quiz-options-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}
.quiz-opt-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.quiz-opt-btn:hover:not(:disabled) {
  border-color: #38bdf8;
  background: #f0f9ff;
  color: #0369a1;
}
.quiz-opt-btn.correct {
  border-color: #10b981 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}
.quiz-opt-btn.incorrect {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
}
.quiz-feedback {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.938rem;
  line-height: 1.6;
  display: none;
}
.quiz-feedback.show {
  display: block;
}
.quiz-feedback.correct-feedback {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.quiz-feedback.incorrect-feedback {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.quiz-nav-row {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* --- Badges --- */
.badge-primary {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--accent-cyan);
}

/* --- Responsive Layout --- */
@media (max-width: 992px) {
  .home-hero-layout {
    grid-template-columns: 1fr;
  }
  .proof-grid {
    grid-template-columns: 1fr;
  }
  .formulas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quiz-options-list {
    grid-template-columns: 1fr;
  }
  .footer-main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .mobile-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #080c17;
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    align-items: stretch;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a,
  .nav-dropdown > button {
    padding: 0.75rem 1rem;
    width: 100%;
    justify-content: space-between;
  }
  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: #0d1527;
    border-radius: var(--radius-sm);
    min-width: 100%;
    padding: 0.25rem 0.5rem;
    margin-top: 0.25rem;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-dropdown.open .dropdown-menu { max-height: 500px; }
  .footer-main-grid { grid-template-columns: 1fr; gap: 2rem; }
  .calculator-card { padding: 1.5rem; }
  .calc-row { flex-direction: column; gap: 0.75rem; }
  .content-section { padding: 1.5rem; }
  .article-body { padding: 1.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 2.5rem 0; }
  .header-actions .btn-header-cta { display: none; }
}

@media (max-width: 480px) {
  .lang-grid { grid-template-columns: repeat(4, 1fr); }
  .calc-buttons { flex-direction: column; }
  .calc-buttons .btn { width: 100%; }
  .calc-result-value { font-size: 1.375rem; }
}

/* ============================================================
   AUXILIARY PAGES STYLING (About, Contact, Terms, Privacy, Sitemap)
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-group label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}
.form-control,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
textarea.form-control {
  min-height: 140px;
  resize: vertical;
}
.contact-info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.contact-channel-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sitemap-group {
  margin-bottom: 2.5rem;
}
.sitemap-group h3 {
  font-size: 1.25rem;
  color: var(--text);
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.sitemap-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem 1.5rem;
}
.sitemap-link-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  color: var(--text);
  font-size: 0.938rem;
  transition: var(--transition);
}
.sitemap-link-item:hover {
  color: var(--primary);
  transform: translateX(3px);
}
.policy-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  line-height: 1.8;
}
.policy-card h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.policy-card h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.policy-card p,
.policy-card ul {
  color: #334155;
  margin-bottom: 1.25rem;
}
.policy-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 0.813rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   AUXILIARY PAGES STYLING (About, Contact, Terms, Privacy, Sitemap)
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-group label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}
.form-control,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
textarea.form-control {
  min-height: 140px;
  resize: vertical;
}
.contact-info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.contact-channel-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sitemap-group {
  margin-bottom: 2.5rem;
}
.sitemap-group h3 {
  font-size: 1.25rem;
  color: var(--text);
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.sitemap-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem 1.5rem;
}
.sitemap-link-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  color: var(--text);
  font-size: 0.938rem;
  transition: var(--transition);
}
.sitemap-link-item:hover {
  color: var(--primary);
  transform: translateX(3px);
}
.policy-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  line-height: 1.8;
}
.policy-card h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.policy-card h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.policy-card p,
.policy-card ul {
  color: #334155;
  margin-bottom: 1.25rem;
}
.policy-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 0.813rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
