@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root, [data-theme="light"] {
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #059669;
  --accent2: #10b981;
  --gold: #b45309;
  --gold2: #d97706;
  --red: #e11d48;
  --blue: #2563eb;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 4px 20px rgba(0,0,0,0.05);
}

[data-theme="dark"] {
  --bg: #15161a;
  --bg-soft: #1c1d21;
  --surface: #1e2024;
  --surface-alt: #24272e;
  --text: #ece9e3;
  --muted: #9b978e;
  --line: #2b2d32;
  --line-strong: #3a3d43;
  --accent: #16a378;
  --accent2: #1bb083;
  --gold: #caa24a;
  --gold2: #d9b157;
  --red: #e5484d;
  --blue: #3b82f6;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

/* NAVBAR (FLOATING & BLURRY GLASSMORPHISM) */
header.top-nav {
  height: 68px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: background 0.25s ease, border-color 0.25s ease;
}

[data-theme="dark"] header.top-nav {
  background: rgba(21, 22, 26, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: #0d0f12;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  color: var(--accent2);
  font-weight: 900;
  font-size: 1.1rem;
}

/* SCREENER STYLE SEARCH & DROPDOWN */
.search-wrapper {
  position: relative;
}

.nav-search {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 18px;
  gap: 10px;
  width: 380px;
  transition: 0.2s border-color;
}

.nav-search:focus-within {
  border-color: var(--accent);
}

.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  width: 100%;
}

.search-dropdown {
  position: absolute;
  top: 42px;
  left: 0;
  width: 420px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
  max-height: 360px;
  overflow-y: auto;
  z-index: 150;
}

.search-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover, .search-item.selected {
  background: var(--surface-alt);
}

.search-item-info {
  display: flex;
  flex-direction: column;
}

.search-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.search-item-ticker {
  font-size: 0.74rem;
  color: var(--muted);
}

.search-item-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--gold);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pill-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}

.pill-btn:hover {
  border-color: var(--accent);
}

/* MAIN CONTAINER */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* VIEW SWITCHER TABS */
.main-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.view-tab {
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: 0.2s;
}

.view-tab.active {
  background: var(--accent);
  color: #003b2d;
  border-color: var(--accent);
}

/* TOP SCENARIO CARDS (VALUATION TOOL) */
.scenario-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.scenario-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.scenario-card.active-card {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.scenario-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.scenario-cagr {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cagr-positive {
  color: var(--accent2);
}

.cagr-negative {
  color: var(--red);
}

.scenario-target {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 6px;
}

.scenario-target strong {
  color: var(--text);
}

/* ACCORDIONS & CONTROLS */
.sub-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue);
}

.sub-controls a {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.sub-controls a:hover {
  text-decoration: underline;
}

/* KEY RATIOS DRAWER */
.key-ratios-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.ratios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.ratio-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  border: 1px solid var(--line);
}

.ratio-lbl {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.ratio-val {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text);
  margin-top: 2px;
}

/* CHART DRAWER */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

/* CASE TABS & PROBABILITY BAR */
.case-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.case-tabs {
  display: flex;
  gap: 8px;
}

.case-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: 0.15s;
}

.case-btn.active {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--blue);
}

.probability-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.prob-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
}

.prob-chip input {
  width: 45px;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 800;
  text-align: center;
  font-family: var(--font);
  outline: none;
}

/* MODELLING TABLE CARD */
.modelling-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.modelling-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.modelling-title-wrap h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-badge {
  background: #2563eb;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.modelling-subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.table-actions {
  display: flex;
  gap: 8px;
  position: relative;
}

.table-action-btn {
  padding: 6px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: 0.15s;
}

.table-action-btn:hover {
  border-color: var(--accent);
}

/* COPY DROPDOWN MENU */
.copy-menu {
  position: absolute;
  top: 36px;
  right: 140px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  width: 220px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.copy-menu-item {
  padding: 9px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}

.copy-menu-item:last-child {
  border-bottom: none;
}

.copy-menu-item:hover {
  background: var(--surface-alt);
  color: var(--accent2);
}

/* FINANCIAL TABLE */
.table-responsive {
  overflow-x: auto;
}

table.financial-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: right;
}

