/* Forces padding to stay INSIDE the width boundaries */
*, *::before, *::after {
  box-sizing: border-box;
}

/* --- THEME VARIABLES --- */
:root {
  --bg-top: #f5f6f7;     /* very light grey */
  --bg-bottom: #ffffff;  /* pure white */
  --bg: #ffffff;         /* body background = pure white */
  --text: #111;
  --box-bg: #ffffff;
  --box-shadow: rgba(0,0,0,0.05);
  --nav-border: #ddd;
  --footer-bg: #ffffff;  /* pure white */
  --header-bg: #ffffff;
  --nav-bg: #ffffff;
  --dropdown-bg: #ffffff;
  --dropdown-hover: rgba(0,0,0,0.05);
}

html, body {
    overflow-x: hidden;
}

.top-inner {
  background: var(--bg-top);
  padding-top: 20px;
}

/* transition top-section and bottom-section */
/* Premium divider between grey → white */
.top-section {
  position: relative;
  background: var(--bg-top);
  padding-bottom: 40px;
}

.top-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px; /* sits exactly at the edge */
  height: 1px;

  /* ultra-premium micro shadow */
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);

  pointer-events: none;
  z-index: 5;
}




.bottom-section {
  background: var(--bg-bottom);
}


body.dark {
  --bg: #0f1115;
  --text: #e8e8e8;
  --box-bg: #1a1c20;
  --box-shadow: rgba(0,0,0,0.4);
  --nav-border: #333;
  --footer-bg: #1a1c20;
  --bg-top: #14161a;        /* darker grey for top section */
  --bg-bottom: #0f1115;     /* same as body background */
  --header-bg: #1a1c20;     /* header/nav background */
  --nav-bg: #1a1c20;
  --dropdown-bg: #1a1c20;
  --dropdown-hover: rgba(255,255,255,0.06);

}

body.dark .header-fade::after {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.05),
    var(--bg-top)
  );
}


/* --- BASE STYLES --- */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.nav, .dropdown {
  overflow: visible;
}

.header {
    padding: 20px 5px 10px 5px;
    text-align: center;
    background: var(--header-bg);
}

.site-title {
  font-size: 38px;
  font-weight: 600;
  text-align: center;
}

.nav a,
.nav a:visited,
.nav a:active,
.nav a:hover,
.nav-selected,
.nav-selected:visited,
.nav-selected:hover,
.nav-selected:active {
  text-decoration: none !important;
}

.nav {
  justify-content: flex-start;
  overflow: visible;
  background: #3689e6;
  padding: 5px 0px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.nav svg {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

.nav a,
.nav .dropbtn {
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav .dropbtn:hover {
  color: #ffffff; 
}

.nav a:hover::after,
.nav .dropbtn:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.nav-selected {
  position: relative;
}

.nav-selected::after {
  content: "";
  position: absolute;
  color: #ffffff;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: #1f3c88;
  border-radius: 2px;
}

.nav a::after,
.nav .dropbtn::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: rgba(255,255,255,0.4); /* subtle white underline */
  border-radius: 2px;
  opacity: 0;
  transform: translateY(3px);
  transition: all 0.25s ease;
}


.theme-btn {
  background: none;
  border: 0px solid var(--nav-border);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn .theme-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: #ffffff; /* always white in the nav */
}

.dropdown {
  position: relative;
  display: flex;
  align-items: center;
  color: #ffffff !important;
  flex-shrink: 0;
}

.dropbtn {
  width: auto;
  flex-shrink: 0;
  padding: 6px 10px;
  color: #ffffff !important;
  border-radius: 8px;
  background: none;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between; /* pushes icon left, arrow right */
  gap: 4px;
}

.dropbtn .icon {
  width: 20px;
  height: 20px;
}

.dropbtn .arrow {
  font-size: 10px;
  opacity: 0.6;
  line-height: 1;
}

.dropdown:hover .dropbtn {
  background: rgba(0,0,0,0.05);
}


/* The floating box */
.dropdown-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 150%;
  right: auto;      
  left: 0;
  max-width: 90vw;
  overflow-x: hidden;
  background-color: var(--dropdown-bg);
  min-width: 200px;
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--box-shadow);
  z-index: 100;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 10px 0;
}



/* The little upward arrow (Border) */
.dropdown-content::before {
  content: "";
  position: absolute;
  bottom: 100%; 
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent var(--nav-border) transparent;
}

