/* ====================================================================
   NEXUS — AI Stock Portfolio Tracker
   Plain CSS port of the original Tailwind + globals.css design system.
   No build step required — just a <link> tag.
   ==================================================================== */

/* ─── Design Tokens ─────────────────────────────────────────────── */
:root {
  --sky-deep: #0A1628;
  --sky-mid: #0D2044;
  --sky-card: #112654;
  --sky-border: #1A3A6E;
  --azure: #1D6FEB;
  --azure-soft: #4A90F5;
  --azure-dim: #0E4DB0;
  --azure-glow: #60A5FA;
  --arctic: #E8F4FF;
  --arctic-dim: #A8C8F0;
  --arctic-bright: #FFFFFF;
  --profit: #00C875;
  --profit-dim: #009959;
  --loss: #F03E3E;
  --loss-dim: #B82C2C;
  --gold: #F5C842;
  --gold-dim: #B8942E;
  --platinum: #C8D8F0;
  --platinum-dim: #7A9ABF;
  --platinum-bright: #EEF5FF;
  --phi: 1.618;

  --r-phi: 0.618rem;
  --r-phi-lg: 1rem;
  --r-phi-xl: 1.618rem;

  --fs-xs: 0.707rem;
  --fs-sm: 0.85rem;
  --fs-base: 1rem;
  --fs-lg: 1.15rem;
  --fs-xl: 1.382rem;
  --fs-2xl: 1.618rem;
  --fs-3xl: 2.058rem;

  --font-display: "Syne", sans-serif;
  --font-inter: "Inter", sans-serif;
  --font-data: "JetBrains Mono", monospace;
}