table.financial-table th,
table.financial-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.financial-table th {
  background: var(--bg-soft);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

table.financial-table th:first-child,
table.financial-table td:first-child {
  text-align: left;
  font-weight: 700;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 10;
  border-right: 1px solid var(--line);
  color: var(--text);
}

table.financial-table th.estimate-col {
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 8%, var(--bg-soft));
}

table.financial-table td.estimate-cell {
  background: color-mix(in srgb, var(--gold) 4%, var(--surface));
  font-weight: 600;
}

table.financial-table td.estimate-cell input {
  background: transparent;
  border: 1px dashed var(--gold);
  border-radius: 4px;
  color: var(--gold2);
  font-weight: 800;
  text-align: right;
  font-family: var(--font);
  font-size: 0.85rem;
  width: 65px;
  padding: 2px 4px;
  outline: none;
}

.val-positive {
  color: var(--accent2);
  font-weight: 700;
}

.val-negative {
  color: var(--red);
  font-weight: 700;
}

/* QUANT COCKPIT SECTION */
.cockpit-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.cockpit-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.cockpit-panel h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* TICKET BOX */
.trade-ticket {
  background: #0f1216;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  padding: 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  color: #c9d1d9;
  line-height: 1.6;
  margin-bottom: 16px;
}

.trade-ticket .hl {
  color: var(--accent2);
  font-weight: 700;
}

.trade-ticket .warn {
  color: var(--gold);
  font-weight: 700;
}

.approval-actions {
  display: flex;
  gap: 12px;
}

.btn-approve {
  flex: 1;
  padding: 14px;
  background: var(--accent);
  color: #003b2d;
  font-weight: 800;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-approve:hover {
  filter: brightness(1.1);
}

.btn-decline {
  flex: 1;
  padding: 14px;
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-decline:hover {
  background: color-mix(in srgb, var(--red) 12%, transparent);
}

/* STATS STRIP */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
}

.stat-box .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.stat-box .val {
  font-size: 1.3rem;
  font-weight: 900;
  margin-top: 4px;
}

/* SCREENER STATEMENT TABLES (CASH FLOW, BALANCE SHEET, SHAREHOLDING) */
.screener-statement-card {
  margin-top: 24px;
}

table.screener-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: right;
}

