@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root {
  --bg-primary: #060a1a; --bg-secondary: #0d1333; --bg-card: rgba(15,21,53,0.7);
  --accent: #00d4aa; --accent2: #00b4d8; --accent-glow: rgba(0,212,170,0.3);
  --text: #e8eaf6; --text-muted: #8892b0; --text-dim: #5a6380;
  --danger: #ff6b6b; --warning: #ffd93d; --success: #00d4aa;
  --glass: rgba(255,255,255,0.04); --glass-border: rgba(255,255,255,0.08);
  --radius: 16px; --radius-sm: 10px; --radius-xs: 6px;
  --font: 'Inter', sans-serif; --font-display: 'Space Grotesk', sans-serif;
  --shadow: 0 8px 32px rgba(0,0,0,0.4); --shadow-glow: 0 0 40px var(--accent-glow);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font); background: var(--bg-primary); color: var(--text); line-height: 1.7; overflow-x: hidden; }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.2; }
a { color: var(--accent); text-decoration: none; transition: .3s; }
a:hover { color: var(--accent2); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 50px 0; position: relative; }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 0; transition: .4s; }
.nav.scrolled { background: rgba(6,10,26,0.9); backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); padding: 10px 0; }
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--text-muted); font-size: .9rem; font-weight: 500; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--accent); transition: .3s; }
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
/* Language Switcher – Custom Dropdown */
.lang-switcher-wrap { position: relative; z-index: 200; }
.lang-trigger { display: flex; align-items: center; gap: 8px; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 50px; padding: 7px 14px 7px 12px; cursor: pointer; transition: all .3s ease; color: var(--text);
  font-family: var(--font); font-size: .85rem; font-weight: 500; white-space: nowrap; }
.lang-trigger:hover { border-color: var(--accent); box-shadow: 0 0 16px var(--accent-glow); }
.lang-switcher-wrap.open .lang-trigger { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow);
  background: rgba(0,212,170,0.06); }
.lang-globe { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.lang-current { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.lang-chevron { flex-shrink: 0; color: var(--text-muted); transition: transform .3s cubic-bezier(.4,0,.2,1); }
.lang-switcher-wrap.open .lang-chevron { transform: rotate(180deg); color: var(--accent); }

/* Dropdown Panel */
.lang-dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; max-height: 0; overflow: hidden;
  background: rgba(13,19,51,0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid transparent; border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  opacity: 0; transform: translateY(-8px) scale(0.96);
  transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, transform .25s cubic-bezier(.4,0,.2,1), border-color .3s;
  pointer-events: none; }
.lang-switcher-wrap.open .lang-dropdown { max-height: 380px; opacity: 1; transform: translateY(0) scale(1);
  border-color: var(--glass-border); pointer-events: auto; }

/* Search */
.lang-search-wrap { padding: 10px 12px 6px; }
.lang-search { width: 100%; padding: 8px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
  border-radius: 8px; color: var(--text); font-family: var(--font); font-size: .82rem; outline: none; transition: border-color .3s; }
.lang-search::placeholder { color: var(--text-dim); }
.lang-search:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,212,170,0.12); }

/* Options Container */
.lang-options { max-height: 280px; overflow-y: auto; padding: 4px 6px 8px; scroll-behavior: smooth; }
.lang-options::-webkit-scrollbar { width: 5px; }
.lang-options::-webkit-scrollbar-track { background: transparent; }
.lang-options::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }
.lang-options::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* Individual Option */
.lang-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 14px; border: none; background: transparent;
  color: var(--text-muted); font-family: var(--font); font-size: .88rem; font-weight: 400; cursor: pointer;
  border-radius: 8px; transition: all .2s ease; text-align: left; position: relative; }
.lang-option:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.lang-option.active { background: rgba(0,212,170,0.08); color: var(--accent); font-weight: 600; }
.lang-option.active::after { content: '✓'; position: absolute; right: 14px; font-size: .75rem; color: var(--accent); font-weight: 700; }
.lang-option .lang-option-flag { font-size: 1.1rem; flex-shrink: 0; width: 22px; text-align: center; }
.lang-option-hidden { display: none !important; }

