/* ============ Right-panel tab contents ============ */
.panel { display: none; }
.panel.active { display: block; }
.rs-pane { display: none; }
.rs-pane.active { display: block; }

.panel-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--text-3);
  text-transform: uppercase; margin: 22px 0 12px;
}
.panel-label:first-child { margin-top: 0; }

.hr { height: 1px; background: var(--border); margin: 22px 0; border: 0; }

/* toggle switch (Targeting checkbox inputs with class .switch) */
input[type="checkbox"].switch {
  appearance: none;
  -webkit-appearance: none;
  width: 38px; height: 22px; border-radius: 11px; background: var(--border-strong);
  position: relative; cursor: pointer; transition: background .15s; flex: none;
  outline: none; border: none;
}
input[type="checkbox"].switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
input[type="checkbox"].switch:checked { background: var(--accent); }
input[type="checkbox"].switch:checked::after { transform: translateX(16px); }

.opt-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; font-size: 12.5px; color: var(--text);
  cursor: pointer;
}

/* stacked field (label above control) */
.stack { margin-top: 16px; }
.stack-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; color: var(--text-3);
  text-transform: uppercase; margin-bottom: 8px;
}

/* inputs */
.num-box, .txt, input[type="date"], .inline-num {
  height: 32px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--text); font-family: var(--font-mono);
  font-size: 12.5px; padding: 0 10px; outline: none;
}
.txt { font-family: var(--font-ui); width: 100%; }
.num-box { width: 64px; text-align: center; }
.num-box:focus, .txt:focus, input[type="date"]:focus { border-color: var(--accent); }
input[type="date"] { width: 100%; font-size: 11.5px; color: var(--text-2); }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.txt::placeholder, input::placeholder { color: var(--text-3); }

/* type row: size + B / I */
.type-row { display: flex; align-items: center; gap: 14px; }
.type-row .num-box { width: 56px; }
.bi { display: flex; align-items: center; gap: 8px; }
.bi b, .bi i { font-size: 13px; color: var(--text-2); width: 12px; text-align: center; }
.switch.sm { width: 32px; height: 19px; }
.switch.sm::after { width: 15px; height: 15px; }
.switch.sm.on::after { transform: translateX(13px); }

/* inline lẻ/nhân */
.inline-pair { display: flex; align-items: center; gap: 16px; }
.inline-pair label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.inline-num { width: 52px; text-align: center; }

/* color picker row */
.color-row { display: flex; align-items: center; gap: 10px; }
.color-chip {
  width: 44px; height: 30px; border-radius: 8px; border: 1px solid var(--border-strong);
  cursor: pointer; flex: none;
}
.color-row .hint { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* transform chips */
.chip-grid { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.chip, .pill-radio {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 13px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: var(--font-ui); transition: .12s; white-space: nowrap;
  line-height: 1;
}
.chip:hover, .pill-radio:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active, .pill-radio:has(input[type="radio"]:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.pill-radio input[type="radio"] { display: none; }

/* checkbox rows (overlays / oscillators - Targeting native checkboxes with class .checkbox) */
.check-row {
  display: flex; align-items: center; gap: 11px; padding: 9px 0; font-size: 12.5px;
  cursor: pointer;
}
input[type="checkbox"].checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--border-strong);
  background: var(--surface-2); cursor: pointer; flex: none; position: relative; transition: .12s;
  outline: none;
}
input[type="checkbox"].checkbox:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"].checkbox:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 7px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check-row .cr-label { flex: 1; color: var(--text); }
.check-row .cr-num { width: 56px; height: 28px; text-align: center; padding: 0; }
.dot-btn { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--surface); cursor: pointer; flex: none; box-shadow: 0 0 0 1px var(--border-strong); }
.mini-select { position: relative; }
.mini-select select {
  height: 28px; padding: 0 22px 0 9px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface-2); color: var(--text-2); font-family: var(--font-mono);
  font-size: 11px; appearance: none; cursor: pointer; outline: none;
}
.mini-select::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 5px; height: 5px;
  border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}

/* steps (quan hệ) */
.step { margin-bottom: 18px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.step-num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--text);
  color: var(--bg); font-size: 11px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; flex: none; font-family: var(--font-mono);
}
.step-title { font-size: 12.5px; font-weight: 600; }