table.screener-table th,
table.screener-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.screener-table th {
  background: var(--bg-soft);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

table.screener-table th:first-child,
table.screener-table td:first-child {
  text-align: left;
  font-weight: 700;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 10;
  border-right: 1px solid var(--line);
  color: var(--text);
}

table.screener-table tr:hover td {
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

table.screener-table tr:hover td:first-child {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

table.screener-table tr.row-bold td {
  font-weight: 800;
  color: var(--text);
  border-top: 1.5px solid var(--line-strong);
  border-bottom: 1.5px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg-soft) 60%, var(--surface));
}

table.screener-table tr.row-bold td:first-child {
  background: color-mix(in srgb, var(--bg-soft) 60%, var(--surface));
}

.screener-action-btn:hover {
  background: color-mix(in srgb, #6366f1 12%, transparent);
}

.shp-toggle-group {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.shp-tab-btn {
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: 0.15s;
}

.shp-tab-btn.active {
  background: var(--blue);
  color: #fff;
}

/* CAPEX PIPELINE & ORDER BOOK STYLING */
.capex-metric-tile {
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.capex-metric-tile:hover {
  transform: translateY(-2px);
  border-color: var(--blue) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

/* VERIFIED DATA AUDIT & CITATION DASHBOARD (MATCHING USER SCREENSHOT) */
.citation-audit-container {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.citation-audit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.citation-audit-table th {
  background: #ececec;
  color: #1e293b;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid #d1d5db;
  letter-spacing: 0.01em;
}

[data-theme="dark"] .citation-audit-table th {
  background: #1e293b;
  color: #f1f5f9;
  border-bottom: 1px solid #334155;
}

.citation-audit-table td {
  padding: 13px 18px;
  font-size: 0.89rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  line-height: 1.45;
}

.citation-audit-table tr:last-child td {
  border-bottom: none;
}

.citation-audit-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

[data-theme="dark"] .citation-audit-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.citation-metric-col {
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
  width: 22%;
}

.citation-val-col {
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
  width: 33%;
}

.citation-src-col {
  color: var(--text);
  font-size: 0.88rem;
  width: 45%;
}

.citation-page-bold {
  font-weight: 700;
  color: var(--text);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.audit-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   FAQ ACCORDION SECTION
   ========================================================================== */
.faq-container {
  margin-top: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.faq-header {
  margin-bottom: 20px;
}

.faq-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-header p {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 4px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.faq-question {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-chevron {
  transition: transform 0.25s ease;
  font-size: 0.85rem;
  color: var(--muted);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent2);
}

.faq-answer {
  display: none;
  padding: 0 18px 16px 18px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  padding-top: 12px;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ==========================================================================
   REGULATORY & STATUTORY DISCLAIMER CARD
   ========================================================================== */
.statutory-disclaimer-card {
  margin-top: 24px;
  background: color-mix(in srgb, var(--gold) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line));
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text);
}

.statutory-disclaimer-card .disclaimer-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.statutory-disclaimer-card p {
  margin-bottom: 8px;
}

.statutory-disclaimer-card p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   AUTHENTIC SCREENER-STYLE FOOTER
   ========================================================================== */
.screener-site-footer {
  margin-top: 48px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 48px 24px 36px 24px;
  color: var(--text);
}

.screener-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .screener-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 600px) {
  .screener-footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.footer-brand-col .footer-logo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-brand-col .footer-logo-text {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.footer-brand-col .footer-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent2);
}

.footer-brand-col .footer-tagline {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-brand-col .footer-corp-text {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.footer-contact-links {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
}

.footer-contact-links a {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.footer-contact-links a:hover {
  color: var(--accent2);
}

.footer-contact-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 600;
  width: fit-content;
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.15s;
}

.footer-nav-list a:hover {
  color: var(--text);
}

.footer-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--blue);
  color: var(--blue);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: 0.15s;
  width: fit-content;
}

.footer-install-btn:hover {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
}

.theme-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-choice-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 0;
  text-align: left;
  transition: color 0.15s;
}

.theme-choice-btn:hover {
  color: var(--text);
}

.theme-choice-btn.active {
  color: var(--blue);
  font-weight: 800;
}


/* NAV CATEGORIES (CENTER FLOATING) */
.nav-categories {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

[data-theme="dark"] .nav-categories {
  background: rgba(255, 255, 255, 0.05);
}

.nav-cat-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-cat-link:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .nav-cat-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-cat-link.active {
  color: #003b2d;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

[data-theme="dark"] .nav-cat-link.active {
  color: var(--accent2);
}

.nav-new-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--accent);
  color: #003b2d;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

/* TALK TO US GREEN PILL BUTTON */
.talk-to-us-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00875a;
  color: #ffffff !important;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 135, 90, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: -0.01em;
  margin-left: 10px;
}

.talk-to-us-btn:hover {
  background: #009f6b;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 135, 90, 0.45);
}

/* MAIN CATEGORY SWITCHER BAR */
.main-category-switcher-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 22px 0;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: fit-content;
}

.cat-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-tab-btn:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.cat-tab-btn.active {
  background: var(--accent);
  color: #003b2d;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.25);
}

.tab-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.12);
  color: inherit;
}

/* FLOATING CIRCULAR WHATSAPP BUTTON (BOTTOM RIGHT) */
.floating-whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  background: #25D366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: 1999;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
}

.floating-whatsapp-fab:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

/* FOOTER WHATSAPP PILL BUTTON */
.footer-whatsapp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #ffffff !important;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 3px 12px rgba(37, 211, 102, 0.35);
  width: fit-content;
}

.footer-whatsapp-pill:hover {
  background: #20ba5a;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(37, 211, 102, 0.45);
}

/* INSTITUTIONAL RESEARCH SUITE HERO & CARDS */
.inst-hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 22px;
  gap: 20px;
}