/* RTL Support */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .nav .container { flex-direction: row-reverse; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .nav-actions { flex-direction: row-reverse; }
[dir="rtl"] .hero .container { text-align: center; }
[dir="rtl"] .section-header { text-align: center; }
[dir="rtl"] .calc-card, [dir="rtl"] .content-card, [dir="rtl"] .content-block { text-align: right; }
[dir="rtl"] .detail-row { flex-direction: row-reverse; }
[dir="rtl"] .step-item { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .mnemonic-item { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .clinical-card ul li { flex-direction: row-reverse; }
[dir="rtl"] .clinical-card ul li::before { content: '←'; }
[dir="rtl"] .indications-list li { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .indications-list li::before { content: '←'; }
[dir="rtl"] .faq-q { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .result-interp { border-left: none; border-right: 3px solid var(--success); }
[dir="rtl"] .result-interp.high { border-left: none; border-right: 3px solid var(--danger); }
[dir="rtl"] .result-interp.low { border-left: none; border-right: 3px solid var(--accent2); }
[dir="rtl"] .footer-grid { direction: rtl; }
[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }
[dir="rtl"] .input-group label { flex-direction: row-reverse; }
[dir="rtl"] .legend-item { flex-direction: row-reverse; }
[dir="rtl"] .diagram-wrapper { direction: rtl; }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .lang-option { text-align: right; flex-direction: row-reverse; }
[dir="rtl"] .lang-option.active::after { right: auto; left: 14px; }

/* HERO */
.hero { min-height: auto; display: flex; align-items: center; position: relative; overflow: hidden; padding: 120px 0 60px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(0,212,170,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(0,180,216,0.06) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite; }
@keyframes heroFloat { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(-3%,2%) rotate(2deg); } }
.hero .container { position: relative; z-index: 1; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border-radius: 50px;
  background: var(--glass); border: 1px solid var(--glass-border); font-size: .85rem; color: var(--accent); margin-bottom: 24px; }
.hero-badge .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 50%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-formula { font-family: var(--font-display); font-size: clamp(1.2rem, 3vw, 1.8rem); color: var(--accent);
  padding: 16px 32px; background: var(--glass); border: 1px solid var(--accent-glow); border-radius: var(--radius-sm);
  display: inline-block; margin: 24px 0; letter-spacing: 2px; box-shadow: var(--shadow-glow); }
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: var(--radius-sm);
  font-family: var(--font); font-weight: 600; font-size: 1rem; cursor: pointer; transition: .3s; border: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #060a1a; box-shadow: 0 4px 20px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); color: #060a1a; }
.btn-secondary { background: var(--glass); color: var(--text); border: 1px solid var(--glass-border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.hero-particles { position: absolute; inset: 0; pointer-events: none; }
.particle { position: absolute; font-family: var(--font-display); font-size: .8rem; color: rgba(0,212,170,0.15);
  font-weight: 600; animation: float 15s infinite linear; }
@keyframes float { 0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-100px) rotate(360deg); opacity: 0; } }

/* SECTION HEADERS */
.section-header { text-align: center; margin-bottom: 40px; }
.section-label { font-size: .8rem; text-transform: uppercase; letter-spacing: 3px; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 16px; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* CALCULATOR */
.calculator-section { background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.calc-card { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 40px; backdrop-filter: blur(20px); box-shadow: var(--shadow); }
.calc-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.calc-card .subtitle { color: var(--text-muted); font-size: .9rem; margin-bottom: 28px; }
.mode-toggle { display: flex; background: var(--glass); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 28px; }
.mode-btn { flex: 1; padding: 10px; text-align: center; border-radius: var(--radius-xs); font-size: .85rem;
  font-weight: 500; cursor: pointer; transition: .3s; color: var(--text-muted); border: none; background: none; }
.mode-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #060a1a; font-weight: 600; }
.input-group { margin-bottom: 20px; }
.input-group label { display: flex; align-items: center; justify-content: space-between; font-size: .85rem;
  color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.input-group label .unit { color: var(--accent); font-size: .75rem; }
.input-group input { width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs); color: var(--text); font-family: var(--font-display); font-size: 1.1rem;
  transition: .3s; outline: none; }
.input-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input-group input::placeholder { color: var(--text-dim); }
.calc-btn { width: 100%; padding: 16px; margin-top: 8px; font-size: 1rem; }
.hidden { display: none !important; }

/* RESULT */
.result-card { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 40px; backdrop-filter: blur(20px); box-shadow: var(--shadow); }
.result-display { text-align: center; padding: 32px; background: var(--glass); border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border); margin-bottom: 24px; }
.result-value { font-family: var(--font-display); font-size: 3.5rem; font-weight: 700; line-height: 1; }
.result-value.normal { color: var(--success); }
.result-value.high { color: var(--danger); }
.result-value.low { color: var(--accent2); }
.result-unit { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }
.result-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 50px;
  font-size: .8rem; font-weight: 600; margin-top: 12px; }
.result-badge.normal { background: rgba(0,212,170,0.1); color: var(--success); border: 1px solid rgba(0,212,170,0.3); }
.result-badge.high { background: rgba(255,107,107,0.1); color: var(--danger); border: 1px solid rgba(255,107,107,0.3); }
.result-badge.low { background: rgba(0,180,216,0.1); color: var(--accent2); border: 1px solid rgba(0,180,216,0.3); }
.result-details { margin-top: 24px; }
.detail-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--glass-border); font-size: .9rem; }
.detail-row:last-child { border: none; }
.detail-label { color: var(--text-muted); }
.detail-value { font-weight: 600; font-family: var(--font-display); }
.result-interp { margin-top: 24px; padding: 20px; border-radius: var(--radius-sm); font-size: .9rem; line-height: 1.6; }
.result-interp.normal { background: rgba(0,212,170,0.05); border-left: 3px solid var(--success); }
.result-interp.high { background: rgba(255,107,107,0.05); border-left: 3px solid var(--danger); }
.result-interp.low { background: rgba(0,180,216,0.05); border-left: 3px solid var(--accent2); }
.result-placeholder { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.result-placeholder svg { width: 64px; height: 64px; opacity: .3; margin-bottom: 16px; }
.result-placeholder p { font-size: .95rem; }

/* DIAGRAM */
.diagram-section { background: var(--bg-primary); }
.diagram-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.diagram-info h3 { font-size: 1.5rem; margin-bottom: 16px; }
.diagram-info p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.8; }
.diagram-legend { display: flex; flex-wrap: wrap; gap: 16px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; }
.gamblegram-container { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 40px; min-height: 420px; display: flex; flex-direction: column; }
.gamblegram { display: flex; justify-content: center; gap: 40px; align-items: flex-end; flex: 1; padding: 20px 0; }
.gram-column { display: flex; flex-direction: column; align-items: center; width: 140px; }
.gram-label { font-family: var(--font-display); font-size: .85rem; font-weight: 600; margin-bottom: 12px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; }
.gram-bar-stack { width: 100%; display: flex; flex-direction: column; border-radius: var(--radius-xs); overflow: hidden;
  min-height: 300px; box-shadow: var(--shadow); }
.gram-segment { display: flex; align-items: center; justify-content: center; flex-direction: column;
  padding: 8px; transition: all .6s cubic-bezier(.4,0,.2,1); min-height: 20px; position: relative; overflow: hidden; }
.gram-segment .seg-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: .9; line-height: 1.2; }
.gram-segment .seg-value { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.gram-segment.seg-small { flex-direction: row; gap: 6px; padding: 4px; }
.gram-segment.seg-small .seg-label { font-size: 0.65rem; }
.gram-segment.seg-small .seg-value { font-size: 0.95rem; }
.seg-na { background: linear-gradient(180deg, #2563eb, #1d4ed8); color: #fff; }
.seg-k { background: linear-gradient(180deg, #7c3aed, #6d28d9); color: #fff; }
.seg-cl { background: linear-gradient(180deg, #dc2626, #b91c1c); color: #fff; }
.seg-hco3 { background: linear-gradient(180deg, #ea580c, #c2410c); color: #fff; }
.seg-ag { background: linear-gradient(180deg, var(--accent), #00b89c); color: #060a1a;
  box-shadow: inset 0 0 20px rgba(0,212,170,0.3); }
.seg-ag.high { background: linear-gradient(180deg, var(--danger), #e53e3e); color: #fff;
  animation: agPulse 2s infinite; }
.seg-ag.low { background: linear-gradient(180deg, var(--accent2), #0891b2); color: #fff; }
@keyframes agPulse { 0%,100% { box-shadow: inset 0 0 20px rgba(255,107,107,0.3); } 50% { box-shadow: inset 0 0 30px rgba(255,107,107,0.6); } }

/* FLOW DIAGRAM */
.flow-section { padding: 40px 0; }
.flow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.flow-steps::before { content: ''; position: absolute; top: 50px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); opacity: .3; }
.flow-step { text-align: center; position: relative; z-index: 1; }
.step-icon { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--glass-border); display: flex; align-items: center;
  justify-content: center; font-size: 1.8rem; transition: .3s; }
.flow-step:hover .step-icon { border-color: var(--accent); box-shadow: var(--shadow-glow); transform: scale(1.1); }
.step-num { font-family: var(--font-display); font-size: .7rem; color: var(--accent); font-weight: 600;
  letter-spacing: 2px; margin-bottom: 6px; }
.flow-step h4 { font-size: 1rem; margin-bottom: 6px; }
.flow-step p { font-size: .8rem; color: var(--text-muted); }

/* CLINICAL */
.clinical-section { background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%); }
.clinical-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.clinical-card { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 32px; transition: .3s; }
.clinical-card:hover { transform: translateY(-4px); border-color: var(--glass-border); box-shadow: var(--shadow); }
.clinical-card .card-icon { font-size: 2rem; margin-bottom: 16px; }
.clinical-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.clinical-card .card-subtitle { font-size: .85rem; color: var(--accent); margin-bottom: 16px; font-weight: 500; }
.clinical-card ul { list-style: none; }
.clinical-card ul li { padding: 8px 0; font-size: .9rem; color: var(--text-muted); border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; gap: 8px; }
.clinical-card ul li:last-child { border: none; }
.clinical-card ul li::before { content: '→'; color: var(--accent); font-weight: 600; }
.clinical-card.high-ag { border-top: 3px solid var(--danger); }
.clinical-card.normal-ag { border-top: 3px solid var(--success); }
.clinical-card.low-ag { border-top: 3px solid var(--accent2); }

/* REFERENCE TABLE */
.ref-section { padding: 40px 0; }
.ref-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--glass-border); }
.ref-table th { background: rgba(0,212,170,0.05); padding: 16px 20px; text-align: left; font-family: var(--font-display);
  font-size: .85rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--glass-border); }
.ref-table td { padding: 14px 20px; font-size: .9rem; border-bottom: 1px solid var(--glass-border); }
.ref-table tr:last-child td { border: none; }
.ref-table tr:hover td { background: rgba(255,255,255,0.02); }
.ref-table .highlight-row td { background: rgba(0,212,170,0.03); font-weight: 600; }

/* FAQ */
.faq-section { background: var(--bg-secondary); }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  margin-bottom: 12px; overflow: hidden; transition: .3s; }
.faq-item:hover { border-color: rgba(255,255,255,0.12); }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; cursor: pointer;
  font-weight: 500; font-size: .95rem; }
.faq-q .faq-icon { width: 24px; height: 24px; border-radius: 50%; background: var(--glass); display: flex;
  align-items: center; justify-content: center; transition: .3s; font-size: .8rem; color: var(--accent); flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.4,0,.2,1); }
.faq-a-inner { padding: 0 24px 20px; color: var(--text-muted); font-size: .9rem; line-height: 1.8; }

/* FOOTER */
.footer { background: var(--bg-primary); border-top: 1px solid var(--glass-border); padding: 40px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-muted); font-size: .9rem; margin-top: 12px; line-height: 1.7; }
.footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--text-muted); font-size: .9rem; }
.footer ul a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--glass-border); padding-top: 24px; display: flex;
  justify-content: space-between; align-items: center; color: var(--text-dim); font-size: .8rem; }
.footer-disclaimer { background: rgba(255,107,107,0.05); border: 1px solid rgba(255,107,107,0.15);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-top: 24px; font-size: .8rem; color: var(--text-muted); line-height: 1.6; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .calc-grid, .diagram-wrapper { grid-template-columns: 1fr; }
  .clinical-grid { grid-template-columns: 1fr 1fr; }
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
  .flow-steps::before { display: none; }
}
@media (max-width: 768px) {
  section { padding: 30px 0; }
  .nav-links { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(6,10,26,.97);
    flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; z-index: 101; }
  .clinical-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .gamblegram { gap: 20px; }
  .gram-column { width: 110px; }
}
@media (max-width: 480px) {
  .flow-steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero-formula { font-size: 1rem; padding: 12px 20px; }
  .calc-card, .result-card { padding: 24px; }
}

/* CONTENT SECTIONS */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 48px; }
.content-card { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 36px; backdrop-filter: blur(20px); transition: .3s; }
.content-card:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-2px); box-shadow: var(--shadow); }
.content-card h3 { font-size: 1.25rem; margin-bottom: 16px; color: var(--text); }
.content-card p { color: var(--text-muted); font-size: .95rem; line-height: 1.8; margin-bottom: 12px; }
.content-card p:last-child { margin-bottom: 0; }
.formula-display { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent); padding: 16px 24px;
  background: var(--glass); border: 1px solid var(--accent-glow); border-radius: var(--radius-sm);
  text-align: center; margin-bottom: 20px; letter-spacing: 1px; box-shadow: 0 0 20px var(--accent-glow); }
