/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
  /* Colors */
  --bg-primary: #8290bd;
  --bg-card: rgba(0, 0, 0, 0.45);
  --bg-card-hover: rgba(0, 0, 0, 0.60);
  --bg-card-passive: rgba(0, 0, 0, 0.60);
  --bg-card-body: rgba(0, 0, 0, 0.50);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --link-primary: rgb(80, 210, 193);
  --link-hover: rgb(100, 230, 213);
  --link-dead: #ff4444;
  --link-dead-hover: #ff8888;
  --border-subtle: rgba(255, 255, 255, 0.15);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1rem;
  --spacing-xl: 1.5rem;
  --spacing-2xl: 2rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.8);
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Typography */
  --font-size-sm: 0.92em;
  --font-size-base: 1rem;
  --font-size-lg: 1.1rem;
  --font-size-xl: 2.5rem;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}

.container {
  flex: 1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.02em;
}

h2, h3, h4 {
  font-weight: var(--font-weight-semibold);
}

/* ============================================
   LINKS
   ============================================ */
a {
  color: var(--link-primary);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  transition: color var(--transition-fast), text-decoration var(--transition-fast);
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

a.dead-link {
  color: var(--link-dead) !important;
  text-decoration: line-through !important;
  text-decoration-thickness: 2px !important;
  opacity: 0.75;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a.dead-link::after {
  content: " 🚫";
}

a.dead-link:hover {
  color: var(--link-dead-hover) !important;
  opacity: 1;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  transition: transform var(--transition-base), 
              box-shadow var(--transition-base),
              background-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card-passive {
  background-color: var(--bg-card-passive);
  border-radius: var(--radius-md);
  transition: transform var(--transition-base), 
              box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}


.card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-card-body);
  color: var(--text-primary);
  backdrop-filter: blur(4px);
}

.card-title {
  color: var(--text-primary);
  font-variant: small-caps;
  font-size: var(--font-size-lg);
  margin-top: var(--spacing-sm);
  font-weight: var(--font-weight-semibold);
}

.card-img-top {
  object-position: left top;
  height: 300px;
  object-fit: cover;
  display: block;
  opacity: 0.65;
  transition: opacity var(--transition-base), transform var(--transition-slow);
  width: 100%;
}


.card-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  text-align: center;
  padding: var(--spacing-2xl);
}

.card-center .links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  justify-content: center;
  align-items: center;
}

.card-center a {
  color: var(--text-primary);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: transform var(--transition-fast);
}

.card-center a:hover {
  transform: translateY(-2px);
}

.card-center a img {
  transition: transform var(--transition-fast);
}

