/* ============================================================
   MaB — Design System v2
   Dark theme editorial per analisi macro trading
   Typography: Inter (body) + IBM Plex Mono (numbers/brand)
   Brand: #E8A020 (unified with landing)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* === Typography === */
  --font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  --font-display: 'Inter', system-ui, sans-serif;
  /* Legacy alias per retrocompatibilità */
  --font:         'Inter', system-ui, -apple-system, sans-serif;

  --fs-xs:      11px;
  --fs-sm:      13px;
  --fs-base:    14px;
  --fs-md:      16px;
  --fs-lg:      20px;
  --fs-xl:      28px;
  --fs-2xl:     40px;
  --fs-3xl:     56px;
  --fs-display: clamp(64px, 8vw, 112px);

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --lh-tight:   1.1;
  --lh-snug:    1.3;
  --lh-normal:  1.55;
  --lh-relaxed: 1.7;

  --tracking-tight:  -0.03em;
  --tracking-snug:   -0.015em;
  --tracking-normal: 0;
  --tracking-wide:   0.08em;

  /* === Spacing — 4px grid === */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 56px;
  --space-16: 80px;
  --space-20: 120px;

  /* === Brand colors === */
  --brand:       #E8A020;
  --brand-hi:    #F5B840;
  --brand-lo:    #C8880A;
  --brand-wash:  rgba(232, 160, 32, 0.08);
  --brand-edge:  rgba(232, 160, 32, 0.22);
  --brand-glow:  rgba(232, 160, 32, 0.35);

  /* === Backgrounds (levels of elevation) === */
  --bg-0: #08090c;   /* page background */
  --bg-1: #0e1016;   /* section / panel */
  --bg-2: #151821;   /* card */
  --bg-3: #1c202b;   /* card hover / elevated */
  --bg-4: #242836;   /* input / inner */

  /* Legacy aliases */
  --bg-primary:    var(--bg-0);
  --bg-secondary:  var(--bg-1);
  --bg-card:       var(--bg-2);
  --bg-card-hover: var(--bg-3);

  /* === Borders === */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-soft:   rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);
  /* Legacy */
  --border:        var(--border-soft);
  --border-light:  var(--border-strong);

  /* === Text levels === */
  --text-hi:  #f4f5f8;
  --text-md:  #b4b8c5;
  --text-lo:  #6e7385;
  --text-dim: #464a58;
  /* Legacy aliases */
  --text-primary:   var(--text-hi);
  --text-secondary: var(--text-md);
  --text-muted:     var(--text-lo);

  /* === Semantic colors === */
  --bull:   #2fc77a;
  --bear:   #e85757;
  --warn:   #f2b544;
  --info:   #4a9eff;
  /* Legacy aliases */
  --accent:         var(--brand);
  --accent-dim:     var(--brand-wash);
  --accent-forex:   var(--info);
  --accent-forex-dim: rgba(74, 158, 255, 0.13);
  --accent-gold:    var(--brand);
  --accent-gold-dim: var(--brand-wash);
  --accent-green:   var(--bull);
  --accent-red:     var(--bear);

  /* === Shadows / elevation === */
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg:    0 12px 32px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-xl:    0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-brand: 0 8px 28px rgba(232, 160, 32, 0.22);

  /* === Radii === */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;
  /* Legacy */
  --radius:      var(--radius-md);

  /* === Transitions === */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-snap:   cubic-bezier(0.2, 0.9, 0.3, 1.2);
  --dur-fast:    140ms;
  --dur-base:    220ms;
  --dur-slow:    380ms;

  /* === Misc === */
  --navbar-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg-0);
  color: var(--text-hi);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  min-height: 100vh;
  font-feature-settings: "cv11", "ss01", "ss03"; /* Inter stylistic alternates */
}

a { text-decoration: none; color: inherit; }