.content-block { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 36px; margin-bottom: 48px; }
.content-block h3 { font-size: 1.25rem; margin-bottom: 20px; }
.content-block p { color: var(--text-muted); font-size: .95rem; line-height: 1.8; }
.steps-list { display: flex; flex-direction: column; gap: 16px; }
.step-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px; background: var(--glass);
  border-radius: var(--radius-sm); border: 1px solid var(--glass-border); }
.step-number { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #060a1a; }
.step-item div { color: var(--text-muted); font-size: .9rem; line-height: 1.7; }
.step-item strong { color: var(--text); }
.mnemonic-list { display: flex; flex-direction: column; gap: 10px; }
.mnemonic-item { display: flex; gap: 14px; align-items: flex-start; padding: 10px 14px; background: var(--glass);
  border-radius: var(--radius-xs); border: 1px solid var(--glass-border); transition: .3s; }
.mnemonic-item:hover { border-color: var(--accent-glow); }
.mnemonic-letter { flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--radius-xs); display: flex;
  align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #060a1a; }
.mnemonic-item div { color: var(--text-muted); font-size: .88rem; line-height: 1.6; }
.mnemonic-item strong { color: var(--text); }
.indications-list { list-style: none; margin-top: 20px; }
.indications-list li { padding: 12px 0; font-size: .95rem; color: var(--text-muted); line-height: 1.7;
  border-bottom: 1px solid var(--glass-border); display: flex; align-items: flex-start; gap: 10px; }
.indications-list li:last-child { border: none; }
.indications-list li::before { content: '→'; color: var(--accent); font-weight: 600; flex-shrink: 0; margin-top: 2px; }
.indications-list li strong { color: var(--text); }

@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; }
}