.radio-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 12.5px; cursor: pointer; }
input[type="radio"].radio {
  appearance: none;
  -webkit-appearance: none;
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  flex: none; position: relative; transition: .12s; cursor: pointer; outline: none;
}
input[type="radio"].radio:checked { border-color: var(--accent); }
input[type="radio"].radio:checked::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
}

/* buttons */
.btn-soft {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 38px; margin-top: 10px; border: 1px solid var(--border-strong);
  border-radius: 9px; background: var(--surface-2); color: var(--text); font-size: 12.5px;
  font-weight: 500; cursor: pointer; font-family: var(--font-ui);
}
.btn-soft:hover { background: var(--hover); border-color: var(--accent); }
.btn-soft svg { width: 15px; height: 15px; }
.btn-danger {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 38px;
  margin-top: 12px; border: 1px solid color-mix(in oklab, var(--neg) 40%, var(--border));
  border-radius: 9px; background: transparent; color: var(--neg); font-size: 12.5px;
  font-weight: 600; cursor: pointer; font-family: var(--font-ui);
}
.btn-danger:hover { background: color-mix(in oklab, var(--neg) 10%, transparent); }

.full-select { position: relative; }
.full-select select {
  width: 100%; height: 34px; padding: 0 30px 0 11px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 12.5px;
  font-family: var(--font-ui); appearance: none; cursor: pointer; outline: none;
}
.full-select::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}

/* Color picker controls */
.rs-ind-color-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    background: var(--text-3); /* Default: Auto */
    position: relative;
}
.rs-ind-color-btn.active {
    border-color: var(--text);
    box-shadow: 0 0 4px var(--accent);
}
.rs-ind-color-grid {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    z-index: 100;
    box-shadow: var(--shadow);
    margin-bottom: 5px;
}
.rs-ind-color-grid::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 6px;
    background: transparent;
}
.rs-ind-color-btn:hover .rs-ind-color-grid {
    display: grid;
}

.rs-ind-color-grid div {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
}
.rs-ind-color-grid div:hover {
    transform: scale(1.1);
}
.rs-ind-width-select {
    background: transparent;
    border: none;
    color: var(--text-2);
    font-size: 10.5px;
    cursor: pointer;
    outline: none;
    padding: 0 2px;
}

/* Modals & Heatmap Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 95%;
    max-width: 1200px;
    height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-2);
}
.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text);
}
.close-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 18px;
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.close-btn:hover { 
    background: var(--neg); 
    color: white; 
    border-color: var(--neg);
    transform: rotate(90deg);
}
.modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
    background: var(--bg);
    position: relative;
}

/* Heatmap Grid (Professional Terminal Look) */
.heatmap-table {
    border-collapse: separate;
    border-spacing: 1px;
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
    font-size: 11px;
    min-width: 100%;
}
.heatmap-table th, .heatmap-table td {
    padding: 8px 12px;
    min-width: 80px;
    height: 36px;
    text-align: center;
}
.heatmap-table thead th {
    position: sticky;
    top: 0;
    background: var(--surface-2);
    z-index: 20;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-3);
}
.heatmap-table tbody td:first-child {
    position: sticky;
    left: 0;
    background: var(--surface-2);
    z-index: 10;
    border-right: 1px solid var(--border);
    font-weight: 600;
    text-align: left;
    color: var(--text);
}
.heatmap-cell {
    transition: all 0.15s;
    cursor: default;
    border-radius: 2px;
    position: relative;
}
.heatmap-cell:hover {
    transform: scale(1.1);
    z-index: 30;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    filter: brightness(1.2);
}
.heatmap-cell .cell-val {
    position: relative;
    z-index: 2;
}
.heatmap-label {
    white-space: nowrap;
    color: var(--text-3);
}
.rev-legend {
    display: flex;
    gap: 20px;
    padding: 12px 24px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-2);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-box { width: 12px; height: 12px; border-radius: 2px; }

/* Dynamic badge/card formatting inside data settings list */
.series-color-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ss-color-btn.active {
    border: 2px solid var(--text) !important;
}