/* Numeri monospace con cifre tabulari ovunque (previene il "jitter" al refresh) */
.mono,
.font-mono,
code,
pre,
.score-value,
.stat-value,
.cr-value,
[class*="cr-"],
[class*="tf-val"],
[class*="score-"],
[class*="-score"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Anche tabelle e SVG text usano tabular nums per evitare "balli" di larghezza */
table, svg text {
  font-variant-numeric: tabular-nums;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.navbar-brand,
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-right: 8px;
  flex-shrink: 0;
  line-height: 1;
}

/* Cursor pointer per suggerire che il logo è interattivo */
.nav-logo { cursor: pointer; }

/* ── Logo: reveal + hover uniformi via transition ──
   Approccio: un unico sistema (transition) usato sia per la reveal iniziale che
   per l'hover, invece di mischiare @keyframes animation + transition (che non
   si interpolano l'uno nell'altro e causano snap visibili).

   - Stato baseline (nessuna classe, no hover) = logo "aperto": parentesi a 0,
     word visibile.
   - Stato "chiuso" = parentesi translate verso il centro, word svanito.
     Applicato da:
       a) .nav-logo--animated (al caricamento pagina, rimossa via JS dopo il
          primo paint → transizione fluida dallo stato chiuso all'aperto = reveal)
       b) .nav-logo:hover (mouse sopra → transizione fluida al chiuso = effetto
          "chiusura", al mouse out ritorna all'aperto con stessa transition)

   Vantaggio: hover e reveal condividono gli stessi valori finali/iniziali, quindi
   passare da uno all'altro è sempre una transition interpolata, mai uno snap. */

.logo-bracket {
  color: var(--brand);
  display: inline-block;
  transition: transform 420ms var(--ease-smooth), opacity 320ms var(--ease-out);
}
.logo-word {
  display: inline-block;
  transition: opacity 300ms var(--ease-out),
              transform 420ms var(--ease-smooth),
              letter-spacing 420ms var(--ease-smooth);
}

/* Stato "chiuso" condiviso da reveal iniziale E da hover */
.nav-logo--animated .logo-bracket--left,
.nav-logo:hover .logo-bracket--left {
  transform: translateX(0.65em);
}
.nav-logo--animated .logo-bracket--right,
.nav-logo:hover .logo-bracket--right {
  transform: translateX(-0.65em);
}
.nav-logo--animated .logo-word,
.nav-logo:hover .logo-word {
  opacity: 0;
  transform: scale(0.82);
  letter-spacing: -0.15em;
}

/* Stagger leggero per la reveal: le parentesi partono subito, la word con delay */
.nav-logo--animated .logo-word {
  transition-delay: 80ms;
}

@media (prefers-reduced-motion: reduce) {
  .logo-bracket,
  .logo-word {
    transition: none;
  }
  .nav-logo--animated .logo-bracket--left,
  .nav-logo--animated .logo-bracket--right,
  .nav-logo--animated .logo-word,
  .nav-logo:hover .logo-bracket--left,
  .nav-logo:hover .logo-bracket--right,
  .nav-logo:hover .logo-word {
    transform: none;
    opacity: 1;
    letter-spacing: normal;
  }
}

.brand-icon { color: var(--brand); font-size: 20px; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  /* IMPORTANTE: niente overflow-x qui, altrimenti il dropdown "Analisi Macro"
     con position:absolute viene clippato in verticale (regola W3C:
     overflow-x: auto implica overflow-y: hidden). Il wrapping non è più un
     rischio perché il dropdown ha collassato 4 voci in 1. */
}

.nav-link {
  position: relative;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);          /* 13px: più compatto, restano tutti su 1 riga */
  font-weight: var(--fw-medium);
  color: var(--text-md);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-base) var(--ease-smooth);
}

.nav-link:hover:not(.disabled) {
  color: var(--text-hi);
  background: var(--bg-2);
}

.nav-link:hover:not(.disabled)::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--text-hi);
  background: var(--bg-2);
}