/* LIVE FORMULA */
.live-formula-box { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 24px 28px; font-family: var(--font-display); }
.lf-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: .95rem; }
.lf-label { color: var(--accent); font-weight: 600; min-width: 110px; font-size: .85rem; }
.lf-arrow { color: var(--text-dim); }
.lf-value { color: var(--text); font-weight: 500; }
.lf-highlight { color: var(--accent2); font-weight: 700; }
.lf-divider { height: 1px; background: var(--glass-border); margin: 8px 0; }
.lf-result-row { font-size: 1.1rem; }
.lf-equals { color: var(--text-dim); font-size: 1.2rem; }
.lf-ag-result { font-size: 1.4rem; font-weight: 800; padding: 4px 12px; border-radius: var(--radius-xs);
  transition: all .4s; }
.lf-ag-result.normal { color: var(--success); background: rgba(0,212,170,0.1); }
.lf-ag-result.high { color: var(--danger); background: rgba(255,107,107,0.1); }
.lf-ag-result.low { color: var(--accent2); background: rgba(0,180,216,0.1); }
.lf-status { text-align: center; margin-top: 12px; }
.lf-status-badge { display: inline-block; padding: 6px 18px; border-radius: 50px; font-size: .8rem; font-weight: 600;
  transition: all .4s; }
