:root {
  --font-sans: "Neue Haas Grotesk Text", Arial, Helvetica, sans-serif;
  --font-display: "Neue Haas Grotesk Display", "Neue Haas Grotesk Text", Arial, Helvetica, sans-serif;
  --color-primary: #064E3B;
  --color-emerald: #059669;
  --color-gray: #64748B;
  --color-gold: #D97706;
  --color-negative: #BE123C;
  --color-background: #F0FDF4;
  --color-white: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-text: #0F172A;
  --color-muted: #E2E8F0;
  --color-soft-green: #DCFCE7;
  --color-soft-gold: #FEF3C7;
  --color-soft-negative: #FFE4E6;
  --color-shadow: rgba(6, 78, 59, 0.12);
  --color-emerald-glow: rgba(5, 150, 105, 0.28);
  --color-emerald-glow-strong: rgba(5, 150, 105, 0.42);
  --shadow-soft: 0 18px 45px var(--color-shadow);
  --shadow-deep: 0 24px 56px var(--color-shadow);
  --radius-small: 8px;
  --radius-medium: 14px;
  --max-width: 1120px;
}

@font-face {
  font-family: "Neue Haas Grotesk Text";
  src: url("../fonts/neuehaasgrottext-55roman-trial.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Text";
  src: url("../fonts/neuehaasgrottext-56italic-trial.otf") format("opentype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Text";
  src: url("../fonts/neuehaasgrottext-65medium-trial.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Text";
  src: url("../fonts/neuehaasgrottext-66mediumitalic-trial.otf") format("opentype");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Text";
  src: url("../fonts/neuehaasgrottext-75bold-trial.otf") format("opentype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Text";
  src: url("../fonts/neuehaasgrottext-76bolditalic-trial.otf") format("opentype");
  font-style: italic;
  font-weight: 700 900;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display";
  src: url("../fonts/neuehaasgrotdisp-55roman-trial.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display";
  src: url("../fonts/neuehaasgrotdisp-75bold-trial.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display";
  src: url("../fonts/neuehaasgrotdisp-95black-trial.otf") format("opentype");
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  display: none;
}
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-muted);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  border-color: transparent;
  box-shadow: 0 14px 36px var(--color-shadow);
}

.navbar {
  width: min(100% - 32px, var(--max-width));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.navbar .nav-links { margin-left: auto; }
@media (min-width: 821px) {
  .nav-toggle { display: none !important; }
  .mobile-drawer { display: none !important; }
  .nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: var(--radius-small);
    color: var(--color-gray);
    font-weight: 700;
    font-size: 0.95rem;
  }
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--color-soft-green);
    color: var(--color-primary);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
}


.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  flex: 0 0 48px;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: 0 0 0 1px rgba(6, 78, 59, 0.12);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-small);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.88rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}


.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 190px;
  display: none;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--color-white);
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  width: 100%;
  justify-content: flex-start;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-small);
  background: var(--color-white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--color-primary);
}

main {
  width: 100%;
}

.hero-section,
.page-hero,
.section,
.site-footer {
  width: min(100% - 32px, var(--max-width));
  margin-inline: auto;
}

.hero-section {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: 48px;
  padding: 64px 0;
}

.hero-content h1,
.page-hero h1 {
  max-width: 820px;
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy,
.page-hero p {
  max-width: 690px;
  color: var(--color-gray);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--color-gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-small);
  font-weight: 800;
  transform: translateZ(0);
  transition: all 0.2s ease;
}

.button::after {
  position: absolute;
  left: var(--ripple-x, 50%);
  top: var(--ripple-y, 50%);
  z-index: 0;
  width: 16px;
  height: 16px;
  content: "";
  border-radius: 999px;
  background: radial-gradient(circle, var(--color-soft-green) 0%, transparent 70%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

.button:hover {
  box-shadow: 0 0 0 4px var(--color-emerald-glow), 0 16px 32px var(--color-emerald-glow);
  transform: scale(1.04);
}

.button:active {
  transform: scale(0.97);
}

.button.is-rippling::after {
  animation: buttonRipple 0.58s ease-out;
}

.button-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.button-secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-muted);
}