/* Disabilita underline sui link nav-primary (Dashboard) — hanno già il loro stile */
.nav-link.nav-primary::after { display: none; }

.nav-link.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Dashboard è il link "hub" — sempre evidenziato con un leggero sfondo giallo */
.nav-link.nav-primary {
  color: #E8A020;
  background: rgba(232, 160, 32, 0.08);
  border: 1px solid rgba(232, 160, 32, 0.18);
}
.nav-link.nav-primary:hover {
  color: #E8A020;
  background: rgba(232, 160, 32, 0.15);
}
.nav-link.nav-primary.active {
  background: rgba(232, 160, 32, 0.22);
  border-color: rgba(232, 160, 32, 0.35);
  color: #ffffff;
}

/* Separatore verticale sottile tra gruppi di link nella navbar */
.nav-separator {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ── Dropdown "Analisi Macro" ──────────────────────────── */
/* Wrapper del dropdown: position relative per ancorare il pannello */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* Trigger: voce cliccabile/hoverabile con chevron */
.nav-dropdown__trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-md);
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.nav-dropdown__trigger:hover,
.nav-dropdown.is-open .nav-dropdown__trigger {
  color: var(--text-hi);
  background: var(--bg-2);
}

.nav-dropdown__trigger.active {
  color: var(--text-hi);
  background: var(--bg-2);
}

/* Chevron piccolo che ruota quando il pannello è aperto */
.nav-dropdown__chevron {
  width: 10px;
  height: 10px;
  margin-left: 2px;
  transition: transform var(--dur-base) var(--ease-smooth);
  opacity: 0.7;
}

.nav-dropdown:hover .nav-dropdown__chevron,
.nav-dropdown.is-open .nav-dropdown__chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* Underline animato sul trigger, identico a .nav-link */
.nav-dropdown__trigger::after {
  content: '';
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-base) var(--ease-smooth);
}

.nav-dropdown:hover .nav-dropdown__trigger::after,
.nav-dropdown.is-open .nav-dropdown__trigger::after {
  transform: scaleX(1);
}

/* Pannello del menu */
.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 200px;
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 200;

  /* Stato chiuso: invisibile e non interattivo */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-smooth),
              visibility var(--dur-base) var(--ease-out);
}

/* "Ponte invisibile" — un pseudo-elemento prima del menu che copre il gap
   tra trigger e pannello (10px), così spostare il mouse dal trigger al menu
   non perde mai il :hover del .nav-dropdown parent. */
.nav-dropdown__menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

/* Aperto via hover (desktop) */
.nav-dropdown:hover .nav-dropdown__menu,
/* Aperto via click (mobile/keyboard) */
.nav-dropdown.is-open .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Voci del menu */
.nav-dropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-md);
  white-space: nowrap;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              padding-left var(--dur-fast) var(--ease-out);
}

.nav-dropdown__item:hover:not(.disabled) {
  color: var(--text-hi);
  background: var(--bg-3);
  border-left-color: var(--brand);
  padding-left: 14px;
}

.nav-dropdown__item.active {
  color: var(--brand);
  background: var(--brand-wash);
  border-left-color: var(--brand);
}

.nav-dropdown__item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Badge "soon" accanto alle voci disabilitate */
.nav-dropdown__badge {
  font-size: 9px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-lo);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}
.navbar-right #nav-username {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Language switcher (sub-pages internal nav) ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.lang-btn:hover, .lang-btn.active { color: var(--brand); }
.lang-sep { color: var(--border); font-size: 12px; }

.update-badge {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--brand);
  color: #0a0b0e;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              filter var(--dur-fast) var(--ease-out);
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: var(--shadow-brand);
}
.btn-primary:active { filter: brightness(0.95); }
.btn-primary.full-width { width: 100%; padding: 12px; }

.btn-outline {
  background: transparent;
  color: var(--text-md);
  border: 1px solid var(--border-strong);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.btn-outline:hover {
  border-color: var(--brand-edge);
  color: var(--text-hi);
  background: var(--brand-wash);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--bg-card-hover); }