.card-center a:hover img {
  transform: scale(1.1);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.row.g-4 {
  justify-content: flex-end;
}

/* ============================================
   NAVIGATION TREE / HIERARCHICAL NAV
   ============================================ */
.nav-tree,
.essay-nav {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.nav-group,
.essay-group {
  margin-bottom: 0.6rem;
  text-align: left !important;
}

.nav-parent,
.essay-parent {
  display: inline-block;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

a.nav-parent:hover,
a.essay-parent:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.nav-children,
.essay-children {
  list-style: none;
  margin: var(--spacing-xs) 0 0 1.1rem;
  padding-left: 0;
  border-left: 2px solid var(--border-subtle);
  transition: border-color var(--transition-fast);
}

.nav-group:hover .nav-children,
.essay-group:hover .essay-children {
  border-left-color: rgba(255, 255, 255, 0.25);
}

.nav-children li,
.essay-children li {
  margin: 0.15rem 0;
  padding-left: 0.6rem;
}

.nav-children a,
.essay-children a {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: inline-block;
}

.nav-children a:hover,
.essay-children a:hover {
  color: var(--text-primary);
  text-decoration: underline;
  padding-left: 4px;
}

/* ============================================
   MASONRY LAYOUT
   ============================================ */
.masonry,
.card-mason {
  column-count: 1;
  column-gap: var(--spacing-lg);
  text-align: left !important;
}

.masonry-item,
.essay-group-mason {
  break-inside: avoid;
  margin-bottom: var(--spacing-lg);
  page-break-inside: avoid;
}

/* Responsive masonry columns */
@media (min-width: 576px) {
  .masonry,
  .card-mason {
    column-count: 2;
  }
}

@media (min-width: 992px) {
  .masonry,
  .card-mason {
    column-count: 3;
  }
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.corner-cat,
.corner-decoration {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  max-width: 35%;
  max-height: 40%;
  transition: transform var(--transition-slow);
}

.corner-cat:hover,
.corner-decoration:hover {
  transform: scale(1.05);
}

/* ============================================
   LEGACY / COMPATIBILITY CLASSES
   ============================================ */
.links-tiles {
  column-width: 180px;
  column-gap: 1.2rem;
  text-align: left;
}

.links-low {
  display: block;
  border: 1px solid var(--text-primary);
  break-inside: avoid;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
}

.links-low a {
  display: block;
  text-decoration: underline !important;
}

.links-low h4 {
  display: block;
  font-size: large;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
  :root {
    --font-size-xl: 2rem;
    --spacing-2xl: 1.5rem;
  }
  
  .card-img-top {
    height: 250px;
  }
  
  .card-center {
    padding: var(--spacing-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   COMPS PAGE STYLES
   ============================================ */
/* Comps page now uses Bootstrap grid, so custom grid removed */

.comps-card .bd {
  padding: 8px;
}

.comps-leftCol {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comps-picker {
  position: relative;
}

.comps-picker input {
  width: 80%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  padding: 6px 10px;
  outline: none;
  font-size: 13px;
}

.comps-picker input::placeholder {
  color: var(--text-secondary);
}

.comps-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.95);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 50;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.comps-ddItem {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.comps-ddItem:first-child {
  border-top: none;
}


.comps-ddItem .sym {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.comps-ddItem .meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.comps-tokenList {
  margin: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  border: none;
  padding: 0;
  background: transparent;
}

.comps-token {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: grab;
  user-select: none;
  margin-right: 8px;
}

.comps-token.dragging {
  opacity: 0.55;
}

.comps-token .tSym {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--text-primary);
}

.comps-token .x {
  border: none;
  background: transparent;
  color: #ff5c77;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  margin-left: 1px;
}

.comps-token .x:hover {
  color: #ff3a5c;
}

.comps-tokenList.dragOver {
  border: none;
  background: transparent;
}

.comps-dropHint {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 4px 0 0 2px;
}

.comps-optGrid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comps-optRow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  margin:5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.2);
}

.comps-optLabel {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.25px;
  font-weight: 800;
}

.comps-optBtns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comps-optbtn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  cursor: pointer;
}


.comps-optbtn:active {
  transform: translateY(1px);
}

.comps-optbtn.active {
  border-color: rgba(80, 210, 193, 0.55);
  box-shadow: 0 0 0 3px rgba(80, 210, 193, 0.10);
  background: rgba(80, 210, 193, 0.12);
}

.comps-details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.15);
  padding: 8px;
}

.comps-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
  font-weight: 700;
}

.comps-summary::-webkit-details-marker {
  display: none;
}

.comps-summary .sm {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.comps-advancedBody {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comps-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.35;
}

/* Chart card now uses standard Bootstrap card */

.comps-chartArea {
  padding: 12px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}


.comps-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  user-select: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.comps-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--text-secondary);
  display: inline-block;
}

.comps-dot.ok {
  background: rgba(80, 210, 193, 0.85);
}

.comps-dot.bad {
  background: rgba(255, 92, 119, 0.85);
}

.comps-dot.busy {
  background: var(--text-secondary);
}

.comps-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.95);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  max-width: 820px;
  width: calc(100% - 26px);
  display: none;
  z-index: 999;
}

.comps-toast .tTitle {
  font-weight: 800;
  margin-bottom: 4px;
}

.comps-toast .tBody {
  color: var(--text-secondary);
  line-height: 1.35;
}

.comps-toast .close {
  float: right;
  cursor: pointer;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
}

.comps-toast .close:hover {
  color: #ff5c77;
}

/* Responsive handled by Bootstrap grid */

/* ============================================
   VOL_QUALITY PAGE STYLES
   ============================================ */
.chart-header {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-md);
  align-items: baseline;
}

.chart-header > div:first-child {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.25px;
  font-weight: 800;
}

.chart-header .small {
  opacity: 0.8;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

canvas {
  display: block;
  width: 100%;
  height: 360px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  opacity: 0.95;
}

.key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.dash {
  width: 14px;
  height: 0;
  border-top: 2px dashed rgba(255, 255, 255, 0.65);
}

.status-pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.status-ok {
  color: #7CFFB2;
}

.status-warn {
  color: #ffd37a;
}

.status-bad {
  color: #ff7a7a;
}

.tape {
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.tape .chart-header {
  border-bottom: 1px solid var(--border-subtle);
}

.tape .box,
.tape-box {
  height: 260px;
  overflow: auto;
  padding: var(--spacing-sm) var(--spacing-md);
  white-space: pre;
  line-height: 1.25;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.tape .rowline,
.tape-box .rowline {
  margin: 0 0 6px 0;
}

.tape .muted {
  opacity: 0.75;
}

.tape .hl,
.tape-box .hl {
  color: #35d07f;
}

.tape .ex,
.tape-box .ex {
  color: #ff6b6b;
}

.tape .li,
.tape-box .li {
  color: #4aa3ff;
}

canvas {
  width: 100%;
  aspect-ratio: 2 / 1;
}

@media (max-width: 980px) {
  canvas {
    height: 320px;
  }
}

/* ============================================
   RATES PAGE STYLES
   ============================================ */
html,
body {
  height: 100%;
  margin: 0;
}

.rates-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.rates-card .hd {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.rates-card .hd h2 {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 800;
  letter-spacing: 0.25px;
  text-transform: uppercase;
}

.rates-card .bd {
  padding: var(--spacing-md);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.badge.ok {
  border-color: rgba(80, 210, 193, 0.4);
  background: rgba(80, 210, 193, 0.15);
  color: rgba(124, 255, 178, 0.95);
}

.badge.bad {
  border-color: rgba(255, 122, 122, 0.4);
  background: rgba(255, 122, 122, 0.15);
  color: rgba(255, 200, 200, 0.95);
}

#tsChart,
#curveChart,
#pendleChart {
  width: 100%;
  aspect-ratio: 2 / 1;
}

#comps-plot,
#chartLeft,
#chartRight,
#plot,
#plotDiv {
  aspect-ratio: 2 / 1;
  scroll-behavior: smooth;
}

.btnrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rates-btn {
  appearance: none;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-base), border-color var(--transition-base);
}

.rates-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.25);
}