/* ─── Base Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-inter);
  background: linear-gradient(160deg, #071020 0%, #0A1628 40%, #0D2044 100%);
  color: var(--platinum);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(29, 111, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 111, 235, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--sky-deep); }
::-webkit-scrollbar-thumb { background: var(--azure-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--azure); }
::selection { background: rgba(29, 111, 235, 0.3); color: var(--arctic-bright); }

button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ─── Utility Classes ───────────────────────────────────────────── */
.glass {
  background: rgba(17, 38, 84, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(29, 111, 235, 0.15);
}
.font-display { font-family: var(--font-display); }
.font-data { font-family: var(--font-data); }

.gradient-text {
  background: linear-gradient(135deg, #60A5FA 0%, #FFFFFF 50%, #93C5FD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes scanLine { 0% { top: 0%; } 100% { top: 100%; } }
@keyframes nodeBlink { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 1; transform: scale(1.5); } }
@keyframes spin-cw { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* ─── Layout ─────────────────────────────────────────────────────── */
.nx-main { position: relative; min-height: 100dvh; z-index: 10; }

.nx-header {
  position: relative;
  z-index: 10;
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
}

.nx-brand { display: flex; align-items: center; gap: 0.75rem; animation: fadeUp 0.6s cubic-bezier(.22,1,.36,1); }
.nx-brand-icon {
  width: 2.5rem; height: 2.5rem; border-radius: var(--r-phi);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(29,111,235,0.3), rgba(74,144,245,0.15));
  border: 1px solid rgba(29, 111, 235, 0.4);
  box-shadow: 0 0 20px rgba(29, 111, 235, 0.2);
  color: #4A90F5;
}
.nx-brand h1 { margin: 0; font-size: var(--fs-xl); font-weight: 700; line-height: 1; }
.nx-brand p { margin: 0; font-size: var(--fs-xs); letter-spacing: 0.15em; color: var(--platinum-dim); font-family: var(--font-data); }

.nx-header-right { display: flex; align-items: center; gap: 0.5rem; animation: fadeUp 0.6s cubic-bezier(.22,1,.36,1); }
.nx-badge {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.75rem; border-radius: 999px;
  font-size: var(--fs-xs); font-family: var(--font-data);
  background: rgba(29, 111, 235, 0.1); border: 1px solid rgba(29, 111, 235, 0.2);
  color: #4A90F5;
}
.nx-btn-reset {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.75rem; border-radius: 999px;
  font-size: var(--fs-xs); font-family: var(--font-data);
  background: rgba(240, 62, 62, 0.08); border: 1px solid rgba(240, 62, 62, 0.2);
  color: #F03E3E; transition: transform 0.15s ease, background 0.2s ease;
}
.nx-btn-reset:hover { transform: scale(1.05); background: rgba(240, 62, 62, 0.14); }
.nx-btn-reset:active { transform: scale(0.95); }

.nx-container { position: relative; z-index: 10; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* ─── Error Banner ──────────────────────────────────────────────── */
.nx-error-banner {
  display: flex; align-items: flex-start; gap: 0.75rem;
  border-radius: var(--r-phi); padding: 1rem; margin-bottom: 1.5rem;
  background: rgba(240, 62, 62, 0.08); border: 1px solid rgba(240, 62, 62, 0.25);
  animation: fadeUp 0.3s ease;
}
.nx-error-banner svg { color: #F03E3E; flex-shrink: 0; margin-top: 2px; }
.nx-error-banner p { margin: 0; flex: 1; font-size: var(--fs-sm); color: var(--platinum-bright); }
.nx-error-banner button { background: none; border: none; color: var(--platinum-dim); padding: 0; display: flex; flex-shrink: 0; }
.nx-error-banner button:hover { color: #F03E3E; }

/* ─── Upload Section ────────────────────────────────────────────── */
.nx-upload-section {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 80vh; gap: 2rem; animation: fadeUp 0.5s cubic-bezier(.22,1,.36,1);
}
.nx-hero { text-align: center; animation: fadeUp 0.7s cubic-bezier(.22,1,.36,1) 0.1s backwards; }
.nx-hero h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-3xl); line-height: 1.2; margin: 0; }
.nx-hero p { font-size: var(--fs-base); margin: 0.75rem auto 0; max-width: 32rem; color: var(--platinum-dim); }

.nx-dropzone-wrap { width: 100%; max-width: 42rem; animation: scaleIn 0.6s cubic-bezier(.22,1,.36,1) 0.2s backwards; }

.nx-feature-pills { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; animation: fadeIn 0.4s ease 0.5s backwards; }
.nx-pill {
  padding: 0.5rem 1rem; border-radius: 999px; font-size: var(--fs-xs); font-family: var(--font-data);
  background: rgba(17, 38, 84, 0.6); border: 1px solid rgba(29, 111, 235, 0.18); color: #A8C8F0;
}

.nx-cancel-add-more { background: none; border: none; font-size: var(--fs-sm); font-family: var(--font-data); color: var(--platinum-dim); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ─── DropZone ───────────────────────────────────────────────────── */
.nx-dropzone {
  position: relative; cursor: pointer; border-radius: var(--r-phi-lg);
  transition: all 0.3s ease; user-select: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 2.5rem; aspect-ratio: 16/9;
  border: 2px dashed rgba(29, 111, 235, 0.25);
  background: rgba(17, 38, 84, 0.3);
  animation: fadeIn 0.3s ease;
}
.nx-dropzone.is-drag-active { border-color: rgba(29, 111, 235, 0.8); background: rgba(29, 111, 235, 0.06); }
.nx-dropzone input[type="file"] { display: none; }

.nx-dropzone-orbit { position: relative; width: 4rem; height: 4rem; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.nx-dropzone.is-drag-active .nx-dropzone-orbit { transform: scale(1.15) rotate(5deg); }
.nx-orbit-ring { position: absolute; inset: 0; border-radius: 999px; border: 1px solid rgba(29, 111, 235, 0.3); transform: scale(2.2); animation: spin-cw 12s linear infinite; }
.nx-orbit-ring--gold { border-color: rgba(245, 200, 66, 0.18); transform: scale(1.6); animation: spin-ccw 8s linear infinite; }
.nx-orbit-core { position: relative; width: 4rem; height: 4rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(29, 111, 235, 0.15); color: #4A90F5; }

.nx-dropzone-text { text-align: center; margin-top: 1rem; }
.nx-dropzone-text p:first-child { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); color: var(--platinum-bright); margin: 0; }
.nx-dropzone-text p:nth-child(2) { font-size: var(--fs-sm); margin: 0.25rem 0 0; color: var(--platinum-dim); }
.nx-dropzone-text p:nth-child(2) span { color: #4A90F5; text-decoration: underline; text-underline-offset: 2px; }
.nx-dropzone-text p:last-child { font-size: var(--fs-xs); font-family: var(--font-data); margin: 0.75rem 0 0; color: var(--platinum-dim); }

.nx-dropzone-footer { position: absolute; bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-xs); font-family: var(--font-data); color: rgba(29, 111, 235, 0.6); }

.nx-drop-error { font-size: var(--fs-xs); font-family: var(--font-data); text-align: center; margin-top: 0.5rem; color: #F03E3E; animation: fadeUp 0.2s ease; }

/* ─── Preview / Analyzing overlay ──────────────────────────────────── */
.nx-preview { position: relative; border-radius: var(--r-phi-lg); overflow: hidden; aspect-ratio: 16/9; animation: scaleIn 0.4s cubic-bezier(.22,1,.36,1); }
.nx-preview img { width: 100%; height: 100%; object-fit: contain; background: #071020; }

.nx-scan-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(7, 16, 32, 0.82); animation: fadeIn 0.3s ease;
}
.nx-scan-line { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #1D6FEB, transparent); animation: scanLine 1.8s linear infinite; }
.nx-scan-icon { margin-bottom: 1rem; animation: spin-cw 1.5s linear infinite; color: #1D6FEB; }
.nx-scan-overlay p:first-of-type { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); }
.nx-scan-overlay p:last-of-type { font-size: var(--fs-sm); font-family: var(--font-data); margin-top: 0.25rem; color: var(--platinum-dim); }
.nx-scan-dots { display: flex; gap: 0.5rem; margin-top: 1rem; }
.nx-scan-dots span { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: #1D6FEB; animation: pulse-dot 0.8s ease-in-out infinite; }
.nx-scan-dots span:nth-child(2) { animation-delay: 0.25s; }
.nx-scan-dots span:nth-child(3) { animation-delay: 0.5s; }

.nx-preview-clear {
  position: absolute; top: 0.75rem; right: 0.75rem; width: 2rem; height: 2rem; border-radius: 999px;
  background: rgba(17, 38, 84, 0.55); backdrop-filter: blur(14px); border: 1px solid rgba(29, 111, 235, 0.15);
  display: flex; align-items: center; justify-content: center; color: var(--platinum-dim); border: none;
  transition: transform 0.15s ease;
}
.nx-preview-clear:hover { transform: scale(1.1); }

/* ─── Dashboard Section ─────────────────────────────────────────────── */
.nx-dashboard { animation: fadeIn 0.4s ease; }
.nx-dashboard-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.nx-dashboard-head h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2xl); margin: 0; }
.nx-dashboard-head p { font-size: var(--fs-sm); font-family: var(--font-data); margin: 0.125rem 0 0; color: var(--platinum-dim); }
.nx-btn-add {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: var(--r-phi);
  font-size: var(--fs-sm); font-family: var(--font-display); font-weight: 600;
  background: rgba(29, 111, 235, 0.15); border: 1px solid rgba(29, 111, 235, 0.35); color: #4A90F5;
  transition: transform 0.15s ease;
}
.nx-btn-add:hover { transform: scale(1.04); }
.nx-btn-add:active { transform: scale(0.96); }

/* ─── Stat Cards ─────────────────────────────────────────────────────── */
.nx-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 1024px) { .nx-stat-grid { grid-template-columns: repeat(4, 1fr); } }

.nx-stat-card {
  position: relative; border-radius: var(--r-phi-lg); padding: 1.25rem; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.75rem;
  background: rgba(17, 38, 84, 0.6); backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(29,111,235,0.07), inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid rgba(29, 111, 235, 0.18);
  animation: fadeUp 0.5s cubic-bezier(.22,1,.36,1) backwards;
  transition: transform 0.2s ease;
}
.nx-stat-card:hover { transform: translateY(-3px); }
.nx-stat-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 6rem; height: 6rem; border-radius: 999px;
  pointer-events: none; transform: translate(30%, -30%);
  background: radial-gradient(circle, rgba(29,111,235,0.08) 0%, transparent 70%);
}
.nx-stat-card--profit { border-color: rgba(0, 200, 117, 0.22); box-shadow: 0 4px 24px rgba(0,200,117,0.07), inset 0 1px 0 rgba(255,255,255,0.06); }
.nx-stat-card--profit::before { background: radial-gradient(circle, rgba(0,200,117,0.08) 0%, transparent 70%); }
.nx-stat-card--loss { border-color: rgba(240, 62, 62, 0.22); box-shadow: 0 4px 24px rgba(240,62,62,0.07), inset 0 1px 0 rgba(255,255,255,0.06); }
.nx-stat-card--loss::before { background: radial-gradient(circle, rgba(240,62,62,0.08) 0%, transparent 70%); }
.nx-stat-card--azure { border-color: rgba(29, 111, 235, 0.3); box-shadow: 0 4px 24px rgba(29,111,235,0.1), inset 0 1px 0 rgba(255,255,255,0.06); }
.nx-stat-card--azure::before { background: radial-gradient(circle, rgba(29,111,235,0.1) 0%, transparent 70%); }

.nx-stat-top { display: flex; align-items: center; justify-content: space-between; }
.nx-stat-label { font-size: var(--fs-xs); font-family: var(--font-data); text-transform: uppercase; letter-spacing: 0.12em; color: var(--platinum-dim); }
.nx-stat-icon { width: 2.25rem; height: 2.25rem; border-radius: var(--r-phi); display: flex; align-items: center; justify-content: center; background: rgba(29, 111, 235, 0.12); color: #4A90F5; }
.nx-stat-card--profit .nx-stat-icon { background: rgba(0, 200, 117, 0.12); color: #00C875; }
.nx-stat-card--loss .nx-stat-icon { background: rgba(240, 62, 62, 0.12); color: #F03E3E; }
.nx-stat-card--azure .nx-stat-icon { background: rgba(29, 111, 235, 0.18); color: #1D6FEB; }

.nx-stat-value { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2xl); line-height: 1; margin: 0; color: var(--platinum-bright); }
.nx-stat-card--profit .nx-stat-value { color: #00C875; }
.nx-stat-card--loss .nx-stat-value { color: #F03E3E; }
.nx-stat-card--azure .nx-stat-value { color: #93C5FD; }
.nx-stat-sub { font-size: var(--fs-xs); font-family: var(--font-data); margin: 0.25rem 0 0; color: var(--platinum-dim); }

/* ─── Main grid: golden-ratio 2-col ───────────────────────────────────── */
.nx-main-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 1280px) { .nx-main-grid { grid-template-columns: 61.8fr 38.2fr; } }
.nx-col { display: flex; flex-direction: column; gap: 1.5rem; }

.nx-panel {
  border-radius: var(--r-phi-lg); padding: 1.5rem;
  background: rgba(17, 38, 84, 0.6); border: 1px solid rgba(29, 111, 235, 0.15);
  backdrop-filter: blur(14px); box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  animation: fadeUp 0.5s cubic-bezier(.22,1,.36,1) backwards;
}
.nx-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.nx-panel-head h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-base); margin: 0; color: var(--platinum-bright); }
.nx-live-pill { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-xs); font-family: var(--font-data); color: rgba(29, 111, 235, 0.7); }
.nx-live-dot { width: 0.375rem; height: 0.375rem; border-radius: 999px; background: #1D6FEB; animation: pulse-dot 1.5s ease-in-out infinite; }

/* ─── Holdings Table ─────────────────────────────────────────────────── */
.nx-table-wrap { width: 100%; overflow-x: auto; }
.nx-table { width: 100%; border-collapse: collapse; }
.nx-table th {
  text-align: left; padding-bottom: 0.75rem; font-size: var(--fs-xs); font-family: var(--font-data);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--platinum-dim);
  border-bottom: 1px solid rgba(29, 111, 235, 0.15); white-space: nowrap; padding-right: 1rem;
}
.nx-table th:first-child { padding-right: 0.75rem; padding-left: 0; }
.nx-table td { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid rgba(29, 111, 235, 0.07); white-space: nowrap; }
.nx-table tr { animation: fadeUp 0.4s cubic-bezier(.22,1,.36,1) backwards; }
.nx-table-idx { font-family: var(--font-data); font-size: var(--fs-xs); color: rgba(29, 111, 235, 0.5); }
.nx-table-name { display: flex; align-items: center; gap: 0.5rem; }
.nx-table-avatar {
  width: 2rem; height: 2rem; border-radius: var(--r-phi); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs);
  color: #93C5FD; border: 1px solid rgba(29, 111, 235, 0.2);
}
.nx-table-stockname { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--platinum-bright); }
.nx-table td span.mono { font-family: var(--font-data); font-size: var(--fs-sm); color: #C8D8F0; }
.nx-table-pnl-cell { display: flex; align-items: center; gap: 0.375rem; }

/* ─── Allocation bars ───────────────────────────────────────────────── */
.nx-alloc-row { display: flex; flex-direction: column; gap: 0.25rem; animation: fadeUp 0.3s ease backwards; }
.nx-alloc-top { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-xs); }
.nx-alloc-name { font-family: var(--font-display); font-weight: 500; color: #C8D8F0; }
.nx-alloc-pct { font-family: var(--font-data); color: var(--platinum-dim); }
.nx-alloc-track { height: 0.375rem; border-radius: 999px; overflow: hidden; background: rgba(29, 111, 235, 0.1); }
.nx-alloc-bar { height: 100%; border-radius: 999px; transition: width 0.7s cubic-bezier(.22,1,.36,1); }
.nx-alloc-bar--profit { background: linear-gradient(90deg, rgba(0,200,117,0.6), rgba(0,200,117,0.9)); }
.nx-alloc-bar--loss { background: linear-gradient(90deg, rgba(240,62,62,0.6), rgba(240,62,62,0.9)); }

/* ─── Weakest position warning ──────────────────────────────────────── */
.nx-warning { border-radius: var(--r-phi); padding: 1rem; display: flex; gap: 0.75rem; background: rgba(240, 62, 62, 0.06); border: 1px solid rgba(240, 62, 62, 0.2); animation: fadeIn 0.4s ease; }
.nx-warning svg { color: #F03E3E; flex-shrink: 0; }
.nx-warning p:first-child { font-size: var(--fs-xs); font-family: var(--font-display); font-weight: 600; margin: 0; color: #F03E3E; }
.nx-warning p:last-child { font-size: var(--fs-xs); font-family: var(--font-data); margin: 0.25rem 0 0; color: var(--platinum-dim); }

.nx-disclaimer { font-size: var(--fs-xs); text-align: center; font-family: var(--font-data); color: rgba(122,154,191,0.5); margin: 0; }

/* ─── Chart ──────────────────────────────────────────────────────────── */
.nx-chart-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-base); margin: 0 0 1rem; color: #C8D8F0; }
.nx-chart-svg-wrap { position: relative; width: 100%; }
.nx-chart-legend { display: flex; gap: 1.5rem; margin-top: 0.75rem; justify-content: center; }
.nx-chart-legend-item { display: flex; align-items: center; gap: 0.5rem; }
.nx-chart-legend-swatch { width: 0.75rem; height: 0.75rem; border-radius: 2px; }
.nx-chart-legend-label { font-size: var(--fs-xs); font-family: var(--font-data); color: var(--platinum-dim); }
.nx-chart-tooltip {
  position: absolute; pointer-events: none; border-radius: var(--r-phi); padding: 0.75rem;
  font-size: var(--fs-xs); font-family: var(--font-data); background: rgba(13, 32, 68, 0.97);
  border: 1px solid rgba(29, 111, 235, 0.3); backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.15s ease; z-index: 20; white-space: nowrap;
}
.nx-chart-tooltip.is-visible { opacity: 1; }
.nx-chart-tooltip p { margin: 0; }
.nx-chart-tooltip p:first-child { font-family: var(--font-display); font-weight: 600; margin-bottom: 0.5rem; color: var(--platinum-bright); }

/* ─── Error (full) state ────────────────────────────────────────────── */
.nx-error-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 1.5rem; text-align: center; animation: fadeIn 0.4s ease; }
.nx-error-icon { width: 5rem; height: 5rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(240, 62, 62, 0.1); border: 1px solid rgba(240,62,62,0.3); color: #F03E3E; }
.nx-error-state h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2xl); margin: 0; color: var(--platinum-bright); }
.nx-error-state p { font-size: var(--fs-base); margin: 0.5rem auto 0; max-width: 28rem; color: var(--platinum-dim); }
.nx-btn-retry {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: var(--r-phi);
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm);
  background: linear-gradient(135deg, rgba(29,111,235,0.8), rgba(29,111,235,0.5));
  border: 1px solid rgba(29, 111, 235, 0.4); color: #EEF5FF; transition: opacity 0.2s ease;
}
.nx-btn-retry:hover { opacity: 0.9; }

/* ─── Helpers ────────────────────────────────────────────────────────── */
.nx-hidden { display: none !important; }
canvas#nx-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.5; }