.inst-badge {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--accent2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.inst-hero-left h2 {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}

.inst-hero-left p {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 6px;
  max-width: 720px;
  line-height: 1.5;
}

.inst-reliability-box {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 220px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.inst-rel-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.inst-rel-score {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin: 2px 0;
}

.inst-rel-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

.inst-cards-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.inst-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.inst-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.inst-card-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.inst-step-num {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #003b2d;
  font-weight: 900;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inst-card-title h3 {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.inst-card-sub {
  font-size: 0.76rem;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.inst-status-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.pill-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent2);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pill-gold {
  background: rgba(217, 119, 6, 0.15);
  color: var(--gold);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.pill-red {
  background: rgba(225, 29, 72, 0.15);
  color: var(--red);
  border: 1px solid rgba(225, 29, 72, 0.3);
}

.pill-blue {
  background: rgba(37, 99, 235, 0.15);
  color: var(--blue);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.pill-accent {
  background: var(--accent);
  color: #003b2d;
  font-weight: 900;
}

.inst-card-footer {
  margin-top: 12px;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

/* PEAD LAYOUT */
.pead-dashboard-layout {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--bg-soft);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.pead-score-display {
  display: flex;
  align-items: center;
  gap: 14px;
  border-right: 1px solid var(--line);
  padding-right: 20px;
}

.pead-gauge-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0% 42%, var(--line) 42% 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pead-gauge-circle::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--surface);
}

.pead-score-num {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--accent);
  position: relative;
  z-index: 2;
  line-height: 1;
}

.pead-score-max {
  font-size: 0.68rem;
  color: var(--muted);
  position: relative;
  z-index: 2;
  font-weight: 700;
}

.pead-latency {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent2);
}

.pead-time {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 2px;
}

.pead-metrics-triad {
  display: flex;
  gap: 16px;
  flex: 1;
}

.pead-metric-box {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.pead-metric-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  display: block;
}

.pead-metric-val {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 3px 0;
  display: block;
}

.pead-metric-val.positive {
  color: var(--accent2);
}

.pead-metric-sub {
  font-size: 0.68rem;
  color: var(--muted);
}

.pead-pdf-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.inst-pdf-btn {
  border-color: var(--accent) !important;
  color: var(--accent2) !important;
  font-weight: 700;
  text-decoration: none;
}

/* ORDER BOOK METRICS GRID */
.ob-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.ob-metric-tile {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.ob-m-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted);
  display: block;
  letter-spacing: 0.04em;
}

.ob-m-val {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text);
  margin: 4px 0 2px 0;
  display: block;
}

.ob-m-val.highlight {
  color: var(--accent2);
}

.ob-m-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

/* CATALYSTS CONTAINER */
.catalysts-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.catalyst-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.catalyst-item.catalyst-peak {
  border-left: 4px solid var(--accent);
}

.catalyst-item.catalyst-trough {
  border-left: 4px solid var(--red);
}

.catalyst-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.catalyst-tag {
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
}

.catalyst-peak .catalyst-tag {
  color: var(--accent);
}

.catalyst-trough .catalyst-tag {
  color: var(--red);
}

.catalyst-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.catalyst-price {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
}

.catalyst-swing {
  font-size: 0.78rem;
  font-weight: 800;
  margin-left: auto;
}

.catalyst-peak .catalyst-swing {
  color: var(--accent2);
}

.catalyst-trough .catalyst-swing {
  color: var(--red);
}

.catalyst-body {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text);
}

.catalyst-src {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

/* DMA COCKPIT LAYOUT */
.dma-cockpit-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dma-metric-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.dma-tile {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.dma-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  display: block;
}

.dma-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
  display: block;
}

