/* ═══════════════════════════════════════════════════════════
 * Zeak Invest · Multi-Theme Design System
 * Cosmic · Desert · Forest · Flame
 * Theme switcher via data-theme attribute
 * ═══════════════════════════════════════════════════════════ */

/* ══════════ Shared Tokens (non-theme) ══════════ */
:root {
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px;
  --r-lg: 14px; --r-xl: 18px; --r-2xl: 24px;
  --space-xs: 6px; --space-sm: 10px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --font-display: "Inter", "SF Pro Display", -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 160ms;
  --duration-normal: 240ms;
  --duration-slow: 500ms;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.6);
}

/* ══════════ COSMIC — Deep Space / Aurora ══════════ */
[data-theme="cosmic"] {
  --bg: #0B0F1A;
  --canvas: #0B0F1A;
  --surface: rgba(255,255,255,0.06);
  --surface-2: rgba(255,255,255,0.10);
  --surface-3: rgba(255,255,255,0.16);
  --surface-glass: rgba(255,255,255,0.08);
  --navy: #F0F4FF;
  --navy-light: #C0C8E0;
  --text: #F2F5FA;
  --text-secondary: #A8B0C8;
  --text-tertiary: #7A82A0;
  --text-inverse: #0B0F1A;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --border-active: rgba(0,212,170,0.55);
  --bg-gradient: radial-gradient(ellipse 120% 80% at 20% -10%, rgba(0,212,170,0.18) 0%, transparent 55%), radial-gradient(ellipse 100% 70% at 80% 30%, rgba(124,92,252,0.15) 0%, transparent 50%), radial-gradient(ellipse 90% 60% at 60% 90%, rgba(59,130,246,0.12) 0%, transparent 50%), #0B0F1A;
  /* pres old ↓ */
  --primary: #00D4AA; --primary-light: #34F5C6; --primary-glow: rgba(0,212,170,0.2);
  --accent: #7C5CFC; --accent-light: #A78BFA; --accent-glow: rgba(124,92,252,0.25);
  --aurora-1: #00D4AA; --aurora-2: #3B82F6; --aurora-3: #7C5CFC;
  --aurora-gradient: linear-gradient(135deg, #00D4AA 0%, #3B82F6 40%, #7C5CFC 100%);
  --positive: #00D4AA; --positive-soft: rgba(0,212,170,0.12); --positive-glow: rgba(0,212,170,0.4);
  --warning: #F59E0B; --warning-soft: rgba(245,158,11,0.12);
  --negative: #F43F5E; --negative-soft: rgba(244,63,94,0.12); --negative-glow: rgba(244,63,94,0.4);
  --up: #00D4AA; --up-soft: rgba(0,212,170,0.12);
  --down: #F43F5E; --down-soft: rgba(244,63,94,0.12);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --shadow-glow-purple: 0 0 24px var(--accent-glow);
  --aurora-color-1: rgba(0,180,216,0.22); --aurora-mid-1: rgba(0,119,182,0.12); --aurora-end-1: rgba(3,4,94,0.06);
  --aurora-color-2: rgba(72,49,212,0.20); --aurora-mid-2: rgba(67,97,238,0.10); --aurora-end-2: rgba(3,4,94,0.05);
  --aurora-color-3: rgba(0,180,216,0.14); --aurora-mid-3: rgba(72,49,212,0.08); --aurora-end-3: rgba(3,4,94,0.04);
  --star-hue: 220; --star-sat: 30%; --meteor-color: rgba(180,220,255,0.3);
  --color-semiconductor: #7C5CFC; --color-ai: #00D4AA; --color-robotics: #F59E0B;
  --color-aerospace: #3B82F6; --color-computing: #34D399; --color-power: #F87171;
  --theme-bg-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'><defs><radialGradient id='s' cx='50%25' cy='50%25' r='60%25'><stop offset='0%25' stop-color='%2300d4aa' stop-opacity='0.18'/><stop offset='40%25' stop-color='%237c5cfc' stop-opacity='0.12'/><stop offset='100%25' stop-color='%23000' stop-opacity='0'/></radialGradient></defs><rect width='1200' height='800' fill='%23070d18'/><circle cx='200' cy='150' r='2' fill='%23fff' opacity='0.6'/><circle cx='450' cy='300' r='1' fill='%23fff' opacity='0.4'/><circle cx='800' cy='120' r='1.5' fill='%23fff' opacity='0.5'/><circle cx='1000' cy='500' r='1' fill='%23fff' opacity='0.4'/><circle cx='350' cy='650' r='2' fill='%23fff' opacity='0.6'/><circle cx='700' cy='400' r='1' fill='%23fff' opacity='0.5'/><circle cx='900' cy='650' r='1.5' fill='%23fff' opacity='0.4'/><circle cx='150' cy='500' r='1' fill='%23fff' opacity='0.5'/><rect width='1200' height='800' fill='url(%23s)'/></svg>");
}

/* ══════════ DESERT — Warm Sands / Dune / Gold ══════════ */
[data-theme="desert"] {
  --bg: #1A0F08;
  --canvas: #1A0F08;
  --surface: rgba(255,255,255,0.05);
  --surface-2: rgba(255,255,255,0.10);
  --surface-3: rgba(255,255,255,0.15);
  --surface-glass: rgba(255,255,255,0.07);
  --navy: #FBF6F0;
  --navy-light: #D8CCB8;
  --text: #FAF6F0;
  --text-secondary: #C9BFA8;
  --text-tertiary: #8B7E68;
  --text-inverse: #1A0F08;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --border-active: rgba(212,168,75,0.55);
  --bg-gradient: radial-gradient(ellipse 120% 80% at 30% -10%, rgba(212,168,75,0.18) 0%, transparent 55%), radial-gradient(ellipse 100% 70% at 70% 40%, rgba(224,123,76,0.15) 0%, transparent 50%), radial-gradient(ellipse 90% 60% at 50% 90%, rgba(160,90,40,0.10) 0%, transparent 50%), #1A0F08;
  /* pres old ↓ */
  --primary: #D4A84B; --primary-light: #E8C86A; --primary-glow: rgba(212,168,75,0.2);
  --accent: #E07B4C; --accent-light: #F0986C; --accent-glow: rgba(224,123,76,0.25);
  --aurora-gradient: linear-gradient(135deg, #D4A84B 0%, #E07B4C 50%, #C87040 100%);
  --positive: #7CB342; --positive-soft: rgba(124,179,66,0.12);
  --warning: #D4A84B; --warning-soft: rgba(212,168,75,0.12);
  --negative: #E5734C; --negative-soft: rgba(229,115,76,0.12);
  --up: #7CB342; --up-soft: rgba(124,179,66,0.12);
  --down: #E5734C; --down-soft: rgba(229,115,76,0.12);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --shadow-glow-purple: 0 0 24px var(--accent-glow);
  --aurora-color-1: rgba(212,168,75,0.18); --aurora-mid-1: rgba(180,130,50,0.10); --aurora-end-1: rgba(120,80,30,0.05);
  --aurora-color-2: rgba(224,123,76,0.16); --aurora-mid-2: rgba(180,90,50,0.09); --aurora-end-2: rgba(100,50,30,0.04);
  --aurora-color-3: rgba(212,168,75,0.12); --aurora-mid-3: rgba(224,123,76,0.07); --aurora-end-3: rgba(100,60,30,0.03);
  --star-hue: 40; --star-sat: 40%; --meteor-color: rgba(240,200,140,0.3);
  --color-semiconductor: #D4A84B; --color-ai: #E07B4C; --color-robotics: #F59E0B;
  --color-aerospace: #C87040; --color-computing: #A8B84A; --color-power: #E5734C;
  --theme-bg-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'><defs><radialGradient id='d' cx='30%25' cy='40%25' r='60%25'><stop offset='0%25' stop-color='%23d4a84b' stop-opacity='0.18'/><stop offset='40%25' stop-color='%23e07b4c' stop-opacity='0.12'/><stop offset='100%25' stop-color='%23000' stop-opacity='0'/></radialGradient></defs><rect width='1200' height='800' fill='%23160c06'/><path d='M0,400 Q300,200 600,400 T1200,400 L1200,800 L0,800Z' fill='%23d4a84b' opacity='0.05'/><path d='M0,500 Q300,300 600,500 T1200,500 L1200,800 L0,800Z' fill='%23e07b4c' opacity='0.05'/><path d='M0,600 Q300,400 600,600 T1200,600 L1200,800 L0,800Z' fill='%23c87040' opacity='0.04'/><rect width='1200' height='800' fill='url(%23d)'/></svg>");
}

/* ══════════ FOREST — Deep Woods / Emerald ══════════ */
[data-theme="forest"] {
  --bg: #06120A;
  --canvas: #06120A;
  --surface: rgba(255,255,255,0.05);
  --surface-2: rgba(255,255,255,0.10);
  --surface-3: rgba(255,255,255,0.15);
  --surface-glass: rgba(255,255,255,0.07);
  --navy: #E8F5E9;
  --navy-light: #A5D6A7;
  --text: #E8F5E9;
  --text-secondary: #A5C9A8;
  --text-tertiary: #6B8B70;
  --text-inverse: #06120A;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --border-active: rgba(80,220,140,0.55);
  --bg-gradient: radial-gradient(ellipse 120% 80% at 25% -10%, rgba(80,220,140,0.18) 0%, transparent 55%), radial-gradient(ellipse 100% 70% at 75% 35%, rgba(170,230,80,0.12) 0%, transparent 50%), radial-gradient(ellipse 90% 60% at 55% 90%, rgba(50,180,140,0.10) 0%, transparent 50%), #06120A;
  /* pres old ↓ */
  --primary: #059669; --primary-light: #10B981; --primary-glow: rgba(5,150,105,0.2);
  --accent: #84CC16; --accent-light: #A3E635; --accent-glow: rgba(132,204,22,0.22);
  --aurora-gradient: linear-gradient(135deg, #059669 0%, #10B981 40%, #84CC16 100%);
  --positive: #10B981; --positive-soft: rgba(16,185,129,0.12);
  --warning: #D97706; --warning-soft: rgba(217,119,6,0.12);
  --negative: #EF4444; --negative-soft: rgba(239,68,68,0.12);
  --up: #10B981; --up-soft: rgba(16,185,129,0.12);
  --down: #EF4444; --down-soft: rgba(239,68,68,0.12);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --shadow-glow-purple: 0 0 24px var(--accent-glow);
  --aurora-color-1: rgba(5,150,105,0.18); --aurora-mid-1: rgba(16,185,129,0.10); --aurora-end-1: rgba(4,80,50,0.05);
  --aurora-color-2: rgba(132,204,22,0.15); --aurora-mid-2: rgba(100,160,20,0.08); --aurora-end-2: rgba(40,80,10,0.04);
  --aurora-color-3: rgba(5,150,105,0.12); --aurora-mid-3: rgba(132,204,22,0.06); --aurora-end-3: rgba(20,60,20,0.03);
  --star-hue: 140; --star-sat: 20%; --meteor-color: rgba(160,230,180,0.3);
  --color-semiconductor: #059669; --color-ai: #10B981; --color-robotics: #84CC16;
  --color-aerospace: #34D399; --color-computing: #6EE7B7; --color-power: #EF4444;
  --theme-bg-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'><defs><radialGradient id='f' cx='40%25' cy='30%25' r='60%25'><stop offset='0%25' stop-color='%2310b981' stop-opacity='0.20'/><stop offset='40%25' stop-color='%2384cc16' stop-opacity='0.12'/><stop offset='100%25' stop-color='%23000' stop-opacity='0'/></radialGradient></defs><rect width='1200' height='800' fill='%23061008'/><g opacity='0.10' stroke='%2310b981' stroke-width='0.5' fill='none'><path d='M100,0 L100,800'/><path d='M250,0 L250,800'/><path d='M400,0 L400,800'/><path d='M550,0 L550,800'/><path d='M700,0 L700,800'/><path d='M850,0 L850,800'/><path d='M1000,0 L1000,800'/><path d='M1150,0 L1150,800'/></g><rect width='1200' height='800' fill='url(%23f)'/></svg>");
}

/* ══════════ FLAME — Ember / Fire / Volcanic ══════════ */
[data-theme="flame"] {
  --bg: #1A0808;
  --canvas: #1A0808;
  --surface: rgba(255,255,255,0.05);
  --surface-2: rgba(255,255,255,0.10);
  --surface-3: rgba(255,255,255,0.15);
  --surface-glass: rgba(255,255,255,0.07);
  --navy: #FFEEE8;
  --navy-light: #FFC0A0;
  --text: #FFEEE8;
  --text-secondary: #D8B8A8;
  --text-tertiary: #9C7860;
  --text-inverse: #1A0808;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --border-active: rgba(255,150,80,0.55);
  --bg-gradient: radial-gradient(ellipse 120% 80% at 35% -10%, rgba(255,150,80,0.18) 0%, transparent 55%), radial-gradient(ellipse 100% 70% at 65% 40%, rgba(255,80,80,0.15) 0%, transparent 50%), radial-gradient(ellipse 90% 60% at 50% 90%, rgba(255,200,80,0.10) 0%, transparent 50%), #1A0808;
  /* pres old ↓ */
  --primary: #F97316; --primary-light: #FB923C; --primary-glow: rgba(249,115,22,0.22);
  --accent: #EF4444; --accent-light: #F87171; --accent-glow: rgba(239,68,68,0.25);
  --aurora-gradient: linear-gradient(135deg, #F97316 0%, #EF4444 40%, #F59E0B 100%);
  --positive: #F97316; --positive-soft: rgba(249,115,22,0.12);
  --warning: #F59E0B; --warning-soft: rgba(245,158,11,0.12);
  --negative: #DC2626; --negative-soft: rgba(220,38,38,0.12);
  --up: #F97316; --up-soft: rgba(249,115,22,0.12);
  --down: #DC2626; --down-soft: rgba(220,38,38,0.12);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --shadow-glow-purple: 0 0 24px var(--accent-glow);
  --aurora-color-1: rgba(249,115,22,0.20); --aurora-mid-1: rgba(239,68,68,0.11); --aurora-end-1: rgba(120,30,10,0.06);
  --aurora-color-2: rgba(239,68,68,0.18); --aurora-mid-2: rgba(245,158,11,0.10); --aurora-end-2: rgba(100,40,15,0.05);
  --aurora-color-3: rgba(249,115,22,0.13); --aurora-mid-3: rgba(239,68,68,0.07); --aurora-end-3: rgba(80,25,10,0.04);
  --star-hue: 25; --star-sat: 60%; --meteor-color: rgba(255,180,120,0.35);
  --color-semiconductor: #F97316; --color-ai: #EF4444; --color-robotics: #F59E0B;
  --color-aerospace: #FB923C; --color-computing: #F87171; --color-power: #DC2626;
  --theme-bg-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'><defs><radialGradient id='f1' cx='30%25' cy='80%25' r='50%25'><stop offset='0%25' stop-color='%23f97316' stop-opacity='0.30'/><stop offset='40%25' stop-color='%23ef4444' stop-opacity='0.20'/><stop offset='100%25' stop-color='%23000' stop-opacity='0'/></radialGradient><radialGradient id='f2' cx='70%25' cy='60%25' r='45%25'><stop offset='0%25' stop-color='%23f59e0b' stop-opacity='0.22'/><stop offset='100%25' stop-color='%23000' stop-opacity='0'/></radialGradient></defs><rect width='1200' height='800' fill='%23120808'/><g opacity='0.15'><path d='M150,800 Q200,650 220,500 Q240,600 280,450 Q310,580 340,500 Q360,620 400,550 Q430,580 450,800Z' fill='%23f97316'/><path d='M650,800 Q700,650 720,500 Q740,600 780,450 Q810,580 840,500 Q860,620 900,550 Q930,580 950,800Z' fill='%23ef4444'/><path d='M900,800 Q930,700 950,600 Q970,680 1000,550 L1020,800Z' fill='%23f59e0b'/></g><rect width='1200' height='800' fill='url(%23f1)'/><rect width='1200' height='800' fill='url(%23f2)'/></svg>");
}

/* ══════════ Reset ══════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  font-feature-settings: "cv01","cv03","cv04","ss01","ss03";
  position: relative; overflow-x: hidden;
  min-height: 100vh;
}

/* ══════════ Cosmic Background ══════════ */
.cosmic-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: var(--bg-gradient);
  background-size: cover; background-position: center;
}
.cosmic-bg.has-image {
  background-image: var(--theme-bg-image);
  background-size: cover; background-position: center;
}
/* Dark overlay so content is readable */
.cosmic-bg.has-image::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
}
.cosmic-aurora {
  position: absolute; border-radius: 50%; filter: blur(160px); opacity: 0.45;
  animation: auroraDrift 24s ease-in-out infinite;
  mix-blend-mode: screen;
}
.cosmic-aurora-1 {
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, var(--aurora-color-1) 0%, var(--aurora-mid-1) 30%, var(--aurora-end-1) 55%, transparent 75%);
  top: -30%; left: -20%; animation-delay: 0s;
}
.cosmic-aurora-2 {
  width: 750px; height: 550px;
  background: radial-gradient(ellipse, var(--aurora-color-2) 0%, var(--aurora-mid-2) 30%, var(--aurora-end-2) 55%, transparent 75%);
  bottom: -25%; right: -15%; animation-delay: -9s;
}
.cosmic-aurora-3 {
  width: 550px; height: 450px;
  background: radial-gradient(ellipse, var(--aurora-color-3) 0%, var(--aurora-mid-3) 30%, var(--aurora-end-3) 55%, transparent 75%);
  top: 45%; left: 60%; animation-delay: -17s;
}
@keyframes auroraDrift {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(5%, -3%) scale(1.06) rotate(1deg); }
  50% { transform: translate(-3%, 4%) scale(0.95) rotate(-0.5deg); }
  75% { transform: translate(4%, 2%) scale(1.04) rotate(0.5deg); }
}

