* {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
    background: #f3f4f6;
    color: #111827;
  }

  a {
    color: #2563eb;
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }

  .page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: conic-gradient(
      from 180deg,
      #22c55e,
      #0ea5e9,
      #a855f7,
      #22c55e
    );
    padding: 2px;
  }

  .brand-logo-inner {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #111827;
    font-size: 16px;
  }

  .brand-text h1 {
    font-size: 18px;
    margin: 0;
    color: #111827;
  }

  .brand-text p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
  }

  .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 13px;
  }

  .status-line {
    color: #4b5563;
  }

  .status-line strong {
    color: #111827;
  }

  .meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    color: #4b5563;
  }

  .meta-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
  }

  .layout {
    flex: 1;
    display: flex;
    min-height: 0;
  }

  .sidebar {
    width: 260px;
    border-right: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  .sidebar h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin: 0 0 4px 0;
  }

  .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
  }

  .search-box input {
    flex: 1;
    border: none;
    background: transparent;
    color: #111827;
    font-size: 14px;
    outline: none;
  }

  .search-box span {
    font-size: 14px;
    color: #9ca3af;
  }

  .filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
  }

  .filter-row select {
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    padding: 2px 6px;
    width: 170px;
  }

  .filter-row + .filter-row {
    margin-top: 4px;
  }

  .ticker-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    max-height: calc(100vh - 180px);
    overflow: auto;
  }

  .ticker-item {
    border-bottom: 1px solid #f3f4f6;
  }

  .ticker-item:last-child {
    border-bottom: none;
  }

  .ticker-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-size: 14px;
    color: #111827;
  }

  .ticker-link:hover {
    background: #f3f4f6;
    text-decoration: none;
  }

  .ticker-link.active {
    background: #e5f2ff;
  }

  .ticker-symbol {
    font-weight: 600;
    margin-right: 6px;
  }

  .ticker-name {
    font-size: 13px;
    color: #6b7280;
    flex: 1;
    margin-right: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ticker-pill {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    background: #f9fafb;
  }

  .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .hero-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .hero-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .hero-meta-line {
    font-size: 14px;
    color: #6b7280;
  }

  .hero-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #111827;
  }

  .hero-price-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    margin-top: 4px;
  }

  .hero-price {
    font-size: 22px;
    font-weight: 600;
  }

  .hero-change {
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
  }

  .hero-change.positive {
    border-color: #bbf7d0;
    color: #15803d;
    background: #f0fdf4;
  }

  .hero-change.negative {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
  }

  .hero-sub {
    margin-top: 4px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
  }

  .hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .hero-chip-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
  }

  .hero-chip.hero-chip-yes {
    border-color: #bbf7d0;
    background: #f0fdf4;
  }

  .hero-chip.hero-chip-no {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #9ca3af;
  }

  .hero-chip-label {
    color: #6b7280;
  }

  .hero-chip-value {
    font-weight: 600;
    color: #111827;
  }

  .tags-row {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
  }

  .tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    background: #f9fafb;
  }

  .content {
    flex: 1;
    padding: 16px 20px 20px 20px;
    overflow: auto;
  }

  .tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
  }

  .tab-button {
    font-size: 15px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    font-weight: 600;
  }

  .tab-button.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
  }

  .tab-panel {
    display: none;
  }

  .tab-panel.active {
    display: block;
  }

  .card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 14px 14px 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
  }

  .card h2 {
    font-size: 15px;
    margin: 0 0 4px 0;
    color: #111827;
    font-weight: 900;
  }

  .card small {
    font-size: 13px;
    color: #6b7280;
  }

  .data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #f3f4f6;
  }

  .data-table th {
    text-align: left;
    color: #6b7280;
    font-weight: 500;
    font-size: 11px;
  }

  .data-table td {
    text-align: left;
    font-size: 15px;;
  }

  .label {
    color: #6b7280;
    width: 45%;
    white-space: nowrap;
  }

  .value {
    color: #111827;
  }

  .muted {
    color: #6b7280;
    font-size: 12px;
  }

  .news-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 0 0;
    font-size: 12px;
  }

  .news-item {
    padding: 4px 0;
    border-bottom: 1px solid #f3f4f6;
  }

  .news-item:last-child {
    border-bottom: none;
  }

  .news-item strong {
    color: #111827;
  }

  .pagination {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
  }

  .pagination-buttons {
    display: flex;
    gap: 6px;
  }

  .pagination button {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
  }

  .pagination button:disabled {
    opacity: 0.4;
    cursor: default;
  }

  .pagination button:hover:not(:disabled) {
    background: #f3f4f6;
  }

  .fund-chart-wrapper {
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    margin-top: 10px;
    min-height: 220px;
    border: 1px solid #e5e7eb;
  }

 canvas {
    width: 100%;
    max-height: 220px;
    width:100% !important
  }

  /* Price chart container */
  #price-chart-container {
    width: 100%;
    background: white;
  }

  @media (max-width: 900px) {
    .layout {
      flex-direction: column;
    }

    .sidebar {
      width: 100%;
      border-right: none;
      border-bottom: 1px solid #e5e7eb;
    }

    .main {
      width: 100%;
    }

    .hero-top-row {
      flex-direction: column;
      align-items: flex-start;
    }

    .hero-right {
      align-items: flex-start;
    }
  }
  /* Technical grid layout */
  /* ---- Technical layout ---- */