.lf-status-badge.normal { background: rgba(0,212,170,0.1); color: var(--success); border: 1px solid rgba(0,212,170,0.3); }
.lf-status-badge.high { background: rgba(255,107,107,0.1); color: var(--danger); border: 1px solid rgba(255,107,107,0.3); }
.lf-status-badge.low { background: rgba(0,180,216,0.1); color: var(--accent2); border: 1px solid rgba(0,180,216,0.3); }

/* AG GAUGE */
.gauge-wrapper { padding: 10px 0; }
.gauge-labels { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; padding: 0 4px; }
.gauge-labels span:first-child { color: var(--accent2); }
.gauge-labels span:nth-child(2) { color: var(--success); }
.gauge-labels span:last-child { color: var(--danger); }
.gauge-track { position: relative; height: 28px; border-radius: 14px; overflow: visible; display: flex; margin-bottom: 8px; }
.gauge-zone { height: 100%; }
.gauge-low { flex: 8; background: linear-gradient(90deg, rgba(0,180,216,0.3), rgba(0,180,216,0.15)); border-radius: 14px 0 0 14px; }
.gauge-normal { flex: 4; background: linear-gradient(90deg, rgba(0,212,170,0.3), rgba(0,212,170,0.2)); }
.gauge-high { flex: 16; background: linear-gradient(90deg, rgba(255,107,107,0.15), rgba(255,107,107,0.3)); border-radius: 0 14px 14px 0; }
.gauge-needle { position: absolute; top: -6px; width: 4px; height: 40px; background: var(--text);
  border-radius: 2px; transform: translateX(-50%); transition: left .6s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 10px rgba(255,255,255,0.3); }