.hero-panel {
  padding: 24px;
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-medium);
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--color-primary);
  font-weight: 900;
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--color-soft-gold);
  color: var(--color-gold);
  font-size: 0.76rem;
  font-weight: 900;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tag:hover {
  box-shadow: 0 0 0 4px var(--color-emerald-glow);
  transform: translateY(-1px);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.metric-grid div {
  padding: 16px;
  border-radius: var(--radius-small);
  background: var(--color-background);
}

.metric-label {
  display: block;
  color: var(--color-gray);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric-grid strong {
  display: block;
  margin: 6px 0 2px;
  color: var(--color-primary);
  font-size: 1.45rem;
  transform-origin: left center;
}

.metric-grid strong.live-pulse {
  animation: liveMetricPulse 0.82s ease;
}

.metric-positive,
.positive {
  color: var(--color-emerald);
  font-weight: 900;
}

.metric-negative,
.negative {
  color: var(--color-negative);
  font-weight: 900;
}

.section {
  padding: 78px 0;
}

.reveal-ready {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.64s ease, transform 0.64s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-muted {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - var(--max-width)) / 2));
  background: var(--color-white);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  max-width: 700px;
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.stock-summary-grid,
.article-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stock-card,
.article-card,
.news-card {
  padding: 22px;
  border: 1px solid var(--color-muted);
  border-left: 4px solid transparent;
  border-radius: var(--radius-small);
  background: var(--color-white);
  box-shadow: 0 0 0 transparent;
  transition: all 0.25s ease;
}

.stock-card {
  display: grid;
  gap: 12px;
}

.stock-card:hover {
  border-left-color: var(--color-emerald);
  box-shadow: var(--shadow-deep);
  transform: translateY(-4px);
}

.stock-card .tag {
  animation: recommendationPulse 3.4s ease-in-out infinite;
}

.stock-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.stock-code {
  color: var(--color-primary);
  font-size: 1.5rem;
  font-weight: 900;
}

.stock-name,
.article-meta,
.news-meta {
  color: var(--color-gray);
  font-size: 0.92rem;
}

.stock-price {
  color: var(--color-primary);
  font-size: 1.25rem;
  font-weight: 900;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-card:hover {
  border-left-color: var(--color-emerald);
  box-shadow: var(--shadow-deep);
  transform: translateY(-6px);
}

.article-card h3,
.news-card h3 {
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.3;
}

.article-card p,
.news-card p {
  margin: 0;
  color: var(--color-gray);
}

.page-hero {
  padding: 86px 0 44px;
}

.page-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.1rem);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--color-muted);
}

.site-footer p {
  max-width: 520px;
  margin: 10px 0 0;
  color: var(--color-gray);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.site-footer nav a {
  color: var(--color-gray);
  font-weight: 800;
}

.site-footer nav a:hover {
  color: var(--color-primary);
}

.footer-brand .brand-logo {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

.footer-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.empty-state {
  padding: 22px;
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-small);
  background: var(--color-white);
  color: var(--color-gray);
}

@keyframes buttonRipple {
  0% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(28);
  }
}