#starfield { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; }

.cosmic-meteor {
  position: absolute; width: 2px; height: 100px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), var(--meteor-color), transparent);
  border-radius: 1px; top: 15%; left: -5%;
  animation: meteorShoot 9s ease-in infinite; animation-delay: 4s;
  box-shadow: 0 0 6px rgba(180,220,255,0.4);
}
@keyframes meteorShoot {
  0% { transform: translateX(0) translateY(0) rotate(-35deg); opacity: 0; }
  3% { opacity: 1; }
  12% { transform: translateX(700px) translateY(450px) rotate(-35deg); opacity: 0; }
  100% { transform: translateX(700px) translateY(450px) rotate(-35deg); opacity: 0; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ══════════ Theme Switcher ══════════ */
.theme-switcher { display: flex; gap: 4px; align-items: center; margin-right: 8px; }
.theme-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  cursor: pointer; transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.theme-dot:hover { transform: scale(1.2); border-color: rgba(255,255,255,0.6); }
.theme-dot.active {
  border-color: #fff;
  transform: scale(1.25);
  box-shadow: 0 0 0 2px var(--primary), 0 0 12px var(--primary-glow);
}
.theme-dot-cosmic { background: linear-gradient(135deg, #00D4AA, #7C5CFC); }
.theme-dot-desert { background: linear-gradient(135deg, #D4A84B, #E07B4C); }
.theme-dot-forest { background: linear-gradient(135deg, #059669, #84CC16); }
.theme-dot-flame { background: linear-gradient(135deg, #F97316, #EF4444); }

/* ══════════ Navbar ══════════ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-xl); height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.3px; color: var(--navy); }
.nav-brand-icon {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--aurora-gradient);
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800; color: white;
  box-shadow: 0 2px 16px var(--primary-glow);
}

.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-link {
  padding: 8px 16px; border-radius: var(--r-md);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out);
}
.nav-link:hover { color: var(--primary); background: var(--primary-glow); }
.nav-link.active {
  color: var(--primary); font-weight: 600;
  background: var(--primary-glow);
  border: 1px solid var(--border-active);
}

.nav-dropdown { position: relative; }
.nav-dropdown-trigger { display: inline-flex; align-items: center; gap: 4px; }
.dd-arrow { font-size: 9px; transition: transform 180ms var(--ease-out); }
.nav-dropdown:hover .dd-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xl), var(--shadow-glow-purple);
  padding: 6px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: all 200ms var(--ease-out); z-index: 120;
}
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dd-item {
  display: block; padding: 10px 14px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 500; color: var(--text);
  text-decoration: none; transition: all 120ms; white-space: nowrap;
}
.dd-item:hover { background: var(--surface-2); color: var(--primary); }

.nav-stock-search { position: relative; flex: 0 1 340px; margin: 0 16px; }
#stock-search-input {
  width: 100%; height: 38px; padding: 0 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 14px;
  font-family: var(--font-sans); outline: none;
  transition: all var(--duration-fast) var(--ease-out);
}
#stock-search-input::placeholder { color: var(--text-tertiary); }
#stock-search-input:focus {
  border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-glow);
}
#stock-search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  max-height: 420px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  display: none; z-index: 110; padding: 6px;
}

.nav-clock { font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); padding: 4px 10px; border-radius: var(--r-md); background: var(--surface-2); font-variant-numeric: tabular-nums; }
.nav-data-status { margin-left: 6px; }

.data-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 6px; letter-spacing: 0.3px; }
.data-badge-live { color: var(--positive); background: var(--positive-soft); border: 1px solid rgba(0,212,170,0.25); }
.data-badge-mock { color: var(--warning); background: var(--warning-soft); border: 1px solid rgba(245,158,11,0.2); }
.data-live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 8px var(--positive-glow, rgba(0,212,170,0.6)); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

/* ══════════ Container ══════════ */
.container { max-width: 1360px; margin: 0 auto; padding: var(--space-xl) var(--space-lg); position: relative; z-index: 1; }
.page-header { margin-bottom: var(--space-2xl); }
.page-title {
  font-family: var(--font-display); font-size: 38px; font-weight: 800; letter-spacing: -0.8px;
  color: var(--text);
  margin-bottom: 10px; line-height: 1.2;
}
.page-title-accent {
  background: var(--aurora-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-subtitle { font-size: 15px; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; line-height: 1.6; }

/* ══════════ Cards ══════════ */
.card { background: var(--surface-glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: var(--space-lg); transition: all var(--duration-normal) var(--ease-out); position: relative; overflow: hidden; }
.card-glass { background: var(--surface-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border); }
.card-elevated { box-shadow: var(--shadow-sm); transition: all var(--duration-normal) var(--ease-out); }
.card-elevated:hover { box-shadow: var(--shadow-lg), var(--shadow-glow); transform: translateY(-2px); border-color: var(--border-active); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-md); }
.card-title { font-size: 16px; font-weight: 700; color: var(--navy); letter-spacing: -0.2px; }
.card-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  background: var(--aurora-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase; margin-bottom: 6px;
}

/* ══════════ Grid ══════════ */
.grid { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

/* ══════════ KPI ══════════ */
.kpi { background: var(--surface); border: 1px solid var(--border);; border-radius: var(--r-lg); padding: var(--space-lg); transition: all var(--duration-normal) var(--ease-out); position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--aurora-gradient); opacity: 0; transition: opacity var(--duration-normal) var(--ease-out); }
.kpi:hover { box-shadow: var(--shadow-md), var(--shadow-glow); transform: translateY(-2px); border-color: var(--border-active); }
.kpi:hover::before { opacity: 1; }
.kpi-label { font-size: 10px; font-weight: 600; letter-spacing: 1px; color: var(--text-tertiary); text-transform: uppercase; margin-bottom: 8px; }
.kpi-value { font-size: 34px; font-weight: 800; margin: 6px 0; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; font-family: var(--font-display); color: var(--navy); line-height: 1.15; }
.kpi-delta { font-size: 13px; margin-top: 6px; color: var(--text-secondary); font-variant-numeric: tabular-nums; line-height: 1.5; }

/* ══════════ Sector Cards ══════════ */
.sector-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--space-lg); overflow: hidden; transition: all var(--duration-normal) var(--ease-out); cursor: pointer; }
.sector-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--sector-accent, var(--primary)), transparent); opacity: 0; transition: opacity var(--duration-fast) var(--ease-out); }
.sector-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at top left, var(--primary-glow), transparent 60%); opacity: 0; transition: opacity 400ms; }
.sector-card:hover { border-color: var(--sector-accent, var(--primary)); box-shadow: var(--shadow-lg), var(--shadow-glow); transform: translateY(-3px); }
.sector-card:hover::before, .sector-card:hover::after { opacity: 1; }
.sector-icon { font-size: 30px; margin-bottom: var(--space-sm); }
.sector-name { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.sector-name-en { font-size: 11px; color: var(--text-tertiary); margin-bottom: var(--space-sm); letter-spacing: 0.5px; }
.sector-tagline { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--space-md); }
.sector-meta { display: flex; justify-content: space-between; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--border); }
.sector-meta-item { font-size: 11px; color: var(--text-tertiary); }
.sector-meta-item strong { display: block; color: var(--navy); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ══════════ Tables ══════════ */
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--text-tertiary); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.tbl tr { transition: all var(--duration-fast) var(--ease-out); }
.tbl tr:hover td { background: var(--primary-glow); }
.tbl td.num { font-family: var(--font-mono); text-align: right; }
.tbl td.up { color: var(--up); font-weight: 600; }
.tbl td.down { color: var(--down); font-weight: 600; }

/* ══════════ Score / Filter / Button / Tags ══════════ */
.score-bar { position: relative; width: 64px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.score-bar-fill { position: absolute; inset: 0; border-radius: 3px; background: var(--aurora-gradient); transition: width var(--duration-slow) var(--ease-spring); }
.score-num { font-family: var(--font-mono); font-weight: 700; font-size: 13px; }
.score-high { color: var(--up); } .score-mid { color: var(--warning); } .score-low { color: var(--down); }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--space-lg); }
.filter-pill { padding: 7px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; font-weight: 500; transition: all var(--duration-fast) var(--ease-out); cursor: pointer; }
.filter-pill:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-glow); }
.filter-pill.active { background: var(--aurora-gradient); color: var(--text-inverse); border-color: transparent; box-shadow: var(--shadow-glow); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--r-md); font-size: 14px; font-weight: 600; transition: all var(--duration-fast) var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--aurora-gradient); color: var(--text-inverse); box-shadow: 0 2px 14px var(--primary-glow); }
.btn-primary:hover { box-shadow: 0 4px 24px var(--primary-glow); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-glow); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-secondary); }
.tag-up { background: var(--up-soft); color: var(--up); font-weight: 600; }
.tag-down { background: var(--down-soft); color: var(--down); font-weight: 600; }