.dma-val.positive {
  color: var(--accent2);
}

.dma-verdict-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
}

.dma-verdict-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent2);
  margin-bottom: 4px;
}

.dma-verdict-box p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
}

/* RESPONSIVE RULES */
@media (max-width: 980px) {
  .nav-categories {
    display: none;
  }
  .inst-cards-grid-2 {
    grid-template-columns: 1fr;
  }
  .ob-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .inst-hero-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .inst-reliability-box {
    width: 100%;
  }
  .pead-dashboard-layout {
    flex-direction: column;
    align-items: flex-start;
  }
  .pead-score-display {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 14px;
    width: 100%;
  }
  .pead-metrics-triad {
    width: 100%;
  }
  .dma-metric-cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* MOBILE-FIRST RESPONSIVE (PHONES) */
@media (max-width: 600px) {
  .main-content {
    padding: 8px;
  }
  .modelling-card,
  .citation-audit-container,
  .inst-card,
  .faq-container {
    padding: 12px;
    border-radius: 10px;
  }
  .modelling-header {
    flex-direction: column;
    gap: 8px;
  }
  .table-actions {
    flex-wrap: wrap;
    gap: 4px;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .scenario-cards {
    flex-direction: column;
    gap: 8px;
  }
  .scenario-card {
    min-width: unset;
    width: 100%;
  }
  .ob-metrics-grid {
    grid-template-columns: 1fr;
  }
  .dma-metric-cards {
    grid-template-columns: 1fr;
  }
  .nav-inner {
    padding: 0 10px;
  }
  .nav-brand .logo-text {
    font-size: 1rem;
  }
  .search-container {
    max-width: 100%;
  }
  #stock-search {
    font-size: 0.85rem;
  }
}


/* --- INSTITUTIONAL SUITE INTERACTIVE ENHANCEMENTS --- */
.inst-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 6px 0;
}