@keyframes liveMetricPulse {
  0% {
    color: var(--color-primary);
    opacity: 1;
    transform: scale(1);
  }

  40% {
    color: var(--color-emerald);
    opacity: 0.62;
    transform: scale(1.04);
  }

  100% {
    color: var(--color-primary);
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes recommendationPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--color-emerald-glow);
  }

  50% {
    box-shadow: 0 0 0 5px transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-ready {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 820px) {
  .navbar {
    min-height: 66px;
  }

  .nav-toggle {
    display: block;
  }

  ul.nav-links { display: none; }

  .mobile-nav-header { display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:.5px solid rgba(255,255,255,0.1); background:#064E3B; position:sticky; top:0; z-index:10; }
  .mobile-nav-header .brand { color:white; }
  .mobile-nav-close { width:32px; height:32px; border:.5px solid rgba(255,255,255,0.2); border-radius:8px; background:rgba(255,255,255,0.08); font-size:14px; color:white; display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; }
  .mobile-nav-section-label { padding:12px 16px 4px; font-size:9px; font-weight:700; color:rgba(255,255,255,0.6); text-transform:uppercase; letter-spacing:.08em; }
  .mobile-nav-item { display:flex; align-items:center; gap:10px; padding:11px 16px; font-size:14px; font-weight:500; color:#fff; border-bottom:.5px solid rgba(255,255,255,0.07); text-decoration:none; }
  .mobile-nav-item:hover, .mobile-nav-item.active { color:white; background:rgba(255,255,255,0.08); }
  .mobile-nav-divider { height:6px; background:rgba(255,255,255,0.06); border-top:.5px solid rgba(255,255,255,0.1); border-bottom:.5px solid rgba(255,255,255,0.1); }
  .mobile-nav-market-toggle { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 16px; font-size:14px; font-weight:500; color:#fff; border-bottom:.5px solid rgba(255,255,255,0.07); cursor:pointer; }
  .mobile-nav-market-body { display:none; }
  .mobile-nav-market-body.open { display:block; }
  .mobile-nav-flat { display:flex; align-items:center; justify-content:flex-start; gap:10px; padding:11px 16px 11px 28px; font-size:14px; font-weight:500; color:#fff; border-bottom:.5px solid rgba(255,255,255,0.07); text-decoration:none; }
  .mobile-nav-flat:hover { color:white; background:rgba(255,255,255,0.08); }
  .mobile-nav-flat.disabled { color:rgba(255,255,255,0.5); pointer-events:none; }
  .mobile-nav-sub-toggle { display:flex; align-items:center; justify-content:flex-start; gap:10px; padding:11px 16px 11px 28px; font-size:14px; font-weight:500; color:#fff; border-bottom:.5px solid rgba(255,255,255,0.07); cursor:pointer; }
  .mobile-nav-sub-toggle.open { color:white; background:rgba(255,255,255,0.12); }
  .mobile-nav-sub-items { display:none; }
  .mobile-nav-sub-items.open { display:block; }
  .mobile-nav-sub-item { display:flex !important; align-items:center; justify-content:flex-start; gap:8px; padding:8px 16px 8px 36px !important; font-size:12px; color:#fff !important; border-bottom:.5px solid rgba(255,255,255,0.05); text-decoration:none !important; }
  .mobile-nav-sub-item.disabled { color:rgba(255,255,255,0.5) !important; pointer-events:none; }
  .mobile-nav-arr { color:rgba(255,255,255,0.4); font-size:12px; transition:transform .2s; margin-left:auto; }
  .mobile-nav-sub-toggle.open .mobile-nav-arr { transform:rotate(90deg); color:white; }
  .mobile-nav-market-toggle.open .mobile-nav-arr { transform:rotate(90deg); }
  .mobile-nav-badge { font-size:9px; background:rgba(255,255,255,0.12); color:rgba(255,255,255,0.75); padding:2px 6px; border-radius:99px; font-weight:700; white-space:nowrap; flex-shrink:0; margin-left:auto; }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: #064E3B;
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 200;
  }
  .nav-links::-webkit-scrollbar { display: none; }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    color: #fff;
  }

  .nav-dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    display: block;
    min-width: 0;
    margin: 4px 0 0;
    padding: 4px 0 4px 14px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .hero-section {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 0;
  }

  .section {
    padding: 54px 0;
  }

  .section-muted {
    padding-inline: 16px;
  }

  .section-heading {
    display: block;
  }

  .stock-summary-grid,
  .article-preview-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-section,
  .page-hero,
  .section,
  .site-footer {
    width: min(100% - 24px, var(--max-width));
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 18px;
  }

  .button {
    width: 100%;
  }
}

/* LynxCapital market/dashboard previews */
.compact-section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.market-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.market-summary-item,
.preview-chip,
.preview-stat-card {
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-small);
  background: var(--color-white);
  box-shadow: 0 10px 28px rgba(6, 78, 59, 0.06);
}

.market-summary-item {
  padding: 18px;
}

.market-summary-item span,
.preview-chip span,
.preview-stat-card span {
  display: block;
  color: var(--color-gray);
  font-size: 0.82rem;
  font-weight: 800;
}

.market-summary-item strong {
  display: block;
  margin: 4px 0;
  color: var(--color-primary);
  font-size: 1.45rem;
}

.dashboard-preview {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: center;
}

.dashboard-preview-copy h2 {
  margin: 0 0 12px;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.08;
}

.dashboard-preview-copy p:not(.eyebrow) {
  margin: 0 0 22px;
  color: var(--color-gray);
}

.technical-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.preview-column {
  display: grid;
  gap: 10px;
}

.preview-column h3 {
  margin: 0;
  color: var(--color-primary);
  font-size: 0.95rem;
}

.preview-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}

.preview-chip strong {
  color: var(--color-primary);
  font-size: 1rem;
}

.quadrant-preview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preview-stat-card {
  padding: 16px;
}

.preview-stat-card strong {
  display: block;
  margin-top: 4px;
  color: var(--color-primary);
  font-size: 1.65rem;
}

@media (max-width: 820px) {
  .market-summary-strip,
  .quadrant-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .market-summary-strip,
  .technical-preview-grid,
  .quadrant-preview {
    grid-template-columns: 1fr;
  }
}

/* Keep full-page captures and no-JS states from showing blank reveal placeholders. */
.reveal-ready {
  opacity: 1;
  transform: none;
}

/* Tighten hero-to-content rhythm after homepage dashboard previews were added. */
.hero-section {
  min-height: auto;
  padding: 64px 0 48px;
}

/* Mega menu navigation */
.nav-dropdown,
.nav-subdropdown {
  position: relative;
}

.nav-dropdown > .dropdown-menu {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.nav-dropdown:hover > .dropdown-menu,
.nav-dropdown:focus-within > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mega-menu {
  min-width: 250px;
}

.submenu-label,
.nav-disabled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  width: 100%;
  padding: 0 14px;
  border-radius: var(--radius-small);
  color: var(--color-gray);
  font-weight: 800;
  font-size: 0.95rem;
}

.submenu-label {
  color: var(--color-primary);
  cursor: default;
}

.submenu-label:hover {
  background: var(--color-soft-green);
}

.nav-disabled {
  color: #A8A29E;
  cursor: not-allowed;
}

.nav-disabled small {
  margin-left: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #BDB7AE;
}

.submenu-menu {
  position: absolute;
  top: -8px;
  left: calc(100% + 8px);
  min-width: 190px;
  display: block;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--color-white);
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.nav-subdropdown:hover > .submenu-menu,
.nav-subdropdown:focus-within > .submenu-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.submenu-menu a {
  width: 100%;
  justify-content: flex-start;
}

@media (max-width: 820px) {
  .nav-dropdown > .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .submenu-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    min-width: 0;
    margin: 2px 0 6px;
    padding: 4px 0 4px 14px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .submenu-label,
  .nav-disabled {
    min-height: 38px;
  }
}

body.nav-demo-open .nav-dropdown > .dropdown-menu,
body.nav-demo-open .nav-subdropdown > .submenu-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

body.nav-demo-open .nav-subdropdown > .submenu-menu {
  transform: translateX(0);
}

/* Homepage cleanup: remove hero card gap, center section headings, tighten rhythm. */
#hero {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding-bottom: 32px;
}

#hero .hero-content,
#hero .hero-copy,
#hero h1 {
  margin-inline: auto;
}

#hero .hero-actions {
  justify-content: center;
}