.tech-hero-grid,
.tech-secondary-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px 32px; /* vertical, horizontal */
  align-items: flex-start;
}
.tech-section {
  padding: 1rem;
  border-bottom: 1px solid #e1e1e1;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  background: whitesmoke;
  border-radius: 12px;
}

.tech-section h3 {
  font-weight: 900;
  font-size: 18px;
}

.tech-fullwidth {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}
/* ------------------------------
Summary Chips (top-highlights)
------------------------------ */
.tech-summary-bar {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 18px;
}

.summary-chip {
padding: 6px 12px;
font-size: 13px;
border-radius: 20px;
font-weight: 600;
background: #f1f5f9;      /* default: soft gray */
color: #334155;
border: 1px solid #e2e8f0;
}

/* Colors */
.bullish-chip {
background: #dcfce7;
color: #166534;
border-color: #bbf7d0;
}

.bearish-chip {
background: #fee2e2;
color: #991b1b;
border-color: #fecaca;
}

.caution-chip {
background: #fef9c3;
color: #854d0e;
border-color: #fef08a;
}

.info-chip {
background: #eff6ff;
color: #1e40af;
border-color: #bfdbfe;
}

/* ------------------------------
   Scorecard
------------------------------ */
.tech-scorecard {
  display: flex;
  flex-wrap: wrap;
  gap: 0px;
  margin: 0 0 10px 0;
  padding: 8px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.score-item {
flex: 0 0 160px;
font-size: 13px;
}

.score-item-title {
font-weight: 600;
color: #475569;
margin-bottom: 3px;
}

.stars {
font-size: 16px;
color: #f59e0b; /* amber */
}

/* ------------------------------
Hero & Secondary Grids
------------------------------ */
.tech-hero-grid,
.tech-secondary-grid {
grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
gap: 24px 48px;
align-items: flex-start;
}

.tech-col {
max-width: 100%;
}

/* ------------------------------
Badges for important rows
------------------------------ */
.badge {
padding: 2px 8px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
display: inline-block;
margin-left: 6px;
}

.badge-bullish { background: #dcfce7; color: #166534; }
.badge-bearish { background: #fee2e2; color: #991b1b; }
.badge-caution { background: #fef9c3; color: #854d0e; }
.badge-neutral { background: #e2e8f0; color: #475569; }

/* Highlight rows */
tr.highlight-row td {
background: #f8fafc;
font-weight: 600;
}
.slope-card {
margin-top: 18px;
padding: 14px 16px;
border-radius: 12px;
border: 1px solid #e2e8f0;
background: #f8fafc;
}

.slope-tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 10px;
}
.fund-wrapper { display: flex; flex-direction: column; gap: 16px; }
.fund-section { background:#fff; border-radius:8px; padding:16px; box-shadow:0 1px 3px rgba(0,0,0,0.06); }
.fund-section-title { font-size:16px; font-weight:600; margin-bottom:8px; }
.fund-header { display:flex; justify-content:space-between; gap:16px; }
.fund-chips-row { display:flex; flex-wrap:wrap; gap:8px; }
.fund-chip { padding:6px 10px; border-radius:999px; border:1px solid #e0e0e0; font-size:12px; }
.fund-chip-primary { border-color:#2563eb; }
.fund-chip-risk { border-color:#f97316; }
.fund-charts-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; }
.fund-chart-canvas-wrap { position:relative; height:200px; }
.fund-card { background:#fafafa; border-radius:8px; padding:12px; }
.fund-table { width:100%; border-collapse:collapse; font-size:12px; }
.fund-table th, .fund-table td { padding:4px 6px; border-bottom:1px solid #eee; }
.fund-tab-btn.active { border-bottom:2px solid #2563eb; font-weight:600; }
.fund-tab-panel { display:none; }
.fund-tab-panel.active { display:block; }
.rsi-neutral {
    background: #e3edf7;
    color: #2b3e55;
  }
  
  .rsi-overbought {
    background: #e6ffe5;
    color: #2e7d32;
  }
  
  .rsi-extreme-overbought {
    background: #ccffcc;
    color: #1b5e20;
  }
  
  .rsi-oversold {
    background: #ffe5e5;
    color: #c62828;
  }
  
  .rsi-extreme-oversold {
    background: #ffcccc;
    color: #b71c1c;
  }
  
  .chip-muted {
    background: #f1f1f1;
    color: #999;
  }
  /* ---------------------------------------------
   NEWS LIST
--------------------------------------------- */
.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .news-item {
    padding: 14px 10px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    gap: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
  }
  
  .news-item:hover {
    background: #fafafa;
  }
  
  /* Thumbnail */
  .news-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
  }
  
  /* Title + content wrapper */
  .news-item .news-content {
    flex: 1;
  }
  
  .news-item .news-title {
    font-size: 15px;
    font-weight: 600;
    color: #0050b3;
    text-decoration: none;
  }
  
  .news-item .news-title:hover {
    text-decoration: underline;
  }
  
  /* Publisher + time line */
  .news-item .news-meta {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
  }
  
  /* Summary text */
  .news-item .news-summary {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
    line-height: 1.35;
  }
  
  /* No image alignment fix */
  .news-item.no-thumb {
    align-items: flex-start;
  }
  
  /* ---------------------------------------------
     PAGINATION
  --------------------------------------------- */
  .pagination {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .pagination span {
    font-size: 13px;
    color: #777;
  }
  
  .pagination-buttons button {
    background: #fff;
    border: 1px solid #d0d0d0;
    padding: 5px 12px;
    margin-left: 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
  }
  
  .pagination-buttons button:hover:not(:disabled) {
    background: #f0f0f0;
  }
  
  .pagination-buttons button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  /* ============================================================
   FUNDAMENTALS UI – FULL PRODUCTION CSS
   Supports STOCK + ETF views
   Clean TradingView-style aesthetics
=============================================================== */

:root {
    --fund-bg: #ffffff;
    --fund-card-bg: #fafafa;
    --fund-border: #e5e5e5;
    --fund-text: #111;
    --fund-muted: #666;
    --fund-accent: #2c6bed;
    --fund-title: #222;
    --fund-chip-bg: #f3f5ff;
    --fund-chip-border: #d4dcff;
  }
  
  /* ---------------------------
     MAIN SECTION WRAPPER
  ----------------------------*/
  .fund-wrapper {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 10px;
    padding-bottom: 40px;
  }
  
  /* ---------------------------
     SECTION TITLES
  ----------------------------*/
  .fund-section {
    background: var(--fund-bg);
    padding: 0;
  }
  
  .fund-section-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--fund-title);
    border-left: 4px solid var(--fund-accent);
    padding-left: 10px;
  }
  
  /* ---------------------------
     HEADER
  ----------------------------*/
  .fund-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 12px;
    border: 1px solid var(--fund-border);
    border-radius: 8px;
    background: var(--fund-card-bg);
  }
  
  .fund-header-left .fund-symbol {
    font-size: 28px;
    font-weight: 700;
    color: var(--fund-accent);
  }
  
  .fund-header-left .fund-name {
    font-size: 18px;
    font-weight: 500;
    margin-top: 2px;
  }
  
  .fund-subtitle {
    font-size: 14px;
    color: var(--fund-muted);
    margin-top: 2px;
  }
  
  .fund-header-right {
    display: flex;
    gap: 18px;
    align-items: center;
  }
  
  .fund-header-stat {
    text-align: right;
  }
  
  .fund-header-stat-label {
    font-size: 12px;
    color: var(--fund-muted);
  }
  
  .fund-header-stat-value {
    font-size: 16px;
    font-weight: 600;
  }
  
  /* ---------------------------
     KEY FUNDAMENTALS (CHIPS)
  ----------------------------*/
  .fund-section-chips {
    margin-top: 5px;
  }
  
  .fund-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .fund-chip {
    background: var(--fund-chip-bg);
    border: 1px solid var(--fund-chip-border);
    padding: 10px 14px;
    border-radius: 8px;
    min-width: 120px;
  }
  
  .fund-chip-label {
    font-size: 12px;
    color: var(--fund-muted);
  }
  
  .fund-chip-value {
    font-size: 16px;
    margin-top: 2px;
    font-weight: 600;
  }
  
  /* ---------------------------
     CHART CARDS
  ----------------------------*/
  .fund-section-charts {}
  
  .fund-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(48%, 1fr));
    gap: 20px;
  }
  
  .fund-chart-card {
    border: 1px solid var(--fund-border);
    border-radius: 8px;
    background: var(--fund-card-bg);
    padding: 12px;
    height: 320px;
    display: flex;
    flex-direction: column;
  }
  
  .fund-chart-title {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--fund-title);
    font-weight: 600;
  }
  
  .fund-chart-canvas-wrap {
    flex: 1 1 auto;
  }
  
  /* ---------------------------
     OVERVIEW CARDS
  ----------------------------*/
  .fund-overview-grid {
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 20px;
  }
  .fund-overview-grid .fund-card
  {
    margin-bottom: 1rem;
  }
  .fund-card {
    background: var(--fund-card-bg);
    border: 1px solid var(--fund-border);
    border-radius: 8px;
    padding: 14px;
  }
  
  .fund-card-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
  }
  
  /* ---------------------------
     TABLES
  ----------------------------*/
  .fund-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .fund-table td,
  .fund-table th {
    padding: 6px 8px;
    border-bottom: 1px solid var(--fund-border);
    font-size: 15px;
    text-align: left;
  }
  
  .fund-table-wide td,
  .fund-table-wide th {
    font-size: 14px;
  }
  
  .fund-kv-label {
    color: var(--fund-muted);
    width: 40%;
  }
  
  .fund-kv-value {
    color: var(--fund-text);
  }
  
  .fund-table-scroll {
    overflow-x: auto;
  }
  
  /* ---------------------------
     TEXT UTILS
  ----------------------------*/
  .fund-body-text {
    font-size: 14px;
    line-height: 1.45;
    color: var(--fund-text);
  }
  
  .muted {
    color: var(--fund-muted);
  }
  
  .small {
    font-size: 12px !important;
  }
  
  /* ---------------------------
     LISTS
  ----------------------------*/
  .fund-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .fund-list-item {
    padding: 4px 0;
    font-size: 14px;
    color: var(--fund-text);
  }
  
  /* ---------------------------
     TABS (Financial Statements)
  ----------------------------*/
  .fund-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
  }
  
  .fund-tab-btn {
    padding: 8px 16px;
    border-radius: 6px;
    background: #f0f0f0;
    border: 1px solid var(--fund-border);
    cursor: pointer;
    font-size: 14px;
  }
  
  .fund-tab-btn.active {
    background: var(--fund-accent);
    border-color: var(--fund-accent);
    color: #fff;
  }
  
  .fund-tabs-content {}
  
  .fund-tab-panel {
    display: none;
  }
  
  .fund-tab-panel.active {
    display: block;
    animation: fadein 0.2s ease-in;
  }
  
  /* ---------------------------
     ANIMATIONS
  ----------------------------*/
  @keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .fund-list-item {
    padding: 0;
    line-height: 1.35;   /* tighter block */
    font-size: 14px;
    color: var(--fund-text);
  }
  /* 2-column valuation layout */
.valuation-grid {
    grid-template-columns: 0.9fr 1.1fr; /* left a bit narrower, right a bit wider */
    gap: 32px;
    align-items: flex-start;
  }
  
  /* Columns */
  .val-col {
    min-width: 0;
  }
  
  /* Remove extra spacing on the right title */
  .val-col h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 0.95rem;
  }
  
  /* Tables in valuation section */
  .valuation-grid .data-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .valuation-grid .data-table th,
  .valuation-grid .data-table td {
    padding: 6px 8px;
    font-size: 0.9rem;
  }
  
  /* Scenario row highlighting */
  .scenario-worst {
    background: rgba(255, 0, 0, 0.06);
  }
  
  .scenario-base {
    background: rgba(128, 128, 128, 0.03);
  }
  
  .scenario-bull {
    background: rgba(0, 180, 0, 0.07);
  }
  
  .scenario-current {
    background: rgba(0, 120, 255, 0.05);
  }
  
  /* Make Upside column text centered for readability */
  .valuation-grid .data-table td:nth-child(3),
  .valuation-grid .data-table th:nth-child(3) {
    text-align: center;
  }
  
  /* Responsive: stack columns on small screens */
  @media (max-width: 900px) {
    .valuation-grid {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  }
  .sec10k-meta {
    margin: 12px 0 16px;
    font-size: 13px;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  
  .sec10k-meta a {
    color: #0366d6;
    text-decoration: none;
  }
  
  .sec10k-meta a:hover {
    text-decoration: underline;
  }
  
  .sec10k-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .sec10k-chip {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #ddd;
    background: #fafafa;
    cursor: pointer;
  }
  
  .sec10k-chip:hover {
    background: #f0f0f0;
  }
  
  .sec10k-section {
    border-radius: 10px;
    border: 1px solid #e2e2e2;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: #fff;
  }
  
  .sec10k-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }
  
  .sec10k-section-title {
    font-size: 16px;
    font-weight: 600;
  }
  
  .sec10k-toggle {
    font-size: 12px;
    color: #666;
  }
  
  .sec10k-body {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    max-height: 220px;
    overflow: hidden;
    position: relative;
  }
  
  .sec10k-body.expanded {
    max-height: none;
  }
  
  .sec10k-body::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
    pointer-events: none;
  }
  
  .sec10k-body.expanded::after {
    display: none;
  }
  
  .sec10k-empty {
    font-size: 13px;
    color: #888;
    font-style: italic;
  }
  /* Pills for rating */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.pill-strong-buy { background: #0b8457; color: #fff; }
.pill-buy        { background: #1f8fdd; color: #fff; }
.pill-hold       { background: #f0ad4e; color: #222; }
.pill-sell       { background: #d9534f; color: #fff; }
.pill-muted      { background: #f0f0f0; color: #666; }

/* Price target row */
.pt-container { margin-top: 6px; }
.pt-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pt-label {
  font-size: 12px;
  color: #777;
}
.pt-values {
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.pt-price {
  font-weight: 600;
}
.pt-vs {
  color: #777;
  font-size: 12px;
}
.badge-up,
.badge-down {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.badge-up {
  background: rgba(11, 132, 87, 0.1);
  color: #0b8457;
}
.badge-down {
  background: rgba(217, 83, 79, 0.1);
  color: #d9534f;
}

/* Upgrades/downgrades list */
.ud-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ud-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
}
.ud-date {
  min-width: 70px;
  color: #777;
}
.ud-firm {
  font-weight: 600;
}
.ud-change {
  color: #444;
}

/* Analyst grid */
.analyst-detail .analyst-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 12px;
  margin-top: 10px;
}
.analyst-detail .card {
  padding: 10px 12px;
}
.analyst-detail h3 {
  margin-top: 0;
  font-size: 14px;
}
.analyst-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.analyst-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.analyst-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card-sub {
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid #eee;
}

.card-sub-wide {
  grid-column: span 2;
}

.ownership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.metric-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.metric-list li {
  margin-bottom: 0.35rem;
}

.mt-8 { margin-top: 0.5rem; }
.mt-12 { margin-top: 0.75rem; }
.tiny { font-size: 0.75rem; }

.analyst-detail .card-sub {
  background: #fff;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  margin-bottom: 22px;
}

.analyst-detail h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.data-table.compact {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.data-table.compact th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  color: #333;
  background: #fafafa;
  border-bottom: 1px solid #e5e5e5;
}

.data-table.compact td {
  font-size: 12px;
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0f0;
  color: #222;
}

.data-table.compact tr:last-child td {
  border-bottom: none;
}

/* Muted text */
.muted {
  color: #888 !important;
}

.small {
  font-size: 12px !important;
}

.tiny {
  font-size: 11px !important;
}
.hl-up   { color: #0a8a0a !important; font-weight: 600; }
.hl-down { color: #c60000 !important; font-weight: 600; }
.hl-warn { color: #bb8300 !important; font-weight: 600; }

.ticker-macro-wrapper {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e4ea;
  background: #ffffff;
}

.ticker-macro-heading {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
}

.ticker-macro-subtitle {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #6b7280;
}

.ticker-macro-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticker-macro-item {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  background: #f9fafb;
}

.ticker-macro-header-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 3px;
}

.ticker-macro-title {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 600;
}

.ticker-macro-title a {
  color: #2563eb;
  text-decoration: none;
}

.ticker-macro-title a:hover {
  text-decoration: underline;
}

.ticker-macro-summary {
  margin: 0;
  font-size: 11px;
  color: #4b5563;
}

.ticker-macro-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: #6b7280;
}

.ticker-macro-pagination button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
}

.ticker-macro-pagination button[disabled] {
  opacity: 0.4;
  cursor: default;
}
/* ============================
   EXTENDED HOURS
============================ */
.eh-wrapper {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}
.eh-row {
  display: flex;
  justify-content: space-between;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f9fafb;
}
.eh-title {
  font-weight: 600;
}
.eh-values {
  display: flex;
  gap: 12px;
  font-size: 13px;
}
.eh-change {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* ============================
   TECH OVERVIEW GRID
============================ */
.overview-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 14px;
}
.overview-box {
  background:#f8fafc;
  border:1px solid #e5e7eb;
  padding:10px 12px;
  border-radius:10px;
}
.ov-label {
  font-size:12px;color:#6b7280;
}
.ov-value {
  margin-top:3px;
  font-size:15px;
  font-weight:600;
}

/* ============================
   MOMENTUM HEAT TILES
============================ */
.mom-wrapper {
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(110px,1fr));
  gap:12px;
}
.mom-tile {
  border-radius:10px;
  padding:12px 10px;
  border:1px solid #e2e8f0;
}
.mom-label {
  font-size:12px;
  color:#555;
}
.mom-value {
  margin-top:4px;
  font-size:14px;
  font-weight:600;
}

/* ============================
   52W RANGE BAR
============================ */
.range-bar {
  margin-top:12px;
  width:100%;
  height:10px;
  background:#e5e7eb;
  border-radius:10px;
  overflow:hidden;
}
.range-fill {
  height:100%;
  background:#2563eb;
}
.range-labels {
  margin-top:6px;
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:#6b7280;
}
.summary-chip {
  display: inline-block;
  padding: 4px 8px;
  margin: 2px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.summary-chip.bullish {
  background: rgba(0, 170, 0, 0.12);
  color: #008a00;
}

.summary-chip.bearish {
  background: rgba(200, 0, 0, 0.12);
  color: #b00020;
}

.summary-chip.neutral {
  background: rgba(120, 120, 120, 0.10);
  color: #555;
}

.summary-chip.warning {
  background: rgba(255, 165, 0, 0.16);
  color: #b36b00;
}

.highlight-pos {
  font-weight: 600;
  color: #008a00;
}

.highlight-neg {
  font-weight: 600;
  color: #b00020;
}

.highlight-warn {
  font-weight: 600;
  color: #b36b00;
}

tr.hot-row {
  background: rgba(255, 215, 0, 0.08);
}

/* Simple layout helpers if you need them */
.tech-summary-bar { margin-bottom: 8px; }
.tech-scorecard {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.score-item { min-width: 120px; }
.stars { font-size: 14px; }

.tech-chart-grid,
.tech-hero-grid,
.tech-secondary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.tech-advanced-block {
  margin-top: 12px;
}

.tech-advanced-block > summary {
  cursor: pointer;
  font-weight: 600;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
}

.data-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #eee;
}

.data-table td.label {
  font-weight: 500;
  color: #555;
}

.muted {
  color: #777;
  font-size: 12px;
}

.as-of {
  margin-bottom: 4px;
}
/* -----------------------------------
   CHIP STYLING
-------------------------------------- */

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  margin: 3px 5px 3px 0;
  background: #f2f2f2;
  color: #444;
  border: 1px solid #ddd;
  white-space: nowrap;
  font-weight: 500;
}

.chip.bullish {
  background: #e9f9ef;
  border-color: #34a853;
  color: #1d7b3b;
}

.chip.bearish {
  background: #fde8e7;
  border-color: #d93025;
  color: #a12015;
}

.chip.neutral {
  background: #f7f7f7;
  border-color: #cccccc;
  color: #666;
}

.chip.warning {
  background: #fff8e1;
  border-color: #fbbc04;
  color: #a67a00;
}

/* Hover for clickable chips */
.chip.clickable { cursor: pointer; }
.chip.clickable:hover { opacity: 0.8; }



/* -----------------------------------
   TECH SUBNAV (Horizontal Anchor Menu)
-------------------------------------- */

.tech-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0 18px;
  border-bottom: 1px solid #e2e2e2;
  margin-bottom: 15px;
}

.tech-subnav-link {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none !important;
  color: #1a73e8;
  background: #eef5ff;
  transition: background 0.15s ease, color 0.15s ease;
}

.tech-subnav-link:hover {
  background: #dcebff;
}

.tech-subnav-link.active {
  background: #1a73e8;
  color: #fff;
}
.perf-table{
  border:0px
}
.perf-table td {
  padding: 4px 8px;
  vertical-align: middle;
}

.perf-pos  { color: #1a7f37; }   /* positive returns */
.perf-neg  { color: #b42318; }   /* negative returns */
.perf-flat { color: #555; }

.perf-bar-cell {
  width: 120px;
}

.perf-bar {
  height: 6px;
  border-radius: 3px;
}

.perf-bar-pos {
  background: rgba(26, 127, 55, 0.6);
}

.perf-bar-neg {
  background: rgba(180, 35, 24, 0.7);
}

.perf-bar-flat {
  background: #ccc;
}
.perf-group{
  margin-bottom: 1rem;
    margin-top: 0;
    padding: 0px 1rem 1rem;
    background: whitesmoke;
    border-radius: 12px;
}
.metric-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.metric-card {
  background: #f5f7ff;
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 130px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.metric-card-label {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 2px;
}

.metric-card-value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

/* Color accents based on signal */
.metric-card.bullish .metric-card-value {
  color: #16a34a;
}

.metric-card.bearish .metric-card-value {
  color: #b91c1c;
}

.metric-card.warning .metric-card-value {
  color: #b45309;
}

.metric-card.neutral .metric-card-value {
  color: #111827;
}
.subheading{
  font-weight: 700;
}
/* --- Price strip (Last / Change / High / Low) --- */
.price-strip {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-size: 13px;
  margin-bottom: 8px;
}

.price-strip span {
  white-space: nowrap;
}

.ps-change-positive {
  color: #16a34a;
  font-weight: 600;
}

.ps-change-negative {
  color: #dc2626;
  font-weight: 600;
}

/* --- Range buttons + overlay controls --- */
.price-control,
.overlay-control {
  margin: 6px 0;
  font-size: 13px;
}

.price-control .label,
.toolbar-section .label {
  color: #6b7280;
  margin-right: 6px;
  font-weight: 500;
}

.range-buttons {
  display: inline-flex;
  gap: 6px;
}

.range-btn {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.range-btn.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.toolbar-section label {
  margin-right: 10px;
  font-size: 12px;
  cursor: pointer;
}
.tv-lightweight-charts canvas {
  max-height: 85% !important;
}
.chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 13px;
}

.chart-toolbar .toolbar-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-toolbar button,
.chart-toolbar select {
  cursor: pointer;
  font-size: 13px;
  padding: 4px 6px;
}

.range-btn.active {
  background: #2563eb;
  color: white;
  border-radius: 4px;
}
#chart-fs-btn{
  font-size: 20px;
}
.fs-exit-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #b91c1c;
  border: none;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  z-index: 100000;
  font-size: 12px;
  display: none;              /* <- default = hidden */
}

/* when wrapper is fullscreen, show it */
.chart-fs-wrapper .fs-exit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chart-fs-wrapper .fs-visible{
  justify-content: normal !important;
  gap: 16px;
}
.chart-fs-wrapper .fs-visible #chart-fs-btn{
  display: none;
}
.chart-fs-wrapper .chart-toolbar{
  margin-bottom: 0px !important;
}