/* ── Login Overlay ────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
}

.login-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 24px;
  text-align: center;
}

.login-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-muted); }

.form-error {
  color: var(--accent-red);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 18px;
}

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  padding-top: calc(var(--navbar-height) + 40px);
  padding-left: 40px;
  padding-right: 40px;
  padding-bottom: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  margin-bottom: 48px;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin-bottom: 32px;
}

.accent { color: var(--accent); }

.hero-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  min-width: 140px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Sections grid ────────────────────────────────────────── */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.section-card {
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.section-card.active-card:hover {
  border-color: var(--brand-edge);
  background: var(--bg-3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.section-card.coming-soon {
  opacity: 0.5;
  cursor: default;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.forex-icon  { background: var(--accent-forex-dim); color: var(--accent-forex); }
.gold-icon   { background: var(--accent-gold-dim);  color: var(--accent-gold); }
.commodities-icon { background: #36c97a22; color: var(--accent-green); }
.indices-icon     { background: #a855f722; color: #a855f7; }
.crypto-icon      { background: #f9731622; color: #f97316; }

.section-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.section-badge.live {
  background: #36c97a22;
  color: var(--accent-green);
  border: 1px solid #36c97a44;
}

.section-badge.soon {
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.section-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.section-card p {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
  line-height: 1.5;
}

.section-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.score-preview {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
}

.coming-text {
  font-size: 12px;
  color: var(--text-muted);
}

.arrow {
  color: var(--text-muted);
  font-size: 16px;
  transition: transform 0.2s;
}

.section-card.active-card:hover .arrow {
  transform: translateX(4px);
  color: var(--text-primary);
}

/* ── Score colors ─────────────────────────────────────────── */
.bull   { color: var(--accent-green); }
.bear   { color: var(--accent-red); }
.neutral { color: var(--text-secondary); }

/* ── Utility ──────────────────────────────────────────────── */
.hidden { display: none !important; }

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Page header ──────────────────────────────────────────── */
.page-header {
  margin-bottom: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
}

/* ── Analysis sections ────────────────────────────────────── */
.analysis-section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Currency score cards ─────────────────────────────────── */
.currency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.currency-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}

.currency-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.currency-score {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 10px;
  line-height: 1;
}

.score-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.score-bar-fill.bull    { background: var(--accent-green); }
.score-bar-fill.bear    { background: var(--accent-red); }
.score-bar-fill.neutral { background: var(--text-muted); }

/* ── Pair score cards ─────────────────────────────────────── */
.pairs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.pair-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pair-name {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.pair-score {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.pair-bias {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.7;
}

/* ── Gold hero score ──────────────────────────────────────── */
.gold-score-hero {
  text-align: center;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gold-score-value {
  font-size: 72px;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
}

.gold-score-max {
  font-size: 18px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.gold-bias {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 8px;
}

/* ── Indicator cards ──────────────────────────────────────── */
.indicators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.indicator-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.indicator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.indicator-name {
  font-size: 14px;
  font-weight: 600;
}

.indicator-score {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.indicator-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.indicator-key {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Claude analysis ──────────────────────────────────────── */
.claude-analysis {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.claude-analysis p {
  margin-bottom: 16px;
}

.claude-analysis p:last-child {
  margin-bottom: 0;
}

/* ── Score colors ─────────────────────────────────────────── */
.bull    { color: var(--accent-green); }
.bear    { color: var(--accent-red); }
.neutral { color: var(--text-secondary); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-inner { padding: 0 16px; gap: 12px; }
  .navbar-links { display: none; }
  .main-content { padding: calc(var(--navbar-height) + 24px) 16px 40px; }
  .hero h1 { font-size: 26px; }
  .hero-stats { gap: 10px; }
  .stat-card { padding: 16px 20px; }
  .sections-grid { grid-template-columns: 1fr; }
}