.gauge-needle::after { content: ''; position: absolute; top: -6px; left: -4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--text); }
.gauge-needle.normal { background: var(--success); }
.gauge-needle.normal::after { background: var(--success); box-shadow: 0 0 12px var(--accent-glow); }
.gauge-needle.high { background: var(--danger); }
.gauge-needle.high::after { background: var(--danger); box-shadow: 0 0 12px rgba(255,107,107,0.5); }
.gauge-needle.low { background: var(--accent2); }
.gauge-needle.low::after { background: var(--accent2); box-shadow: 0 0 12px rgba(0,180,216,0.5); }
.gauge-ticks { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-dim);
  font-family: var(--font-display); padding: 0 2px; }
.gauge-readout { text-align: center; margin-top: 16px; }
.gauge-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; transition: color .4s; }
.gauge-value.normal { color: var(--success); }
.gauge-value.high { color: var(--danger); }
.gauge-value.low { color: var(--accent2); }
.gauge-unit { font-size: .9rem; color: var(--text-muted); margin-left: 6px; }

/* INTERPRETATION HIGHLIGHTER */
.interp-live-label { text-align: center; font-family: var(--font-display); font-size: .9rem; font-weight: 600;
  padding: 10px 20px; border-radius: 50px; display: inline-block; margin: 0 auto 24px; width: auto;
  transition: all .4s; }