.rates-btn:active {
  transform: translateY(1px);
}

.rates-btn.primary {
  background: rgba(80, 210, 193, 0.2);
  border-color: rgba(80, 210, 193, 0.4);
}

.rates-btn.primary:hover {
  background: rgba(80, 210, 193, 0.3);
  border-color: rgba(80, 210, 193, 0.5);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field:has(.tabs) {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.field label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 650;
}

.field input[type="number"],
.field input[type="date"],
.field select {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(80, 210, 193, 0.5);
  box-shadow: 0 0 0 4px rgba(80, 210, 193, 0.12);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tabbtn {
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font-weight: 750;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.tabbtn:hover {
  background: rgba(0, 0, 0, 0.4);
}

.tabbtn.active {
  background: rgba(80, 210, 193, 0.2);
  border-color: rgba(80, 210, 193, 0.4);
  box-shadow: 0 0 0 3px rgba(80, 210, 193, 0.10);
}

.toggles {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.toggle .name {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.toggle .name strong {
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toggle .name span {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex: 0 0 auto;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  transition: var(--transition-base);
  cursor: pointer;
}

.slider:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  transition: var(--transition-base);
}

.switch input:checked+.slider {
  background: rgba(80, 210, 193, 0.3);
  border-color: rgba(80, 210, 193, 0.5);
}

.switch input:checked+.slider:before {
  transform: translateX(18px);
  background: rgba(80, 210, 193, 0.95);
}

.status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  white-space: pre-wrap;
}

/* Collapsible controls */
.ctrlbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(0, 0, 0, 0.2);
}

.ctrlbar .left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chev {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
  flex: 0 0 auto;
  transition: transform var(--transition-base), background var(--transition-base);
}

.chev.open {
  transform: rotate(90deg);
}

.ctrlpanel {
  display: none;
  padding: var(--spacing-md);
  border-top: 1px solid var(--border-subtle);
}

.ctrlpanel.open {
  display: block;
}

/* ============================================
   HLP_SHARE PAGE STYLES
   ============================================ */
.hlp-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  align-items: center;
}

.hlp-controls select,
.hlp-controls .coin-btn {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.hlp-controls select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.hlp-controls select:focus,
.hlp-controls select:hover {
  background: rgba(80, 210, 193, 0.15);
  border-color: rgba(80, 210, 193, 0.55);
  outline: none;
}

.hlp-controls .coin-btn {
  background: rgba(255, 255, 255, 0.03);
}

.hlp-controls .coin-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.hlp-controls .coin-btn.active {
  background: rgba(80, 210, 193, 0.12);
  border-color: rgba(80, 210, 193, 0.55);
  box-shadow: 0 0 0 3px rgba(80, 210, 193, 0.10);
  color: var(--text-primary);
}

/* ============================================
   DELISTING RECO PAGE STYLES
   ============================================ */

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
}

.filter-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-btn.active {
  border-color: rgba(80, 210, 193, 0.55);
  box-shadow: 0 0 0 3px rgba(80, 210, 193, 0.10);
  background: rgba(80, 210, 193, 0.12);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  overflow-x: auto;
  display: block;
}

.data-table thead {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.data-table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table th {
  background: rgba(0, 0, 0, 0.3);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.table-wrapper {
  overflow-x: auto;
  max-height: 800px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: var(--spacing-md);
}

.column-checkbox {
  margin-right: 6px;
}

.more-columns-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.more-columns-menu.show {
  display: block;
}

.more-columns-menu-header {
  padding: 10px 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  text-transform: uppercase;
}

.more-columns-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.more-columns-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.more-btn {
  position: relative;
}

.methodology-section {
  margin-bottom: 1.5rem;
}

.methodology-section h4 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.methodology-section h4:first-of-type {
  margin-top: 0;
}

.methodology-section p,
.methodology-section div {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.methodology-section ul {
  margin-left: 1.5rem;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.methodology-section li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

#plotDiv {
  width: 100%;
  min-height: 500px;
  aspect-ratio: 2 / 1;
}

.version-badge {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 12px;
  margin-left: 8px;
  background: rgba(0, 0, 0, 0.3);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.text-muted {
  color: var(--text-secondary) !important;
}

/* Override styles.css absolute positioning for card-body */
.card .card-body {
  padding: var(--spacing-xl) !important;
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  background: transparent !important;
  backdrop-filter: none !important;
}

.card h4 {
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}