/* The little upward arrow (Inner Color to match background) */
.dropdown-content::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: transparent transparent var(--box-bg) transparent;
}

/* The links inside the dropdown */
.dropdown-content a {
  color: var(--text);
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-content a:hover {
  background-color: var(--dropdown-hover);
  color: #111; /* stays dark, no blue tint */
}

/* Hover triggers the emerging animation */
.dropdown:hover .dropdown-content {
  visibility: visible;
  opacity: 1;
  transform: translateY(0); /* no horizontal shift */
}


.dropdown:hover .dropbtn {
  color: #ffffff !important;
}


.sm24-ad-card {
    display: flex;
    align-items: center;
    background-color: #0B1A30; /* Wall Street Deep Navy */
    border: 1px solid #1E3A5F;
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.sm24-ad-card:hover {
    transform: translateY(-3px);
    border-color: #3B82F6; /* Bright corporate blue border on hover */
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.2);
}

/* The white badge for the logo so black logos remain visible */
.sm24-ad-logo {
    flex: 0 0 110px; 
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
}

.sm24-ad-logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sm24-ad-text {
    flex: 1;
}

.sm24-ad-text h4 {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 700;
}

.sm24-ad-text p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #94A3B8; /* Slate gray for easy reading against navy */
    line-height: 1.4;
}

.sm24-ad-cta {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #60A5FA; /* Light bright blue */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.sm24-ad-disclaimer {
    display: block;
    font-size: 0.65rem;
    color: #475569;
    text-transform: uppercase;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .sm24-ad-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    .sm24-ad-logo {
        margin-right: 0;
        margin-bottom: 16px;
        width: 120px; /* Control logo width on mobile */
    }
}

/* --- LAYOUT & GRID --- */
.layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 20px;
  flex: 1;
}