#home-market-strip-section {
  padding-top: 28px;
}

#home-market-strip-section .section-heading,
#market-summary .section-heading,
#latest-articles .section-heading {
  display: block;
  text-align: center;
}

#home-market-strip-section .section-heading h2,
#market-summary .section-heading h2,
#latest-articles .section-heading h2 {
  margin-inline: auto;
}

#home-rsi-preview-section .dashboard-preview,
#home-macd-preview-section .dashboard-preview {
  grid-template-columns: 1fr;
  text-align: center;
}

#home-rsi-preview-section .dashboard-preview-copy,
#home-macd-preview-section .dashboard-preview-copy {
  max-width: 760px;
  margin-inline: auto;
}

#home-rsi-preview-section .dashboard-preview-copy h2,
#home-macd-preview-section .dashboard-preview-copy h2 {
  font-size: clamp(1.35rem, 2.05vw, 2rem);
  line-height: 1.05;
  white-space: nowrap;
}

#home-rsi-preview-section .dashboard-preview-copy p:not(.eyebrow),
#home-macd-preview-section .dashboard-preview-copy p:not(.eyebrow) {
  margin-inline: auto;
}

#home-rsi-preview-section .dashboard-preview-copy .button,
#home-macd-preview-section .dashboard-preview-copy .button {
  margin-inline: auto;
}