.ai-commentary { background: linear-gradient(135deg, var(--primary-glow), rgba(124,92,252,0.03)); border: 1px solid rgba(0,212,170,0.12); border-left: 3px solid var(--primary); border-radius: var(--r-md); padding: var(--space-md) var(--space-lg); font-size: 14px; line-height: 1.8; color: var(--text-secondary); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-up { background: var(--up); box-shadow: 0 0 10px var(--positive-glow); }
.dot-down { background: var(--down); box-shadow: 0 0 10px var(--negative-glow, rgba(244,63,94,0.5)); }
.dot-neutral { background: var(--text-tertiary); }

.toast { position: fixed; bottom: 28px; right: 28px; z-index: 200; padding: 14px 22px; background: var(--aurora-gradient); color: var(--text-inverse); border-radius: var(--r-lg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-xl), var(--shadow-glow); opacity: 0; transform: translateY(12px); transition: all 280ms var(--ease-spring); pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

.loading { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--surface-3); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

.zk-reveal { opacity: 0; transform: translateY(16px); animation: revealIn 500ms var(--ease-out) forwards; }
@keyframes revealIn { to { opacity: 1; transform: translateY(0); } }
.zk-reveal:nth-child(1){animation-delay:0ms;} .zk-reveal:nth-child(2){animation-delay:50ms;}
.zk-reveal:nth-child(3){animation-delay:100ms;} .zk-reveal:nth-child(4){animation-delay:150ms;}
.zk-reveal:nth-child(5){animation-delay:200ms;} .zk-reveal:nth-child(6){animation-delay:250ms;}

.brand-geometry { position: relative; width: 48px; height: 48px; display: grid; place-items: center; }
.brand-geometry svg { width: 100%; height: 100%; }
.brand-geo-layer { transition: transform 600ms var(--ease-spring); }
.brand-geometry:hover .brand-geo-layer-1 { transform: rotate(20deg) scale(1.08); }
.brand-geometry:hover .brand-geo-layer-2 { transform: rotate(-12deg) scale(0.92); }

.progress-bar { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 3px; background: var(--aurora-gradient); transition: width 800ms var(--ease-spring); }

.kline-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.kline-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.kline-chart .grid-line { stroke: var(--border); stroke-width: 0.5; stroke-dasharray: 4 4; }
.kline-chart .candle-up { fill: var(--up); stroke: var(--up); }
.kline-chart .candle-down { fill: var(--down); stroke: var(--down); }
.kline-chart .ma5 { stroke: var(--warning); } .kline-chart .ma10 { stroke: var(--accent); } .kline-chart .ma20 { stroke: var(--accent-light); }
.kline-chart .axis-label { fill: var(--text-tertiary); font-size: 10px; font-family: var(--font-mono); }
.kline-chart .volume-up { fill: var(--up); opacity: 0.25; }
.kline-chart .volume-down { fill: var(--down); opacity: 0.25; }

/* ══════════ Utilities ══════════ */
.flex{display:flex;}.flex-between{display:flex;justify-content:space-between;align-items:center;}.flex-center{display:flex;align-items:center;gap:8px;}
.gap-xs{gap:var(--space-xs);}.gap-sm{gap:var(--space-sm);}.gap-md{gap:var(--space-md);}.gap-lg{gap:var(--space-lg);}
.mt-sm{margin-top:var(--space-sm);}.mt-md{margin-top:var(--space-md);}.mt-lg{margin-top:var(--space-lg);}.mt-xl{margin-top:var(--space-xl);}
.mb-sm{margin-bottom:var(--space-sm);}.mb-md{margin-bottom:var(--space-md);}.mb-lg{margin-bottom:var(--space-lg);}
.text-mono{font-family:var(--font-mono);font-variant-numeric:tabular-nums;}
.text-muted{color:var(--text-secondary);}.text-tertiary{color:var(--text-tertiary);}
.text-up{color:var(--up);font-weight:600;}.text-down{color:var(--down);font-weight:600;}
.font-bold{font-weight:600;}.section-divider{border:none;border-top:1px solid var(--border);margin:var(--space-2xl) 0;}
.mono-badge{display:inline-block;font-family:var(--font-mono);font-size:11px;padding:2px 8px;border-radius:4px;background:var(--surface-2);color:var(--text-tertiary);font-variant-numeric:tabular-nums;}

/* ══════════ Responsive ══════════ */
@media(max-width:1439px){.container{max-width:1100px;}.grid-6{grid-template-columns:repeat(3,1fr);}}
@media(max-width:1023px){.container{padding:var(--space-lg) var(--space-md);}.grid-4{grid-template-columns:repeat(2,1fr);}.grid-3,.grid-6{grid-template-columns:repeat(2,1fr);}.page-title{font-size:28px;}.kpi-value{font-size:26px;}}
@media(max-width:767px){.container{padding:var(--space-md) var(--space-sm);}.page-title{font-size:24px;}.grid-2,.grid-3,.grid-4,.grid-6{grid-template-columns:1fr;}.nav-stock-search{display:none;}.navbar{padding:0 var(--space-md);height:54px;}}

/* ══════════ Search / Footer / Chain ══════════ */
.ss-item{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;color:var(--text);text-decoration:none;border-radius:8px;font-size:14px;transition:background 100ms;}
.ss-item:hover,.ss-item.ss-active{background:var(--surface-2);}
.ss-name{font-weight:600;}.ss-code{font-family:var(--font-mono);font-size:12px;color:var(--text-tertiary);margin-left:4px;font-weight:400;}
.ss-role{font-size:12px;color:var(--text-tertiary);margin-top:2px;}
.ss-sector{font-size:12px;color:var(--text-secondary);background:var(--surface-2);padding:2px 8px;border-radius:4px;}

footer{border-top:1px solid var(--border);padding:var(--space-xl) var(--space-lg);text-align:center;color:var(--text-tertiary);font-size:13px;background:var(--surface);}

.chain-map{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
.sector-column{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;transition:all var(--duration-normal) var(--ease-out);}
.sector-column:hover{border-color:var(--border-strong);box-shadow:var(--shadow-md),var(--shadow-glow);}
.sector-header{padding:16px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px;font-weight:600;color:var(--navy);}
.chain-layer{padding:10px 18px;border-bottom:1px solid rgba(255,255,255,0.03);}
.chain-layer-name{font-size:10px;font-weight:600;letter-spacing:1px;color:var(--text-tertiary);text-transform:uppercase;margin-bottom:6px;}
.chain-company-item{display:inline-flex;align-items:center;gap:3px;font-size:13px;padding:4px 10px;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;color:var(--text);cursor:pointer;transition:all var(--duration-fast) var(--ease-out);text-decoration:none;}
.chain-company-item:hover{background:var(--surface-3);border-color:var(--primary);color:var(--primary);transform:translateY(-1px);}