.interp-live-label.normal { color: var(--success); background: rgba(0,212,170,0.08); border: 1px solid rgba(0,212,170,0.2); }
.interp-live-label.high { color: var(--danger); background: rgba(255,107,107,0.08); border: 1px solid rgba(255,107,107,0.2); }
.interp-live-label.low { color: var(--accent2); background: rgba(0,180,216,0.08); border: 1px solid rgba(0,180,216,0.2); }
#interpretation .section-header + .interp-live-label { display: block; text-align: center; }
.clinical-card.active-card { transform: translateY(-6px); box-shadow: var(--shadow), 0 0 30px var(--accent-glow); }
.clinical-card.active-card.high-ag { box-shadow: var(--shadow), 0 0 30px rgba(255,107,107,0.3); }
.clinical-card.active-card.low-ag { box-shadow: var(--shadow), 0 0 30px rgba(0,180,216,0.3); }
.clinical-card.dimmed-card { opacity: .45; transform: scale(0.97); }
.clinical-card { transition: all .5s cubic-bezier(.4,0,.2,1); }

/* SCENARIO SIMULATOR */
.scenario-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.scenario-btn { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 16px; text-align: center; cursor: pointer; transition: all .3s; color: var(--text); display: flex;
  flex-direction: column; align-items: center; gap: 6px; }
.scenario-btn:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 20px var(--accent-glow); }
.scenario-btn.active { border-color: var(--accent); background: rgba(0,212,170,0.08); box-shadow: 0 0 20px var(--accent-glow); }
.scenario-icon { font-size: 1.6rem; }
.scenario-name { font-family: var(--font-display); font-weight: 600; font-size: .85rem; }
.scenario-desc { font-size: .72rem; color: var(--text-dim); line-height: 1.4; }
@media (max-width: 768px) { .scenario-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .scenario-grid { grid-template-columns: 1fr; } }

/* DECISION FLOWCHART */
.flowchart { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 0; }
.fc-node { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 16px 24px; display: flex; align-items: center; gap: 12px; font-size: .9rem; transition: all .4s;
  max-width: 320px; width: 100%; }
.fc-node .fc-icon { font-size: 1.4rem; flex-shrink: 0; }
.fc-node small { color: var(--text-dim); font-size: .78rem; }
.fc-start { border-color: var(--accent); background: rgba(0,212,170,0.05); }
.fc-connector { color: var(--accent); font-size: 1.2rem; font-weight: 700; }
.fc-branch { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; width: 100%; }
.fc-path { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; min-width: 180px;
  opacity: .4; transition: opacity .5s; }
.fc-path.fc-active { opacity: 1; }
.fc-path-label { font-family: var(--font-display); font-size: .75rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 1px; }
.fc-inner-branch { display: flex; gap: 16px; width: 100%; }
.fc-result { text-align: center; justify-content: center; flex-direction: column; gap: 4px; }
.fc-result-high { border-color: var(--danger); }
.fc-result-normal { border-color: var(--success); }
.fc-result-other { border-color: var(--accent2); }
.fc-glow { box-shadow: 0 0 20px var(--accent-glow); transform: scale(1.05); }
.fc-result-high.fc-glow { box-shadow: 0 0 20px rgba(255,107,107,0.4); border-color: var(--danger); }
.fc-result-normal.fc-glow { box-shadow: 0 0 20px rgba(0,212,170,0.4); }
.fc-result-other.fc-glow { box-shadow: 0 0 20px rgba(0,180,216,0.4); }
@media (max-width: 600px) { .fc-branch { flex-direction: column; align-items: center; }
  .fc-inner-branch { flex-direction: column; } }

/* PHYSIOLOGY DIAGRAM */
.phys-diagram { display: flex; justify-content: center; align-items: flex-end; gap: 24px; padding: 20px 0;
  min-height: 280px; }