.stock-placeholder-card {
  grid-column: 1 / -1;
  justify-items: center;
  text-align: center;
  border-left-color: var(--color-emerald);
  background: var(--color-soft-green);
  color: var(--color-primary);
  font-weight: 900;
}

.stock-placeholder-card p {
  margin: 0;
}

@media (max-width: 900px) {
  #home-rsi-preview-section .dashboard-preview-copy h2,
  #home-macd-preview-section .dashboard-preview-copy h2 {
    white-space: normal;
  }
}

/* Center section-like headers on market and technical pages. */
#market-hero,
#stock-picks .section-heading,
#market-news .section-heading,
#rsi-heatmap-link .dashboard-preview-copy,
#macd-scatter-link .dashboard-preview-copy,
.rsi-hero,
.macd-hero {
  text-align: center;
}

#stock-picks .section-heading,
#market-news .section-heading {
  display: block;
}

#stock-picks .section-heading h2,
#market-news .section-heading h2,
#market-hero h1,
#market-hero p,
.rsi-hero h1,
.macd-hero h1,
.rsi-hero p,
.macd-hero p {
  margin-inline: auto;
}

#rsi-heatmap-link .dashboard-preview-copy .button,
#macd-scatter-link .dashboard-preview-copy .button {
  margin-inline: auto;
}

#latest-articles .section-heading h2 {
  max-width: 920px;
}

/* Alignment reset: hero stays centered; all non-hero sections/cards are left aligned. */
#hero,
#market-hero,
.rsi-hero,
.macd-hero {
  text-align: center;
}

#hero .hero-content,
#hero .hero-copy,
#hero h1,
#market-hero h1,
#market-hero p,
.rsi-hero h1,
.rsi-hero p,
.macd-hero h1,
.macd-hero p {
  margin-inline: auto;
}

#hero .hero-actions {
  justify-content: center;
}

#home-market-strip-section .section-heading,
#market-summary .section-heading,
#latest-articles .section-heading,
#stock-picks .section-heading,
#market-news .section-heading {
  display: block;
  text-align: left;
}

#home-market-strip-section .section-heading h2,
#market-summary .section-heading h2,
#latest-articles .section-heading h2,
#stock-picks .section-heading h2,
#market-news .section-heading h2 {
  margin-inline: 0;
}

#home-rsi-preview-section .dashboard-preview,
#home-macd-preview-section .dashboard-preview {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  text-align: left;
}

