/* ============================================================
   P.Thai Capital Research — shared styling for academic articles
   Use on:  /research/main-report.html, /research/tet-window-vn.html, ...
   Loaded after style.css for color variables.
   ============================================================ */

/* ---------- Body ---------- */
.rp-body {
  background: #131a25;
  color: #f0f4fa;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ---------- Top bar ---------- */
.rp-top {
  padding: 16px 24px;
  border-bottom: 1px solid #283444;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  background: rgba(15, 22, 35, 0.95);
  position: sticky; top: 0; z-index: 100;
}
.rp-top__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.rp-top__brand img { width: 32px; height: 32px; border-radius: 5px; }
.rp-top__brand b { font-size: 1.05rem; }
.rp-top__brand .tag {
  color: #b3bdcc; font-family: var(--font-mono);
  font-size: 0.78rem; margin-left: 8px;
  border-left: 1px solid #283444;
  padding-left: 10px;
}
.rp-top nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Article header ---------- */
.rp-article-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 30px;
}
.rp-eyebrow {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(226, 191, 82, 0.10);
  border: 1px solid rgba(226, 191, 82, 0.35);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #e2bf52;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.rp-article-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: #f0f4fa;
}
.rp-article-header .rp-subtitle {
  font-size: 1.1rem;
  color: #c0cad8;
  margin: 0 0 28px;
  line-height: 1.55;
}

/* ---------- Article meta block ---------- */
.rp-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 24px;
  padding: 18px 22px;
  background: #1c2535;
  border: 1px solid #34425a;
  border-radius: 8px;
  margin-bottom: 30px;
}
.rp-meta__item {
  font-size: 0.82rem;
}
.rp-meta__item dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #8694a8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.rp-meta__item dd {
  margin: 0;
  font-weight: 500;
  color: #e6ecf5;
}
.rp-meta__item dd code { font-family: var(--font-mono); font-size: 0.85rem; }

/* ---------- Abstract ---------- */
.rp-abstract {
  padding: 22px 26px;
  background: rgba(95, 224, 180, 0.04);
  border-left: 3px solid #5fe0b4;
  border-radius: 0 8px 8px 0;
  margin-bottom: 30px;
}
.rp-abstract h2 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #5fe0b4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.rp-abstract p { color: #d2dae8; margin: 0; line-height: 1.7; }
.rp-abstract p + p { margin-top: 10px; }

/* ---------- Keywords ---------- */
.rp-keywords {
  margin-bottom: 30px;
  font-size: 0.88rem;
}
.rp-keywords__label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #8694a8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 8px;
}
.rp-keywords a {
  display: inline-block;
  padding: 3px 10px;
  margin: 2px 4px 2px 0;
  background: #1c2535;
  border: 1px solid #34425a;
  border-radius: 12px;
  color: #c0cad8;
  text-decoration: none;
  font-size: 0.82rem;
  transition: all 0.15s;
}
.rp-keywords a:hover {
  border-color: #5fe0b4;
  color: #5fe0b4;
}

/* ---------- Article body wrapper ---------- */
.rp-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---------- Section headers ---------- */
.rp-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 50px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #283444;
  color: #f0f4fa;
}
.rp-content h2 .num {
  font-family: var(--font-mono);
  color: #8694a8;
  font-weight: 500;
  margin-right: 12px;
  font-size: 0.85em;
}
.rp-content h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: #e6ecf5;
}
.rp-content h4 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 22px 0 10px;
  color: #c0cad8;
}