.phys-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.phys-col-label { font-family: var(--font-display); font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.phys-bar { width: 120px; border-radius: var(--radius-xs); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 6px; transition: height .6s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden; }
.phys-ion { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: .9; line-height: 1.2; }
.phys-val { font-family: var(--font-display); font-size: 1rem; font-weight: 700; line-height: 1.2; }
.phys-bar.phys-small { flex-direction: row; gap: 6px; padding: 4px; }
.phys-bar.phys-small .phys-ion { font-size: 0.65rem; }
.phys-bar.phys-small .phys-val { font-size: 0.95rem; }
.phys-na { background: linear-gradient(180deg, #2563eb, #1d4ed8); color: #fff; }
.phys-cl { background: linear-gradient(180deg, #dc2626, #b91c1c); color: #fff; }
.phys-hco3 { background: linear-gradient(180deg, #ea580c, #c2410c); color: #fff; }
.phys-gap { position: relative; }
.phys-gap.normal { background: linear-gradient(180deg, var(--accent), #00b89c); color: #060a1a; }
.phys-gap.high { background: linear-gradient(180deg, var(--danger), #e53e3e); color: #fff;
  animation: physPulse 2s infinite; }
.phys-gap.low { background: linear-gradient(180deg, var(--accent2), #0891b2); color: #fff; }
@keyframes physPulse { 0%,100% { box-shadow: 0 0 10px rgba(255,107,107,0.2); }
  50% { box-shadow: 0 0 25px rgba(255,107,107,0.5); } }
.phys-unmeasured-labels { display: flex; flex-direction: column; align-items: center; gap: 1px;
  margin-top: 2px; }
.phys-unmeasured-labels small { font-size: .6rem; opacity: .7; }
.phys-excess { color: #fff; font-weight: 700; opacity: 1 !important; }
.phys-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 0 12px; }
.phys-equals { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--text-dim); }
.phys-neutral { font-size: .7rem; color: var(--text-dim); text-align: center; text-transform: uppercase;
  letter-spacing: 1px; line-height: 1.4; }
@media (max-width: 480px) { .phys-bar { width: 90px; } .phys-diagram { gap: 12px; } }

/* RELATED CALCULATORS */
.related-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.related-card { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; transition: all .3s; display: block; }
.related-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-glow);
  color: var(--text); }
.related-icon { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--accent);
  margin-bottom: 12px; height: 48px; display: flex; align-items: center; justify-content: center; }
.related-card h4 { font-size: 1rem; margin-bottom: 8px; color: var(--text); }
.related-card p { font-size: .82rem; color: var(--text-muted); line-height: 1.6; }
@media (max-width: 1024px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr; } }

/* FOOTER CONTACT & SOCIAL */
.footer-contact-info { margin-top: 16px; }
.footer-contact-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-contact-item .contact-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--glass);
  border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .3s; }
.footer-contact-item .contact-icon svg { width: 14px; height: 14px; fill: var(--accent); }
.footer-contact-item:hover .contact-icon { border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.footer-contact-item a, .footer-contact-item span { color: var(--text-muted); font-size: .85rem; transition: color .3s; }
.footer-contact-item a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: var(--glass);
  border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center;
  transition: all .3s; }
.footer-social a:hover { border-color: var(--accent); background: rgba(0,212,170,0.1);
  transform: translateY(-3px); box-shadow: 0 4px 16px var(--accent-glow); }
.footer-social a svg { width: 16px; height: 16px; fill: var(--text-muted); transition: fill .3s; }
.footer-social a:hover svg { fill: var(--accent); }

/* BACK TO TOP */
.back-to-top { position: fixed; bottom: 32px; right: 32px; width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 99;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: all .4s cubic-bezier(.4,0,.2,1); box-shadow: 0 4px 20px var(--accent-glow); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 8px 30px var(--accent-glow); }
.back-to-top svg { width: 22px; height: 22px; fill: #060a1a; }
@media (max-width: 768px) { .back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
  .back-to-top svg { width: 18px; height: 18px; } }

/* ANIMATIONS */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s, transform .8s; }
.reveal.visible { opacity: 1; transform: translateY(0); }