#home-rsi-preview-section .dashboard-preview-copy,
#home-macd-preview-section .dashboard-preview-copy,
#rsi-heatmap-link .dashboard-preview-copy,
#macd-scatter-link .dashboard-preview-copy {
  max-width: none;
  margin-inline: 0;
  text-align: left;
}

#home-rsi-preview-section .dashboard-preview-copy h2,
#home-macd-preview-section .dashboard-preview-copy h2,
#home-rsi-preview-section .dashboard-preview-copy p:not(.eyebrow),
#home-macd-preview-section .dashboard-preview-copy p:not(.eyebrow),
#rsi-heatmap-link .dashboard-preview-copy h2,
#macd-scatter-link .dashboard-preview-copy h2,
#rsi-heatmap-link .dashboard-preview-copy p:not(.eyebrow),
#macd-scatter-link .dashboard-preview-copy p:not(.eyebrow) {
  margin-inline: 0;
}

#home-rsi-preview-section .dashboard-preview-copy .button,
#home-macd-preview-section .dashboard-preview-copy .button,
#rsi-heatmap-link .dashboard-preview-copy .button,
#macd-scatter-link .dashboard-preview-copy .button {
  margin-inline: 0;
}

.stock-card,
.article-card,
.news-card,
.market-summary-item,
.preview-column,
.preview-chip,
.preview-stat-card,
.watchlist-placeholder,
.stock-placeholder-card {
  text-align: left;
}

.stock-placeholder-card {
  justify-items: start;
}

@media (max-width: 820px) {
  #home-rsi-preview-section .dashboard-preview,
  #home-macd-preview-section .dashboard-preview {
    grid-template-columns: 1fr;
  }
}

.preview-column h3,
.preview-column,
.technical-preview-grid,
.quadrant-preview {
  text-align: left;
}

/* Homepage restructure: compact sections and requested flow. */
#hero {
  padding-top: 56px;
  padding-bottom: 30px;
}

#home-market-strip-section,
#home-macd-preview-section,
#latest-articles {
  padding-top: 46px;
  padding-bottom: 46px;
}

.market-summary-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 620px;
}

.section-note {
  margin: 14px 0 14px;
  color: var(--color-gray);
  font-size: 0.92rem;
  font-style: italic;
}

.section-link {
  display: inline-flex;
  margin-top: 6px;
  color: var(--color-primary);
  font-weight: 900;
}

.section-link:hover {
  text-decoration: underline;
}

#latest-articles .article-preview-grid {
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .market-summary-compact {
    grid-template-columns: 1fr;
  }
}

#home-market-strip-section .section-outline-button {
  margin-top: 6px;
}

.market-summary-item.is-muted strong,
.market-summary-item em.neutral {
  color: var(--color-gray);
}

.market-summary-item.is-muted {
  border-color: rgba(107, 114, 128, 0.22);
}

@media (min-width: 760px) {
  .market-summary-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
  }
}

.footer-data-note {
  margin: 10px 0 6px;
  color: var(--color-gray);
  font-size: 0.82rem;
  line-height: 1.55;
}

/* Wide layout update: 1400px content with 24px page gutters */
:root {
  --max-width: 1400px;
}

.navbar,
.page-hero,
.section,
.site-footer {
  width: min(100% - 48px, var(--max-width));
}

.section-muted {
  padding-inline: max(24px, calc((100% - var(--max-width)) / 2));
}

@media (max-width: 480px) {
  .navbar,
  .page-hero,
  .section,
  .site-footer {
    width: min(100% - 32px, var(--max-width));
  }
}

/* Logo refresh: use transparent /img/logo.png at 44px across navbar/footer */
.navbar {
  overflow: visible;
}

.brand,
.footer-brand {
  gap: 8px;
  overflow: visible;
}

.brand-logo,
.footer-brand .brand-logo {
  width: 44px;
  max-width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