.inst-action-btn {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.inst-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.dma-horizon-bar {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.dma-horizon-btn {
  flex: 1;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.dma-horizon-btn.active {
  background: var(--surface);
  color: var(--accent2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dma-track-container {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.dma-track-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.dma-track-bar {
  height: 8px;
  width: 100%;
  background: var(--line);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.dma-track-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease, background 0.4s ease;
}

.pead-drift-pills {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pead-drift-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}

.pead-drift-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent2);
  color: var(--accent2);
}

.clickable-inst-row {
  cursor: pointer;
  transition: background 0.15s;
}

.clickable-inst-row:hover {
  background: rgba(16, 185, 129, 0.05);
}

.inst-quote-drawer {
  background: var(--bg-soft);
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 0 8px 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
  display: none;
}

.inst-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 99999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.15);
}

.inst-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================================
   MARKET MOOD INDEX (BULL / DULL / BEAR GAUGE) & MACRO PULSE
   ============================================================ */
.macro-mood-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 22px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.mood-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 320px;
}

.mood-gauge-box {
  width: 130px;
  flex: 0 0 130px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mood-gauge-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.mood-score-badge {
  position: absolute;
  bottom: 0px;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.mood-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mood-label-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.mood-status-heading {
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mood-desc-text {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 480px;
}

.mood-right-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mood-stat-pill {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
}

.mood-stat-lbl {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.mood-stat-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.mood-stat-val.positive {
  color: var(--accent2);
}

/* ============================================================
   TECHNO-FUNDA MASTER TRACKER & VAHAN SECTOR PULSE
   ============================================================ */
.master-tracker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.tracker-theme-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
}

.tracker-theme-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.tracker-theme-card.active-theme {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

.tracker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tracker-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.tracker-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.tracker-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.tracker-stock-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.stock-tag-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.stock-tag-pill:hover {
  background: var(--accent);
  color: #003b2d;
  border-color: var(--accent);
}

/* VAHAN SECTOR CARDS & METRICS */
.vahan-dashboard-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.vahan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.vahan-tile {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.vahan-tile-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.vahan-tile-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text);
  margin-top: 4px;
}

.vahan-tile-delta {
  font-size: 0.76rem;
  font-weight: 700;
  margin-top: 2px;
}

.vahan-tile-delta.up {
  color: var(--accent2);
}

.vahan-tile-delta.down {
  color: var(--red);
}

.tracker-table-container {
  overflow-x: auto;
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.tracker-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.tracker-data-table th {
  background: var(--bg-soft);
  padding: 10px 14px;
  font-weight: 800;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}

.tracker-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.tracker-data-table tr:hover td {
  background: rgba(16, 185, 129, 0.04);
}

/* ==========================================================================
   INSTITUTIONAL ALPHA SPEEDOMETER GAUGE (BEAR - DULL - BULL)
   ========================================================================== */
.alpha-gauge-card {
  background: #11161d;
  border: 1px solid #1e293b;
  border-radius: 18px;
  padding: 14px 16px 12px 16px;
  width: 320px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
}

[data-theme="light"] .alpha-gauge-card {
  background: #131720;
  border-color: #242c38;
}

.gauge-top-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.gauge-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.gauge-score-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gauge-wrap {
  position: relative;
  width: 290px;
  height: 165px;
}

.gauge-svg {
  width: 290px;
  height: 165px;
  overflow: visible;
}

.gauge-bear-img {
  position: absolute;
  bottom: 4px;
  left: 8px;
  width: 72px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(239, 68, 68, 0.3));
  pointer-events: none;
  user-select: none;
}

.gauge-bull-img {
  position: absolute;
  bottom: 6px;
  right: 8px;
  width: 68px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(16, 185, 129, 0.3));
  pointer-events: none;
  user-select: none;
}

.gauge-needle-group {
  transform-origin: 160px 155px;
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gauge-regime-badge {
  margin-top: 4px;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
}

.badge-bull {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-dull {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-bear {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   MOBILE RESPONSIVE FIT FOR SMARTPHONES & TABLETS (LIKE SCREENER MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  header.top-nav {
    height: auto !important;
    padding: 8px 10px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .nav-left {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .search-wrapper {
    flex: 1 !important;
    width: 100% !important;
  }

  .nav-search {
    width: 100% !important;
    padding: 5px 12px !important;
  }

  .search-dropdown {
    width: 100% !important;
    top: 38px !important;
  }

  .nav-categories {
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding: 4px !important;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .nav-cat-link {
    padding: 5px 10px !important;
    font-size: 0.78rem !important;
    flex-shrink: 0 !important;
  }

  .nav-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    justify-content: flex-end !important;
  }

  .app-container {
    padding: 10px 8px !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .main-category-switcher-bar {
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px !important;
  }

  .cat-tab-btn {
    padding: 7px 12px !important;
    font-size: 0.8rem !important;
    flex-shrink: 0 !important;
  }

  .scenario-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .modelling-card {
    padding: 12px 8px !important;
    border-radius: 10px !important;
  }

  .modelling-header {
    flex-direction: column !alignment;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .table-actions {
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    margin-top: 8px !important;
    border-radius: 8px !important;
  }

  table.financial-table {
    font-size: 0.78rem !important;
  }

  table.financial-table th,
  table.financial-table td {
    padding: 7px 8px !important;
  }

  table.financial-table th:first-child,
  table.financial-table td:first-child {
    min-width: 110px !important;
    font-size: 0.78rem !important;
    padding: 7px 8px !important;
  }

  .inst-cards-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .inst-hero-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 16px !important;
  }

  .inst-reliability-box {
    width: 100% !important;
    min-width: 100% !important;
  }

  .cockpit-grid {
    grid-template-columns: 1fr !important;
  }

  .citation-audit-container {
    padding: 12px 8px !important;
  }

  .citation-audit-table th,
  .citation-audit-table td {
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
  }

  .statutory-disclaimer-card {
    padding: 14px 12px !important;
  }

  .screener-site-footer {
    padding: 24px 12px 20px 12px !important;
  }

  .alpha-gauge-card {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