/* Mode toggles */
.mode-toggle-group {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-2);
    padding: 2px;
}
.mode-toggle-group .toggle-btn {
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    background: transparent;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 500;
    height: 26px;
    font-family: var(--font-ui);
    transition: background .12s, color .12s;
}
.mode-toggle-group .toggle-btn:hover {
    color: var(--text);
}
.mode-toggle-group .toggle-btn.active {
    background: var(--raised);
    color: var(--text);
    box-shadow: var(--shadow);
    font-weight: 600;
}

/* User Profile Modal Styling */
.profile-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 10px;
  margin-top: 15px;
}
.profile-section-title:first-of-type {
  margin-top: 0;
}
.profile-sub-card {
  transition: border-color .15s;
}
.profile-sub-card:hover {
  border-color: var(--border-strong);
}

/* ============================================================
   NEWS FEED — Macro Wire Feed View
   ============================================================ */
.news-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  position: relative;
  transition: border-color .15s, box-shadow .15s;
  cursor: default;
  max-width: 686px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.news-item:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.news-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.news-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  flex: none;
  display: inline-block;
  white-space: nowrap;
}
.news-badge.live   { background: rgba(255,93,115,.15); color: var(--neg); border: 1px solid rgba(255,93,115,.25); }
.news-badge.hot    { background: rgba(247,146,79,.15); color: var(--chart-2); border: 1px solid rgba(247,146,79,.25); }
.news-badge.update { background: rgba(79,200,126,.12); color: var(--pos); border: 1px solid rgba(79,200,126,.22); }
.news-badge.flash  { background: rgba(79,184,247,.12); color: var(--chart-6); border: 1px solid rgba(79,184,247,.22); }
.news-time {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-left: auto;
}
.news-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
}
.news-body strong { color: var(--text); font-weight: 600; }
.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.news-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--chip);
  color: var(--text-3);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .12s;
  text-decoration: none;
}
.news-tag:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
a.news-series-link, .news-series-link {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--accent);
  cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
  transition: all .12s;
  font-family: var(--font-mono);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
a.news-series-link:hover, .news-series-link:hover { background: var(--accent); color: white; text-decoration: none !important; }
.news-source {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-3);
}
/* Separating line */
.news-item + .news-item::before {
  content: '';
}
/* Animation: tin mới slide in từ trên xuống */
@keyframes newsSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.news-item-new {
  animation: newsSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  border-color: var(--accent, var(--pos));
  box-shadow: 0 0 0 1px var(--accent, var(--pos)), 0 4px 16px rgba(10,157,98,0.12);
}
/* Scrollbar */
#news-feed-container::-webkit-scrollbar { width: 5px; }
#news-feed-container::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
#news-feed-container::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   ANALYSIS CARDS — Macro Reports View
   ============================================================ */
.filter-chip {
  height: 28px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all .12s;
  white-space: nowrap;
  flex: none;
}
.filter-chip:hover { background: var(--hover); color: var(--text); border-color: var(--border-strong); }
.filter-chip.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 700; }

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  border-color: var(--accent);
}
.article-card-cover {
  height: 140px;
  position: relative;
  overflow: hidden;
  flex: none;
}
.article-card-cover-gradient {
  position: absolute;
  inset: 0;
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.article-card-cover-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  opacity: .55;
}
.article-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-card-category {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
.article-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}
.article-card-summary {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
  flex: 1;
}
.article-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 14px;
  flex: none;
}
.article-card-author {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
}
.article-card-dot { color: var(--border-strong); }
.article-card-date {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.article-card-read-time {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-3);
  background: var(--chip);
  padding: 2px 7px;
  border-radius: 5px;
}
.article-card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 0 16px 16px;
}
.article-card-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--chip);
  color: var(--text-3);
}

/* Analysis article list scrollbar */
#analysis-articles-container::-webkit-scrollbar { width: 5px; }
#analysis-articles-container::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
#analysis-articles-container::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   ARTICLE READER — Full Article View
   ============================================================ */
.article-reader-body::-webkit-scrollbar { width: 5px; }
.article-reader-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.article-reader-body::-webkit-scrollbar-track { background: transparent; }