/* ---------- Body text ---------- */
.rp-content p {
  color: #e2e8f0;     /* boost từ #d2dae8 — sáng hơn ~8%, đỡ mỏi mắt khi đọc dài */
  margin: 14px 0;
  line-height: 1.78;
  font-size: 1.06rem;
}
.rp-content p b, .rp-content p strong { color: #f0f4fa; font-weight: 600; }
.rp-content a {
  color: #5fe0b4;
  text-decoration: none;
  border-bottom: 1px dashed #34624f;
}
.rp-content a:hover { color: #76e8c4; border-bottom-color: #5fe0b4; }
.rp-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 1px 6px;
  background: #1c2535;
  border-radius: 3px;
  color: #76e8c4;
}
.rp-content blockquote {
  margin: 22px 0;
  padding: 14px 22px;
  background: #1c2535;
  border-left: 3px solid #6ed2ea;
  border-radius: 0 6px 6px 0;
  color: #c0cad8;
  font-style: italic;
}

/* ---------- Lists ---------- */
.rp-content ul, .rp-content ol {
  padding-left: 24px;
  margin: 14px 0;
  color: #d2dae8;
}
.rp-content li { margin: 8px 0; line-height: 1.7; }
.rp-content li b { color: #f0f4fa; }

/* ---------- Tables ---------- */
.rp-table-wrap { overflow-x: auto; margin: 24px 0; }
.rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #1c2535;
  border-radius: 8px;
  overflow: hidden;
}
.rp-table th {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #b3bdcc;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 12px 14px;
  background: #243046;
  text-align: left;
  border-bottom: 1px solid #34425a;
}
.rp-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #283444;
  color: #d2dae8;
}
.rp-table tr:last-child td { border-bottom: none; }
.rp-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.rp-table .mono { font-family: var(--font-mono); font-size: 0.88em; }
.rp-table .up { color: #5fe0b4; font-family: var(--font-mono); }
.rp-table .down { color: #ff8899; font-family: var(--font-mono); }
.rp-table .neutral { color: #c0cad8; font-family: var(--font-mono); }
.rp-table caption {
  caption-side: bottom;
  text-align: left;
  font-size: 0.82rem;
  color: #8694a8;
  padding-top: 8px;
  font-style: italic;
}

/* ---------- Highlight box ---------- */
.rp-callout {
  margin: 26px 0;
  padding: 18px 22px;
  background: #1c2535;
  border: 1px solid #34425a;
  border-left: 3px solid #e2bf52;
  border-radius: 0 8px 8px 0;
}
.rp-callout__label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #e2bf52;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.rp-callout p { margin: 0; color: #dde4ef; line-height: 1.7; }
.rp-callout--info { border-left-color: #6ed2ea; }
.rp-callout--info .rp-callout__label { color: #6ed2ea; }
.rp-callout--warn { border-left-color: #ffc566; }
.rp-callout--warn .rp-callout__label { color: #ffc566; }

/* ---------- Equation / formula ---------- */
.rp-eq {
  display: block;
  text-align: center;
  margin: 22px 0;
  padding: 14px 20px;
  background: #1c2535;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #76e8c4;
  overflow-x: auto;
}

/* ---------- TOC ---------- */
.rp-toc {
  margin: 28px 0 36px;
  padding: 18px 24px;
  background: #16202d;
  border: 1px solid #283444;
  border-radius: 8px;
}
.rp-toc h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #8694a8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.rp-toc ol {
  margin: 0; padding-left: 22px;
  font-size: 0.92rem;
  color: #c0cad8;
}
.rp-toc li { margin: 5px 0; }
.rp-toc a {
  color: #c0cad8 !important;
  border-bottom: none !important;
}
.rp-toc a:hover { color: #5fe0b4 !important; }

/* ---------- References ---------- */
.rp-references {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #283444;
}
.rp-references h2 {
  font-size: 1.2rem;
  border-bottom: none;
  margin: 0 0 18px;
  padding-bottom: 0;
}
.rp-references ol {
  margin: 0; padding-left: 22px;
  font-size: 0.88rem;
  color: #b3bdcc;
}
.rp-references li {
  margin: 12px 0;
  line-height: 1.6;
  padding-left: 6px;
}
.rp-references li::marker { color: #8694a8; }
.rp-references li a { color: #6ed2ea; border-bottom: none; }
.rp-references li a:hover { text-decoration: underline; }

/* ---------- Cite as block ---------- */
.rp-cite {
  margin-top: 30px;
  padding: 18px 22px;
  background: #16202d;
  border: 1px solid #283444;
  border-radius: 8px;
}
.rp-cite__label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #8694a8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.rp-cite__text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #d2dae8;
  line-height: 1.6;
  background: #1c2535;
  padding: 12px 14px;
  border-radius: 4px;
  user-select: all;
}

/* ---------- Related articles ---------- */
.rp-related {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #283444;
}
.rp-related h2 {
  font-size: 1.2rem;
  border-bottom: none;
  margin: 0 0 18px;
  padding-bottom: 0;
}
.rp-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.rp-related__item {
  display: block;
  padding: 16px 18px;
  background: #1c2535;
  border: 1px solid #34425a;
  border-radius: 8px;
  text-decoration: none !important;
  color: inherit !important;
  transition: border-color 0.15s, transform 0.15s;
  border-bottom: 1px solid #34425a !important;
}
.rp-related__item:hover {
  border-color: #5fe0b4 !important;
  transform: translateY(-2px);
}
.rp-related__item .cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #e2bf52;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rp-related__item h4 {
  margin: 0 0 6px;
  font-size: 0.96rem;
  color: #f0f4fa;
}
.rp-related__item p {
  margin: 0;
  font-size: 0.84rem;
  color: #b3bdcc;
  line-height: 1.5;
}

/* ---------- Footer ---------- */
.rp-foot {
  padding: 40px 20px 30px;
  border-top: 1px solid #283444;
  color: #8694a8;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.7;
  background: #0c1118;
}
.rp-foot a { color: #5fe0b4; text-decoration: none; }
.rp-foot__nav {
  margin-bottom: 14px;
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}
.rp-foot__nav a { color: #c0cad8; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .rp-article-header { padding: 40px 18px 24px; }
  .rp-content { padding: 0 18px 60px; }
  .rp-content h2 { font-size: 1.3rem; margin-top: 40px; }
  .rp-meta { padding: 14px 16px; }
  .rp-abstract, .rp-callout { padding: 14px 16px; }
}

/* ============================================================
   READING MODE TOGGLE — button floating top-right trong rp-top nav
   Auto-inject bởi /js/research-theme.js
   ============================================================ */
.rp-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid #34425a;
  border-radius: 8px;
  color: #b3bdcc;
  cursor: pointer;
  transition: all 0.18s ease;
}
.rp-theme-toggle:hover {
  color: #e2bf52;
  border-color: #e2bf52;
  background: rgba(226, 191, 82, 0.08);
}
.rp-theme-toggle svg { width: 18px; height: 18px; }
.rp-theme-toggle .icon-sun { display: none; }
.rp-theme-toggle .icon-moon { display: block; }

/* ============================================================
   LIGHT MODE — reading-focused (Medium/Substack style)
   Activated by <html data-rp-theme="light">
   ============================================================ */
html[data-rp-theme="light"] .rp-body {
  background: #faf8f3;          /* nền kem nhẹ, giảm mỏi mắt (warmer than pure #fff) */
  color: #1a1f2e;
}
html[data-rp-theme="light"] .rp-top {
  background: rgba(250, 248, 243, 0.95);
  border-bottom-color: #d8d2c4;
}
html[data-rp-theme="light"] .rp-top__brand { color: #1a1f2e; }
html[data-rp-theme="light"] .rp-top__brand .tag { color: #6b7280; border-left-color: #d8d2c4; }

html[data-rp-theme="light"] .rp-eyebrow {
  background: rgba(180, 140, 30, 0.08);
  border-color: rgba(180, 140, 30, 0.3);
  color: #8a6d1a;
}
html[data-rp-theme="light"] .rp-article-header h1 { color: #111827; }
html[data-rp-theme="light"] .rp-subtitle { color: #4b5563; }
html[data-rp-theme="light"] .rp-subtitle b { color: #111827; }

html[data-rp-theme="light"] .rp-meta { background: #f0ebdf; border-color: #d8d2c4; }
html[data-rp-theme="light"] .rp-meta__item dt { color: #6b7280; }
html[data-rp-theme="light"] .rp-meta__item dd { color: #1a1f2e; }

html[data-rp-theme="light"] .rp-abstract {
  background: rgba(6, 123, 85, 0.04);
  border-color: rgba(6, 123, 85, 0.25);
}
html[data-rp-theme="light"] .rp-abstract h2 { color: #067b55; }
html[data-rp-theme="light"] .rp-abstract p { color: #1a1f2e; }
html[data-rp-theme="light"] .rp-abstract p b { color: #111827; }

html[data-rp-theme="light"] .rp-keywords__label { color: #6b7280; }
html[data-rp-theme="light"] .rp-keywords a {
  background: #f0ebdf;
  border-color: #d8d2c4;
  color: #4b5563;
}
html[data-rp-theme="light"] .rp-keywords a:hover {
  border-color: #067b55;
  color: #067b55;
}

html[data-rp-theme="light"] .rp-toc {
  background: #f4f0e5;
  border-color: #d8d2c4;
}
html[data-rp-theme="light"] .rp-toc h3 { color: #111827; }
html[data-rp-theme="light"] .rp-toc a { color: #374151; }
html[data-rp-theme="light"] .rp-toc a:hover { color: #067b55; }

html[data-rp-theme="light"] .rp-content h2 {
  color: #111827;
  border-bottom: 1px solid #d8d2c4;
}
html[data-rp-theme="light"] .rp-content h2 .num { color: #8a6d1a; }
html[data-rp-theme="light"] .rp-content h3 { color: #111827; }
html[data-rp-theme="light"] .rp-content h4 { color: #374151; }
html[data-rp-theme="light"] .rp-content p { color: #1a1f2e; }
html[data-rp-theme="light"] .rp-content p b,
html[data-rp-theme="light"] .rp-content p strong { color: #000; }
html[data-rp-theme="light"] .rp-content li { color: #1a1f2e; }
html[data-rp-theme="light"] .rp-content li b { color: #000; }

html[data-rp-theme="light"] .rp-content a {
  color: #067b55;
  border-bottom-color: #94d5bd;
}
html[data-rp-theme="light"] .rp-content a:hover { color: #045c3f; border-bottom-color: #067b55; }

html[data-rp-theme="light"] .rp-content code {
  background: #f0ebdf;
  color: #8a4a1a;
}
html[data-rp-theme="light"] .rp-content blockquote {
  background: #f0ebdf;
  color: #374151;
  border-left-color: #4b8dba;
}

html[data-rp-theme="light"] .rp-table-wrap { border-color: #d8d2c4; }
html[data-rp-theme="light"] .rp-table { color: #1a1f2e; }
html[data-rp-theme="light"] .rp-table caption { color: #6b7280; }
html[data-rp-theme="light"] .rp-table th {
  background: #f0ebdf;
  color: #111827;
  border-color: #d8d2c4;
}
html[data-rp-theme="light"] .rp-table td { border-color: #e4dfd1; }
html[data-rp-theme="light"] .rp-table td.up { color: #067b55; }
html[data-rp-theme="light"] .rp-table td.down { color: #b82c47; }
html[data-rp-theme="light"] .rp-table tbody tr:hover { background: #f5f1e5; }

html[data-rp-theme="light"] .rp-callout {
  background: rgba(6, 123, 85, 0.05);
  border-color: rgba(6, 123, 85, 0.3);
}
html[data-rp-theme="light"] .rp-callout__label { color: #067b55; }
html[data-rp-theme="light"] .rp-callout p { color: #1a1f2e; }
html[data-rp-theme="light"] .rp-callout p b { color: #000; }
html[data-rp-theme="light"] .rp-callout--info {
  background: rgba(75, 141, 186, 0.06);
  border-color: rgba(75, 141, 186, 0.3);
}
html[data-rp-theme="light"] .rp-callout--info .rp-callout__label { color: #2d5d85; }
html[data-rp-theme="light"] .rp-callout--warn {
  background: rgba(184, 44, 71, 0.05);
  border-color: rgba(184, 44, 71, 0.25);
}
html[data-rp-theme="light"] .rp-callout--warn .rp-callout__label { color: #b82c47; }

html[data-rp-theme="light"] .rp-references { border-color: #d8d2c4; }
html[data-rp-theme="light"] .rp-references h2 { color: #111827; }
html[data-rp-theme="light"] .rp-references li { color: #1a1f2e; }

html[data-rp-theme="light"] .rp-cite {
  background: #f0ebdf;
  border-color: #d8d2c4;
}
html[data-rp-theme="light"] .rp-cite__label { color: #8a6d1a; }
html[data-rp-theme="light"] .rp-cite__text { color: #374151; }

html[data-rp-theme="light"] .rp-related h2 { color: #111827; }
html[data-rp-theme="light"] .rp-related__item {
  background: #f4f0e5;
  border-color: #d8d2c4 !important;
}
html[data-rp-theme="light"] .rp-related__item:hover { border-color: #067b55 !important; }
html[data-rp-theme="light"] .rp-related__item h4 { color: #111827; }
html[data-rp-theme="light"] .rp-related__item p { color: #4b5563; }
html[data-rp-theme="light"] .rp-related__item .cat { color: #8a6d1a; }

html[data-rp-theme="light"] .rp-foot { color: #4b5563; border-top-color: #d8d2c4; }
html[data-rp-theme="light"] .rp-foot a { color: #067b55; }

html[data-rp-theme="light"] .rp-theme-toggle {
  color: #4b5563;
  border-color: #d8d2c4;
}
html[data-rp-theme="light"] .rp-theme-toggle:hover {
  color: #8a6d1a;
  border-color: #8a6d1a;
  background: rgba(138, 109, 26, 0.08);
}
html[data-rp-theme="light"] .rp-theme-toggle .icon-moon { display: none; }
html[data-rp-theme="light"] .rp-theme-toggle .icon-sun { display: block; }

/* Custom styling cho phase-cell trong cycle study — light mode */
html[data-rp-theme="light"] .phase-cell { border-color: #d8d2c4; }
html[data-rp-theme="light"] .phase-cell b { color: #111827; }
html[data-rp-theme="light"] .phase-cell .pct { color: #067b55; }
html[data-rp-theme="light"] .phase-cell .sub { color: #6b7280; }
html[data-rp-theme="light"] .phase-cell--markup { background: rgba(6,123,85,0.06); border-color: rgba(6,123,85,0.3); }
html[data-rp-theme="light"] .phase-cell--distribution { background: rgba(180,140,30,0.06); border-color: rgba(180,140,30,0.3); }
html[data-rp-theme="light"] .phase-cell--markdown { background: rgba(184,44,71,0.05); border-color: rgba(184,44,71,0.3); }
html[data-rp-theme="light"] .phase-cell--accumulation { background: rgba(75,141,186,0.06); border-color: rgba(75,141,186,0.3); }
html[data-rp-theme="light"] .phase-cell--transition { background: rgba(119,86,180,0.06); border-color: rgba(119,86,180,0.3); }

/* ============================================================
   LIGHT MODE — universal contrast patch
   Catches ad-hoc inline classes per-article (stack-layer, pred-card, rrg-card,
   strat-card, rs-strat, kill-row, winner-row, rp-kpi, score-bar, ...).
   Strategy: redefine inherited vars + catch-all selectors for common card
   patterns inside .rp-content so text + borders never wash out on cream bg.
   ============================================================ */

html[data-rp-theme="light"] .rp-body {
  --bg:        #faf8f3;
  --bg-2:      #f4f0e5;
  --bg-3:      #f0ebdf;
  --surface:   #f4f0e5;
  --surface-2: #ebe5d3;
  --border:    #d8d2c4;
  --border-2:  #c5beac;
  --text:      #111827;
  --text-dim:  #374151;
  --text-mute: #6b7280;
  --neon:      #067b55;
  --neon-2:    #2d5d85;
  --neon-3:    #7556b4;
  --gold:      #8a6d1a;
  --gold-2:    #b48a3c;
  --red:       #b82c47;
  --amber:     #b48000;
}

/* Catch-all card-like containers in article body — chỉ trong .rp-content
   để không đụng UI khác. Dùng [class*="..."] để match cả ad-hoc classes
   (stack-layer, pred-card, rrg-card, kill-row, winner-row, rs-strat...) */
html[data-rp-theme="light"] .rp-content [class*="-card"],
html[data-rp-theme="light"] .rp-content [class*="-layer"],
html[data-rp-theme="light"] .rp-content [class*="-cell"],
html[data-rp-theme="light"] .rp-content [class*="-row"],
html[data-rp-theme="light"] .rp-content [class*="-strat"],
html[data-rp-theme="light"] .rp-content [class*="-kpi"] {
  background-color: #f4f0e5;
  border-color: #d8d2c4;
  color: #1a1f2e;
}
html[data-rp-theme="light"] .rp-content [class*="-card"] b,
html[data-rp-theme="light"] .rp-content [class*="-layer"] b,
html[data-rp-theme="light"] .rp-content [class*="-cell"] b,
html[data-rp-theme="light"] .rp-content [class*="-row"] b,
html[data-rp-theme="light"] .rp-content [class*="-strat"] b,
html[data-rp-theme="light"] .rp-content [class*="-kpi"] b,
html[data-rp-theme="light"] .rp-content [class*="-card"] strong,
html[data-rp-theme="light"] .rp-content [class*="-layer"] strong,
html[data-rp-theme="light"] .rp-content [class*="-cell"] strong { color: #0b1220; }
html[data-rp-theme="light"] .rp-content [class*="-card"] span,
html[data-rp-theme="light"] .rp-content [class*="-layer"] span,
html[data-rp-theme="light"] .rp-content [class*="-cell"] span,
html[data-rp-theme="light"] .rp-content [class*="-row"] span,
html[data-rp-theme="light"] .rp-content [class*="-strat"] span,
html[data-rp-theme="light"] .rp-content [class*="-kpi"] span,
html[data-rp-theme="light"] .rp-content [class*="-card"] p,
html[data-rp-theme="light"] .rp-content [class*="-layer"] p,
html[data-rp-theme="light"] .rp-content [class*="-cell"] p { color: #1a1f2e; }

/* Stack-layer accent variants — dùng tint nhẹ trên kem để vẫn nhận diện màu */
html[data-rp-theme="light"] .stack-layer--verify   { background: rgba(6,123,85,0.07);   border-color: rgba(6,123,85,0.35); }
html[data-rp-theme="light"] .stack-layer--warning  { background: rgba(180,140,30,0.08); border-color: rgba(180,140,30,0.4); }
html[data-rp-theme="light"] .stack-layer--arch     { background: rgba(45,93,133,0.07);  border-color: rgba(45,93,133,0.35); }
html[data-rp-theme="light"] .stack-layer--macro    { background: rgba(117,86,180,0.07); border-color: rgba(117,86,180,0.35); }
html[data-rp-theme="light"] .stack-layer--alpha    { background: rgba(138,109,26,0.08); border-color: rgba(138,109,26,0.4); }

/* RRG variants (macro-sector-outlook) */
html[data-rp-theme="light"] .rrg-card--lead     { background: rgba(6,123,85,0.07);   border-color: rgba(6,123,85,0.35); }
html[data-rp-theme="light"] .rrg-card--weaken   { background: rgba(180,140,30,0.08); border-color: rgba(180,140,30,0.4); }
html[data-rp-theme="light"] .rrg-card--lag      { background: rgba(184,44,71,0.07);  border-color: rgba(184,44,71,0.35); }
html[data-rp-theme="light"] .rrg-card--improve  { background: rgba(45,93,133,0.07);  border-color: rgba(45,93,133,0.35); }

/* Strategy variants (main-report) */
html[data-rp-theme="light"] .rs-strat--winner    { background: rgba(6,123,85,0.08);   border-color: rgba(6,123,85,0.4); }
html[data-rp-theme="light"] .rs-strat--marginal  { background: rgba(180,140,30,0.08); border-color: rgba(180,140,30,0.4); }
html[data-rp-theme="light"] .rs-strat--aggressive{ background: rgba(184,44,71,0.07);  border-color: rgba(184,44,71,0.35); }

/* KPI cells */
html[data-rp-theme="light"] .rp-kpi__val,
html[data-rp-theme="light"] .rs-hero__stat { color: #0b1220; }
html[data-rp-theme="light"] .rp-kpi__lbl,
html[data-rp-theme="light"] .rp-kpi__hint { color: #6b7280; }
html[data-rp-theme="light"] .rp-kpi__val--up   { color: #067b55; }
html[data-rp-theme="light"] .rp-kpi__val--down { color: #b82c47; }
html[data-rp-theme="light"] .rp-kpi__val--neutral { color: #374151; }

/* Score bars (macro-sector-outlook) */
html[data-rp-theme="light"] .score-bar       { background: #ebe5d3; }
html[data-rp-theme="light"] .score-bar__fill { background: linear-gradient(90deg, #067b55, #2d5d85); }
html[data-rp-theme="light"] .score-bar__label { color: #1a1f2e; }

/* Up/down semantic colors (used liberally in tables + KPI) */
html[data-rp-theme="light"] .rp-content .up   { color: #067b55; }
html[data-rp-theme="light"] .rp-content .down { color: #b82c47; }

/* Borders/backgrounds for ad-hoc panel tags */
html[data-rp-theme="light"] .panel__foot-note,
html[data-rp-theme="light"] .rs-foot,
html[data-rp-theme="light"] .rs-caveats {
  background: #f4f0e5;
  border-color: #d8d2c4;
  color: #374151;
}