@media (min-width: 900px) {
  .layout { flex-direction: row; align-items: flex-start; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1600px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- BOX / CARD STYLING --- */
.item {
  width: 100%; 
}

.box {
  position: relative;
  background-color: var(--box-bg);
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  padding: 20px;
  padding-bottom: 30px; /* Extra room for the X-axis labels */
  box-shadow: 0 2px 6px var(--box-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.box:hover {
  box-shadow: 0 8px 24px var(--box-shadow);
  transform: translateY(-2px);
}

.box-link {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10;
}

.box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.box-title {
  font-size: 16px;
  font-weight: 600;
}

.tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--nav-border);
  color: var(--text);
  font-size: 11px;
  cursor: help;
  position: relative;
  z-index: 20;
}

/* --- TOOLTIP HOVER LOGIC --- */
.tooltip::after {
  content: attr(data-tip); /* Pulls the text out of your HTML attribute */
  position: absolute;
  bottom: 130%; /* Floats it just above the question mark */
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  width: 180px;
  background-color: #111; /* Sleek dark grey/black */
  color: #fff; /* Crisp white text */
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  line-height: 1.4;
  pointer-events: none; /* Stops the tooltip itself from interfering with the mouse */
  
  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* The Hover Trigger */
.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0); /* Smoothly lifts up */
}

/* Text Colors */
.status {
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
  letter-spacing: 0.5px;
}
.status.open { color: #10b981; }
.status.closed { color: #6b7280; }

.change {
  font-size: 14px;
  font-weight: 600;
}
.change.positive { color: #10b981; }
.change.negative { color: #ef4444; }
.change.neutral { color: #6b7280; }

/* --- SPARKLINE & AXIS LABELS --- */
/* --- SPARKLINE & AXIS LABELS --- */
.sparkline-wrapper {
  width: 100%;
  height: 60px;
  margin-top: 15px;
  position: relative;
}

.sparkline {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sparkline-line {
  fill: none;
  stroke: var(--sparkline-stroke);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.sparkline-fill {
  fill: var(--sparkline-fill);
  stroke: none;
}

/* Axis labels positioned relative to wrapper */
.y-max,
.y-min,
.x-start,
.x-end {
  position: absolute;
  font-size: 11px;
  font-weight: 500;
  color: #999;
  pointer-events: none;
  white-space: nowrap;
}

/* Tweak these offsets if you change wrapper height */
.y-max { top: -14px; right: 0; }
.y-min { bottom: -8px; right: 0; }
.x-start { bottom: -22px; left: 0; }
.x-end { bottom: -22px; right: 0; }

/* Optional: subtle fill color defaults (JS will override stroke/fill per market) */
.sparkline-line[stroke="#10b981"] { stroke: #10b981; }
.sparkline-line[stroke="#ef4444"] { stroke: #ef4444; }
.sparkline-fill { fill: rgba(16,185,129,0.06); }

/* Small responsive tweak for very narrow cards */
@media (max-width: 420px) {
  .sparkline-wrapper { height: 44px; }
  .y-max { top: -12px; }
  .x-start, .x-end { bottom: -18px; font-size: 10px; }
}


/* --- FOOTER & MISC --- */
/* --- INTRO TEXT --- */
.intro-text {
  max-width: 800px; /* Keeps line lengths comfortable for reading */
  margin: 30px auto; /* Centers the block and pushes it away from the nav/grid */
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.8; /* Softens the text so it doesn't compete with the logo */
  padding: 0 20px; /* Prevents text from touching the screen edges on mobile */
}

/* --- FOOTER & SEO TEXT --- */
.footer {
  background: var(--footer-bg);
  color: var(--text);
  margin-top: 60px; /* Creates distinct separation from the bottom of the grid */
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid var(--nav-border); /* Clean separating line */
}

.seo-text {
  max-width: 800px;
  margin: 0 auto 30px auto; /* Centers the SEO block */
}

.seo-text p {
  font-size: 13px; /* Smaller font for SEO text */
  line-height: 1.6;
  opacity: 0.6; /* Grays it out heavily so it's unobtrusive */
  margin-bottom: 15px;
}

.legal {
  border-top: 1px solid var(--nav-border);
  max-width: 400px;
  margin: 0 auto;
  padding-top: 20px;
}

.legal p {
  font-size: 12px;
  opacity: 0.4;
  margin: 0;
}

.sm24-network-badge {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: inherit; 
  opacity: 0.8;
  margin-top: 1rem;
}

.sm24-network-badge a {
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  font-weight: normal;
  text-transform: none; 
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(136, 136, 136, 0.3);
  padding-bottom: 1px;
  margin-left: 0.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sm24-network-badge a:hover {
  color: #31597d; 
  border-bottom-color: #31597d;
}

.sm24-about-badge {
  margin: 3rem 0;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 3px solid #31597d; 
  background: #f9f9f9; 
  max-width: 600px;
}

.badge-eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #555555;
  margin-bottom: 0.5rem;
}

.badge-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #111111;
}

.badge-text a {
  font-family: 'Georgia', serif;
  font-weight: normal;
  color: #31597d;
  text-decoration: none;
  border-bottom: 1px solid rgba(49, 89, 125, 0.3);
  transition: all 0.2s ease;
}

.badge-text a:hover {
  border-bottom-color: #31597d;
  background-color: rgba(49, 89, 125, 0.05);
}

.ad-placeholder, .hidden-field {
  display: none !important;
}

/* --- FORM STYLES --- */
.input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.input-group input,
.input-group textarea {
  padding: 12px;
  border: 1px solid var(--nav-border);
  border-radius: 8px;
  background: var(--bg); /* Matches dark/light mode automatically */
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #6ab0ff; /* Subtle blue glow on focus */
  box-shadow: 0 0 0 3px rgba(106, 176, 255, 0.1);
}

.form-btn {
  background: var(--text); /* Black in light mode, White in dark mode */
  color: var(--bg);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  width: 100%;
}

.form-btn:hover {
  opacity: 0.8;
}

.form-btn:active {
  transform: scale(0.98);
}

.form-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-status {
  margin-top: 15px;
  font-size: 14px;
  text-align: center;
  font-weight: 600;
  min-height: 20px; /* Prevents layout jump when text appears */
}

.form-status.success { color: #10b981; } /* Green */
.form-status.error { color: #ef4444; } /* Red */

/* --- CSS LOGO BANNER --- */
.logo-container {
  background-color: #2b5783; 
  color: #ffffff;
  text-align: center;
  margin: 0 auto 0 auto; 
  
  /* --- THE TWEAK --- */
  /* Reduced the side padding from 20px down to 5px so the giant text has room to breathe */
  padding: 40px 5px; 
  
  border-radius: 12px; 
  box-sizing: border-box; 
  
  /* Widened from 90% to 95% to maximize mobile screen space */
  width: 95%; 
  max-width: 800px; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}

.brand-name {
  font-family: 'Playfair Display', serif;
  
  /* --- THE ORIGINAL BIG SIZE IS BACK --- */
  font-size: clamp(48px, 8vw, 90px); 
  font-weight: 400;
  
  /* Added these two lines just in case someone has an incredibly tiny phone */
  /* It ensures that if the text DOES have to wrap, the two lines stack beautifully */
  line-height: 1.1; 
  letter-spacing: -1px; /* Tucks the letters just slightly tighter */
}

.slogan {
  font-family: 'Inter', sans-serif; /* Your requested font */
  font-size: clamp(14px, 3vw, 24px); 
  font-weight: 300;
  letter-spacing: 1px; /* Spreads out the slogan to match the image */
  opacity: 0.9; /* Softens the white slightly so the brand name pops */
}

body.dark .logo-container {
  background-color: #1a1c20; /* Changes to dark grey in dark mode */
}

/* --- MONETIZATION & SIDEBAR --- */

/* 1. Mobile-Specific Sponsor Blocks (Inside the Grid) */
.mobile-sponsor {
  display: block; /* Visible by default on mobile phones */
  grid-column: 1 / -1; /* Forces the banner to span the full width of the mobile grid */
  margin: 10px 0;
  text-align: center;
}

.mobile-sponsor img {
  max-width: 85%; /* Shrinks the banner slightly on mobile as requested */
  height: auto;
  border-radius: 6px;
  background-color: #ffffff;
  padding: 10px;
  box-sizing: border-box;
}

/* 2. Desktop Sidebar (Hidden on Mobile) */
.sidebar {
  display: none; /* Completely hidden on mobile phones */
  padding: 0 20px 20px 20px;
  box-sizing: border-box;
}

/* 3. Shared Sponsor Card Styling */
.sponsor-label {
  font-size: 11px;
  color: #999;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: block;
}

.sponsor-card {
  background-color: var(--box-bg);
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 6px var(--box-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sponsor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--box-shadow);
}

/* --- THE DESKTOP SWITCH --- */
@media (min-width: 900px) {
  /* Turn OFF the mobile banners */
  .mobile-sponsor {
    display: none !important; 
  }
  
  /* Turn ON the right sidebar */
  .sidebar {
    display: block; 
    width: 280px;
    flex-shrink: 0;
    padding: 20px 20px 20px 0;
    position: sticky; /* Follows the user as they scroll */
    top: 20px;
  }
}

/* --- SUBPAGE LAYOUT --- */
.subpage-container {
  max-width: 800px; /* Keeps the content from stretching too wide on desktop monitors */
  margin: 0 auto; /* Automatically centers the container perfectly */
  padding: 20px; /* Gives nice breathing room on the left/right for mobile screens */
  display: flex;
  flex-direction: column;
  gap: 25px; /* Creates clean, even spacing between the chart and the text blocks */
}

.sponsor-shoutout {
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background-color: var(--box-bg);
  border: 1px solid var(--nav-border);
  padding: 12px;
  border-radius: 8px;
}

.sponsor-shoutout a {
  color: #6ab0ff; /* S&P 500 accent color */
  font-weight: 600;
  text-decoration: none;
}

.sponsor-shoutout a:hover {
  text-decoration: underline;
}

.info-text-area {
  background-color: var(--box-bg);
  border: 1px solid var(--nav-border);
  border-radius: 6px;
  padding: 10px;
  line-height: 1.7;
  font-size: 16px;
  box-shadow: 0 2px 4px var(--box-shadow);
  margin-bottom: 40px; /* Pushes the footer down slightly */
}

.info-text-area h2 {
  margin-top: 0;
  margin-bottom: 0px;
}

/* --- FOOTER MENU --- */
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 10px 0 30px 0;
  flex-wrap: wrap; /* Lets them stack neatly on tiny phone screens */
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.6; /* Keeps them subtle */
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-links a:hover {
  opacity: 1;
  color: #6ab0ff; /* Subtle blue highlight on hover */
  text-decoration: underline;
}

/* --- BROKER REVIEW CARDS --- */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.review-card {
  display: flex;
  background-color: var(--box-bg);
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  padding: 15px;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 6px var(--box-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--box-shadow);
}

/* Left side: Logo container */
.review-logo {
  flex-shrink: 0;
  width: 90px;
  height: 60px;
  background-color: #ffffff; /* Always white so logos pop */
  border-radius: 8px;
  border: 1px solid #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  box-sizing: border-box;
}

.review-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Right side: Text and Buttons */
.review-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.review-intro {
  font-size: 13px;
  color: var(--text);
  opacity: 0.8;
  line-height: 1.4;
  margin-bottom: 5px;
  
  /* Forces the text to cut off perfectly at 2 lines with an ellipsis (...) */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap; /* Allows buttons to stack safely on ancient, tiny phones */
}

/* The "Money" Button */
.btn-signup {
  background-color: #10b981; /* Matches the market-up green */
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-signup:hover {
  opacity: 0.8;
}

/* The "Info" Button */
.btn-review {
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--nav-border);
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-review:hover {
  background-color: var(--nav-border);
}

/* The Mini Disclaimer */
.review-disclaimer {
  font-size: 11px;
  color: var(--text);
  opacity: 0.5; /* Keeps it legally visible, but visually quiet */
  margin-top: 4px;
  line-height: 1.3;
}

.review-disclaimer a {
  color: inherit;
  text-decoration: underline;
}

.review-disclaimer a:hover {
  opacity: 0.8;
}


.asset-labels {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text);
  opacity: 0.5; 
  margin-top: 15px;
  font-weight: 600;
  text-align: center;
}

.asset-labels .divider {
  margin: 0 10px;
  opacity: 0.4;
}

/* --- INDIVIDUAL REVIEW PAGE LAYOUT --- */
.review-page-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* Left Sidebar Placeholder (Hidden on mobile, 160px wide on desktop) */
.review-sidebar-left {
  flex-shrink: 0;
  width: max-content;  /* Hugs the exact width of the ad */
  height: max-content; /* Hugs the exact height of the ad */
  position: sticky;    /* Optional: Makes the ad follow the user as they scroll */
  top: 20px;
}

/* Main Content Area */
.review-main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0; /* Prevents overflow bugs on mobile */
}

/* The Top Block: Logo + Text */
.review-hero-block {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap; /* Allows stacking on mobile */
}

.review-hero-logo {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  background-color: #ffffff;
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  box-sizing: border-box;
  box-shadow: 0 2px 6px var(--box-shadow);
}

.review-hero-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.review-hero-text {
  flex-grow: 1;
  min-width: 250px;
  
  /* --- THE NEW BOX STYLING --- */
  background-color: var(--box-bg);
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  padding: 30px; /* Gives the text plenty of breathing room */
  box-shadow: 0 2px 6px var(--box-shadow);
  box-sizing: border-box; /* Ensures the padding doesn't break your grid */
}

.review-hero-text p {
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--text);
  opacity: 0.9;
}

/* The "Wall Street" CTA Button */
.wall-street-cta {
  display: inline-block;
  background-color: #10b981; /* The 'Market Up' Green */
  color: #ffffff;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  border-radius: 4px; /* Sharp, institutional edges */
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.wall-street-cta:hover {
  opacity: 0.9;
}

.wall-street-cta:active {
  transform: translateY(2px);
}

/* Ad Banner ph */
.ad-banner-horizontal {
  width: 100%;
  display: flex;
  justify-content: center; /* Centers the ad if it's narrower than the screen */
  margin: 10px 0;
}

@media (max-width: 600px) {

  .nav {
    display: flex;
    justify-content: space-between; /* Spreads items evenly */
    padding: 10px 5px; /* Reduces outer padding */
    gap: 4px; /* Reduces the space between buttons */
  }

  /* Shrink the padding inside the buttons themselves */
  .nav a, 
  .nav .dropbtn, 
  .theme-btn {
    padding: 8px 8px; /* Less horizontal padding */
    font-size: 14px; /* Slightly smaller text for mobile */
  }

  .nav .dropdown:first-of-type .dropdown-content {
    left: 0;
    right: auto;
    max-width: 90vw;
  }

  /* First dropdown arrow positioning */
  .nav .dropdown:first-of-type .dropdown-content::before,
  .nav .dropdown:first-of-type .dropdown-content::after {
    left: 45px;
    right: auto;
    transform: translateX(-50%);
  }

  /* 2. Remaining dropdowns ("Bewertungen", etc.): Anchor to the right side so they expand left */
  .nav .dropdown:nth-of-type(n+2) .dropdown-content {
    left: auto;
    right: 0;
    max-width: 90vw;
  }

  /* Remaining dropdown arrows positioning */
  .nav .dropdown:nth-of-type(n+2) .dropdown-content::before,
  .nav .dropdown:nth-of-type(n+2) .dropdown-content::after {
    left: auto;
    right: 20px;
    transform: none;
  }
}



@media (max-width: 900px) {
  .review-sidebar-left {
    display: none !important; /* Forces the sidebar away on phones */
  }
  .review-hero-block {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* --- SOCIAL --- */
.social-links-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 40px 0; /* Gives perfect breathing room before the contact form */
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background-color: var(--box-bg);
  border: 1px solid var(--nav-border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  border-radius: 4px; /* Sharp, edges */
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px var(--box-shadow);
}

/* High-contrast inversion on hover */
.social-link:hover {
  border-color: var(--text); 
  background-color: var(--text);
  color: var(--bg);
  transform: translateY(-2px); /* Subtle lift */
}

/* --- EUAKTIEN STYLE LOGO --- */
.euaktien-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  user-select: none;
}

.logo-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logo-bars .bar {
  display: block;
  width: 34px;
  height: 10px;
  border-radius: 6px;
}

/* Shades of blue */
.bar-1 { background-color: #002e99; }  /* dark blue */
.bar-2 { background-color: #3689e6; }  /* medium blue */
.bar-3 { background-color: #8cd5ff; }  /* light blue */

/* Text styling */
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo-text {
  font-size: clamp(24px, 4vw, 36px);
}
.logo-bars .bar {
  width: clamp(26px, 4vw, 34px);
  height: clamp(8px, 1vw, 10px);
}

/* --- SEXY HEADER FADE --- */
/* --- SEAMLESS HEADER FADE INTO TOP GREY --- */
.header-fade {
  position: relative;
  overflow: visible;
}

.header-fade::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -40px; /* fade sits below header */
  height: 40px;
  pointer-events: none;


}



body.dark .header-fade::after {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.12),
    var(--bg-top)
  );
}


/* --- PIE CHART --- */
.pie-chart {
  width: 220px;
  height: 220px;
  margin: 30px auto;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--box-shadow);
}

/* Each slice uses a conic-gradient trick */
.pie-chart::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    #5fa8e8 0% 32%,        /* DAX */
    #9ad3bc 32% 60%,       /* FTSE */
    #cdb4db 60% 82%,       /* CAC */
    #ffd6ba 82% 92%,       /* SMI */
    #f7c6e0 92% 100%       /* AEX */
  );
}

/* --- LEGEND --- */
.pie-legend {
  list-style: none;
  padding: 0;
  margin: 20px auto 0 auto;
  max-width: 260px;
  font-size: 14px;
  color: var(--text);
}

.pie-legend li {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.pie-legend .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

/* Colors match your sparkline palette */
.dot.dax { background: #5fa8e8; }
.dot.ftse { background: #9ad3bc; }
.dot.cac { background: #cdb4db; }
.dot.smi { background: #ffd6ba; }
.dot.aex { background: #f7c6e0; }

/* Mobile tweaks */
@media (max-width: 480px) {
  .ka-title { font-size: 20px; }
  .knowledge-article { font-size: 15px; }
  .pie-chart { width: 180px; height: 180px; }
}

/* --- SUBPAGE CHART REFINEMENTS --- */
.subpage-container .sparkline-wrapper {
  height: 80px; /* more breathing room */
  margin-top: 20px;
}

.subpage-container .y-max {
  top: -18px;
}

.subpage-container .y-min {
  bottom: -12px;
}

.subpage-container .x-start,
.subpage-container .x-end {
  bottom: -26px;
  font-size: 12px;
}

.subpage-container .box-header {
  margin-bottom: 18px; /* more space under title */
}

.subpage-container .status {
  margin-left: 10px;
  font-size: 12px;
}

.subpage-container .change {
  margin-left: 10px;
  font-size: 15px;
}

.subpage-container .data-source {
  margin-top: 10px;
  font-size: 11px;
  opacity: 0.6;
  text-align: right;
}