.article-hero {
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 28px;
}
.article-hero-bg {
  position: absolute;
  inset: 0;
  background-size: 300% 300%;
  animation: gradientShift 10s ease infinite;
}
.article-hero-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  opacity: .4;
}
.article-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.article-category-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
.article-date-label {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.article-author-label {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
  font-weight: 600;
}
.article-h1, #article-content-container h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -.02em;
}
.article-intro {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 28px;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  font-style: italic;
}
.article-h2, #article-content-container h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
#article-content-container h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 10px;
}
.article-p, #article-content-container p {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 16px;
}
.article-p strong, #article-content-container strong { font-weight: 700; color: var(--text); }
.article-blockquote, #article-content-container blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: color-mix(in oklab, var(--accent) 7%, transparent);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.65;
  font-style: italic;
  color: var(--text-2);
}
#article-content-container ul, #article-content-container ol {
  margin: 16px 0 20px 24px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.8;
}
#article-content-container li {
  margin-bottom: 6px;
}
#article-content-container img {
  max-width: 100%;
  border-radius: 8px;
  margin: 16px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
  color: var(--text-2);
  font-style: italic;
}
.article-data-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 20px 0;
}
.article-data-box-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 12px;
}
.article-data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.article-data-row:last-child { border-bottom: none; }
.article-data-label { color: var(--text-2); }
.article-data-value { font-family: var(--font-mono); font-weight: 600; color: var(--text); }
.article-data-value.pos { color: var(--pos); }
.article-data-value.neg { color: var(--neg); }
a.article-series-chip, .article-series-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--accent);
  cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
  transition: all .12s;
  font-family: var(--font-mono);
  margin: 2px;
  text-decoration: none !important;
}
a.article-series-chip:hover, .article-series-chip:hover { background: var(--accent); color: white; text-decoration: none !important; }
.article-related-series {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 28px 0 4px;
}
.article-related-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 10px;
}
.article-related-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.article-divider { height: 1px; background: var(--border); margin: 28px 0; border: none; }

/* ============================================================
   MAIN-CONTENT transition support
   ============================================================ */
#main-terminal-view, #main-news-view, #main-analysis-view, #main-article-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
#main-terminal-view.view-active,
#main-news-view.view-active,
#main-analysis-view.view-active,
#main-article-view.view-active {
  opacity: 1;
  pointer-events: all;
  position: relative;
  inset: auto;
}
.main-content {
  position: relative;
}

/* ============================================================
   EMBEDDED DYNAMIC CHART WIDGET IN ARTICLES
   ============================================================ */
.embedded-chart-widget {
  margin: 24px 0;
  padding: 16px 18px;
  background: var(--surface-2, #0f172a);
  border: 1px solid var(--border, #334155);
  border-radius: 10px;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  transition: border-color .15s ease;
}
.embedded-chart-widget:hover {
  border-color: var(--border-strong, #475569);
}
.embedded-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border, #1e293b);
}
.embedded-chart-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text, #f8fafc);
  display: flex;
  align-items: center;
  gap: 6px;
}
.embedded-chart-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.embedded-chart-badge {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--chip, #1e293b);
  color: var(--text-3, #94a3b8);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 10.5px;
}
.embedded-chart-open-btn {
  background: transparent;
  color: var(--accent, #38bdf8);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none !important;
}
.embedded-chart-open-btn:hover {
  background: var(--accent, #38bdf8);
  color: #fff;
}
.embedded-chart-container {
  position: relative;
  width: 100%;
  height: 260px;
}
.embedded-chart-placeholder {
  padding: 14px;
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  border: 1px dashed var(--accent, #38bdf8);
  border-radius: 8px;
  color: var(--accent, #38bdf8);
  font-size: 12.5px;
}

/* ============================================================
   PAYWALL & CONTENT LOCKING STYLES
   ============================================================ */
.article-card-cover {
  position: relative;
}
.article-card-lock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.article-paywall-box {
  margin: 32px 0 20px;
  padding: 32px 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}
.article-paywall-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 50%, #3b82f6 100%);
}
.article-paywall-icon {
  font-size: 42px;
  margin-bottom: 12px;
  display: inline-block;
}
.article-paywall-title {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 10px;
}
.article-paywall-desc {
  font-size: 13.5px;
  color: #94a3b8;
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.article-paywall-btn {
  display: inline-block;
  background: linear-gradient(135deg, #0a5c3a 0%, #16a34a 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.article-paywall-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}
p.article-preview-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2, #64748b);
  font-style: italic;
  position: relative;
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}


