/* toptradersbot Research — loaded after academy.css; adds articles, charts and dark mode. */
.research .top-nav a[aria-current="page"] { color: var(--text); }

/* index */
.research-intro { grid-template-columns: 1fr; }
.research-hero-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0; background: var(--panel);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden; color: var(--text); box-shadow: var(--shadow); }
.research-hero-card:hover { text-decoration: none; border-color: #b9c7ef; }
.research-hero-card .cover { display: block; background: var(--panel2); }
.research-hero-card .cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.research-hero-card .card-body { display: flex; flex-direction: column; gap: 10px; padding: clamp(18px, 3vw, 30px); }
.research-hero-card strong { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; letter-spacing: -.015em; }
.research-hero-card .summary { color: var(--muted); }
.card-top time { font-size: 13px; color: var(--muted); }
.research-hero-card .card-top { display: flex; gap: 8px; align-items: center; }
.research-hero-card .mins { margin-left: auto; }
.read-more { margin-top: auto; font-weight: 700; color: var(--blue); }
.research-card { padding: 0; overflow: hidden; }
.research-card .cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--panel2); }
.research-card .card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.empty { color: var(--muted); }
.research-how ul { margin: 0 0 12px; }

/* article */
.research-article .lesson-head .lead { margin: 0 0 12px; }
.research-article .meta time { font-weight: 700; color: var(--text); }
.token-tags { margin: 12px 0 0; }
.token-tags li { font-weight: 700; color: var(--text); }
.research-section h3 { scroll-margin-top: 80px; }
.research-section h2 { scroll-margin-top: 80px; }
.chart { margin: 14px 0; }
.lesson-body > .chart { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.chart-zoom { display: block; border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; }
.chart img { display: block; width: 100%; height: auto; }
.chart figcaption { font-size: 14px; color: var(--muted); padding: 8px 2px 0; }
.toc h3 { margin: 0 0 8px; }
.toc-list, .toc-sub { margin: 0; padding-left: 18px; }
.toc-list > li { margin: 4px 0; font-weight: 600; }
.toc-sub { font-weight: 400; font-size: 14px; }
.toc-sub li { margin: 2px 0; }
.toc-desktop { max-height: calc(100vh - 120px); overflow: auto; }
.toc-mobile { display: none; margin-bottom: 14px; }
.toc-mobile summary { cursor: pointer; font-weight: 700; }
.toc-mobile[open] summary { margin-bottom: 8px; }
.research-note { background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius);
  padding: 14px 18px; font-size: 15px; margin: 18px 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; margin: 8px 0 4px; }
.share span { color: var(--muted); font-weight: 600; }
.share ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.share a { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-weight: 600; }
.preview-banner { border-color: var(--gold); }

/* tap to enlarge */
.chart-dialog { width: min(1400px, 96vw); max-height: 94vh; padding: 12px; border: 0; border-radius: 14px; background: var(--panel); color: var(--text); }
.chart-dialog::backdrop { background: rgba(8, 12, 22, .82); }
.chart-dialog figure { margin: 0; }
.chart-dialog img { display: block; width: 100%; max-height: 80vh; object-fit: contain; background: #fff; border-radius: 8px; cursor: zoom-out; }
.chart-dialog figcaption { font-size: 14px; color: var(--muted); padding: 8px 2px 0; }
.chart-dialog-close { float: right; margin: 0 0 8px; font: inherit; font-weight: 700; border: 1px solid var(--line); background: var(--panel2);
  color: var(--text); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chart-dialog-open { display: inline-block; margin-top: 6px; font-size: 14px; }

/* levels table: a "+" per level adds it as an alert in the app */
.levels-table th[scope="row"] { font-weight: 700; text-align: left; white-space: nowrap; }
.levels-table td { white-space: nowrap; }
.level { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; }
.level-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.level-trigger { color: var(--muted); font-size: 12px; }
.level-add { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px;
  border: 1px solid var(--blue); color: var(--blue); background: var(--panel); font-weight: 800; font-size: 18px;
  line-height: 1; text-decoration: none; flex: none; }
.level-add:hover, .level-add:focus-visible { background: var(--blue); color: var(--panel); }
.level-add:focus-visible { outline: 3px solid var(--blue2); outline-offset: 2px; }
.levels-hint { color: var(--muted); font-size: 14px; margin-top: 0; }
@media (max-width: 600px) {
  .levels-table table { font-size: 14px; }
  .levels-table th, .levels-table td { padding: 8px 5px; }
  .levels-table td { white-space: normal; }
  .level { gap: 5px; margin-right: 0; flex-wrap: wrap; }
  .level-add { width: 26px; height: 26px; font-size: 16px; }
}

@media (max-width: 900px) {
  .toc-desktop { display: none; }
  .toc-mobile { display: block; }
}
@media (max-width: 760px) {
  .research-hero-card { grid-template-columns: 1fr; }
  .research-hero-card .cover img { aspect-ratio: 16 / 9; height: auto; }
}

/* dark mode (follows the device setting) */
@media (prefers-color-scheme: dark) {
  body.research { --bg: #0f1522; --panel: #161e2e; --panel2: #1d2739; --line: #2a3650; --text: #e7ecf5; --muted: #a8b3c7;
    --blue: #7ea2ff; --blue2: #a3bdff; --green: #4ccf8e; --red: #ff7a8a; --gold: #f0b54a; --purple: #b794ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); }
  body.research .top { background: rgba(15, 21, 34, .92); }
  body.research .top-nav .app-link { background: var(--blue); color: #0b1020; }
  body.research .button { color: #0b1020; }
  body.research .community { background: linear-gradient(135deg, #12263a, #18213a); border-color: #23415c; }
  body.research .button.community-button { color: #fff; }
  body.research .one-sentence { background: linear-gradient(135deg, #1a2440, #221c3a); border-color: #33406a; }
  body.research .card:hover, body.research .research-hero-card:hover, body.research .pager a:hover { border-color: #4b5f8f; }
  body.research .social-bubble { background: var(--panel2); color: var(--text); }
  body.research .chart-zoom, body.research .chart-dialog img { background: #fff; }
}

/* Token chips link to their section (owner, 2026-11-30). */
.token-tags li a { color: inherit; text-decoration: none; display: inline-block; }
.token-tags li a:hover, .token-tags li a:focus-visible { text-decoration: underline; }
