/*
 * Bold Arc — Article Component Styles
 * External stylesheet replacing all inline CSS in article content.
 * Every class here maps 1:1 to an inline style pattern used in articles.
 * Author: Brio Rhodes | Last updated: 2026-07-02
 */

/* ─── ARTICLE BODY TYPOGRAPHY (replaces all per-element inline styles) ── */
.article-body p {
  margin-bottom: 24px;
  font-size: 17px;
  line-height: 1.82;
  color: #c8d0e8;
}

.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 48px 0 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(6,229,236,0.2);
}

.article-body h3 {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin: 36px 0 14px;
}

.article-body strong { color: #ffffff; }
.article-body em     { color: #e8ecf4; }

.article-body a {
  color: var(--ba-cyan);
  text-decoration: none;
  font-weight: 600;
}

.ba-table-wrap {
  max-width: 100%;
  margin: 24px 0;
  border-radius: 10px; /* match table border-radius */
}

.article-body table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
  margin: 24px 0;
  box-sizing: border-box;
}

.article-body table {
  background: rgba(6,18,54,0.85);
  border: 1px solid rgba(6,229,236,0.25);
  border-radius: 10px;
}

.article-body table thead tr {
  background: rgba(6,229,236,0.1);
  border-bottom: 1px solid rgba(6,229,236,0.3);
}

.article-body table tbody tr {
  border-bottom: 1px solid rgba(176,194,245,0.1);
}

.article-body table tbody tr:last-child { border-bottom: none; }
.article-body table tbody tr:nth-child(even) { background: rgba(255,255,255,0.03); }
.article-body table tbody tr:hover { background: rgba(6,229,236,0.07); }

.article-body table th {
  padding: 8px 10px;
  background: transparent;
  color: #06E5EC;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  border-bottom: none;
  text-align: left;
}

.article-body table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #c8d0e8;
  font-size: 13px;
  line-height: 1.4;
}

.article-body table td.td-highlight {
  color: var(--ba-cyan);
  font-weight: 700;
}

.article-body table td.td-muted {
  color: #b0bcd4;
}

.article-body table td.td-result {
  color: #36d68c;
  font-size: 12px;
  font-weight: 600;
}

/* ─── DESIGN TOKENS ────────────────────────────────────────────────── */
:root {
  --ba-cyan:        #06E5EC;
  --ba-cyan-dim:    #04b8be;
  --ba-gold:        #C9A84C;
  --ba-red:         #ff5b5b;
  --ba-purple:      #a78bfa;
  --ba-dark-bg:     rgba(0,18,60,0.6);
  --ba-darker-bg:   rgba(0,18,60,0.7);
  --ba-navy-bg:     rgba(0,22,84,0.7);
  --ba-border-dim:  rgba(255,255,255,0.08);
  --ba-text-body:   #e8ecf4;
  --ba-text-muted:  #b0bcd4;
  --ba-text-dim:    #6b7fa8;
}

/* ─── CALLOUT BOXES ─────────────────────────────────────────────────── */
/* Base callout */
.ba-callout {
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 32px 0;
  border-left-width: 4px;
  border-left-style: solid;
}

/* Cyan callout */
.ba-callout--cyan {
  background: rgba(6,229,236,0.06);
  border: 1px solid rgba(6,229,236,0.25);
  border-left: 4px solid var(--ba-cyan);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 32px 0;
}

/* Gold callout */
.ba-callout--gold {
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.25);
  border-left: 4px solid var(--ba-gold);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 32px 0;
}

/* Red callout */
.ba-callout--red {
  background: rgba(255,91,91,0.05);
  border: 1px solid rgba(255,91,91,0.2);
  border-left: 4px solid var(--ba-red);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 32px 0;
}

/* Purple callout */
.ba-callout--purple {
  background: rgba(167,139,250,0.05);
  border: 1px solid rgba(167,139,250,0.2);
  border-left: 4px solid var(--ba-purple);
  border-radius: 0 12px 12px 0;
  padding: 22px 26px;
  margin: 36px 0;
}

/* Red emphasis callout (larger) */
.ba-callout--red-lg {
  border-left: 4px solid var(--ba-red);
  background: rgba(255,91,91,0.05);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin-bottom: 36px;
  font-size: 17px;
  line-height: 1.82;
  color: var(--ba-text-body);
}

/* ─── STAT / DATA BLOCKS ────────────────────────────────────────────── */
/* Standard stat block */
.ba-stat-block {
  background: var(--ba-dark-bg);
  border: 1px solid rgba(6,229,236,0.2);
  border-radius: 14px;
  padding: 28px;
  margin: 36px 0;
  text-align: center;
}

/* Dark variant */
.ba-stat-block--dark {
  background: var(--ba-darker-bg);
  border: 1px solid var(--ba-border-dim);
  border-radius: 14px;
  padding: 28px;
  margin: 36px 0;
}

/* Navy variant */
.ba-stat-block--navy {
  background: var(--ba-navy-bg);
  border: 1px solid rgba(6,229,236,0.2);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}

/* Premium gradient block */
.ba-stat-block--premium {
  background: linear-gradient(135deg, rgba(0,22,84,0.7) 0%, rgba(0,14,46,0.8) 100%);
  border: 1.5px solid rgba(201,168,76,0.3);
  border-radius: 16px;
  padding: 32px;
  margin: 48px 0 0;
}

/* Premium gradient block alt */
.ba-stat-block--premium-alt {
  background: linear-gradient(135deg, rgba(0,22,84,0.9) 0%, rgba(0,32,110,0.8) 100%);
  border: 1.5px solid rgba(201,168,76,0.4);
  border-radius: 16px;
  padding: 32px;
  margin: 48px 0 0;
}

/* Gold gradient left-border block */
.ba-stat-block--gold-grad {
  background: linear-gradient(135deg, rgba(0,26,100,0.6) 0%, rgba(0,18,72,0.4) 100%);
  border-left: 4px solid var(--ba-gold);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin: 36px 0;
}

/* Grid of stat cards */
.ba-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 36px 0;
}

/* ─── PULL QUOTE ────────────────────────────────────────────────────── */
.ba-pullquote {
  border-left: 3px solid var(--ba-cyan);
  padding: 18px 28px;
  margin: 40px 0;
  font-size: 22px;
  font-style: italic;
  color: var(--ba-text-body);
  line-height: 1.55;
}

/* ─── PROGRESS / BAR CHART ──────────────────────────────────────────── */
.ba-bar-track {
  flex: 1;
  background: rgba(255,91,91,0.1);
  border-radius: 4px;
  height: 30px;
  overflow: visible;
  position: relative;
}

.ba-bar-track--cyan {
  flex: 1;
  background: rgba(6,229,236,0.08);
  border-radius: 4px;
  height: 28px;
  overflow: visible;
}

.ba-bar-track--gold {
  flex: 1;
  background: rgba(201,168,76,0.1);
  border-radius: 4px;
  height: 28px;
  overflow: visible;
}

.ba-bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  position: relative;
  overflow: visible;
}

.ba-bar-fill--cyan   { background: rgba(6,229,236,0.5); }
.ba-bar-fill--red    { background: var(--ba-red); }
.ba-bar-fill--red-dim { background: rgba(255,91,91,0.7); }
.ba-bar-fill--gold   { background: rgba(201,168,76,0.6); }

/* Bar row (label + track) */
.ba-bar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px;
  line-height: 1.3;
}

/* ─── DIVIDERS & FOOTERS ────────────────────────────────────────────── */
.ba-divider-top {
  border-top: 1px solid var(--ba-border-dim);
  padding: 24px 0 0;
  margin-top: 48px;
}

.ba-footer-strip {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 32px 0;
  margin-top: 0;
}

/* ─── NAV / CTA STRIP ───────────────────────────────────────────────── */
.ba-nav-strip {
  background: rgba(6,229,236,0.06);
  border: 1px solid rgba(6,229,236,0.2);
  border-radius: 10px;
  padding: 12px 20px;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
  line-height: 1.4;
}

/* ─── SOURCE / CITATION ROW ─────────────────────────────────────────── */
.ba-source-row {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--ba-text-dim);
  line-height: 1.65;
  margin-bottom: 9px;
}

/* ─── FLEX UTILITIES ────────────────────────────────────────────────── */
.ba-flex-row {
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.3;
}

.ba-flex-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ba-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ba-flex-between {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ba-data-row {
  display: flex;
  gap: 18px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* Red-bordered data row */
.ba-data-row--red {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,91,91,0.3);
  border-bottom: 1px solid rgba(255,91,91,0.3);
  margin: 4px 0;
  line-height: 1.3;
}

/* ─── LABELS / EYEBROWS ─────────────────────────────────────────────── */
.ba-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.ba-label--cyan  { color: var(--ba-cyan); }
.ba-label--gold  { color: var(--ba-gold); }
.ba-label--red   { color: var(--ba-red); }
.ba-label--dim   { color: var(--ba-text-dim); }

.ba-label--section {
  font-size: 11px;
  font-style: normal;
  color: var(--ba-cyan);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ─── TYPOGRAPHY ────────────────────────────────────────────────────── */
.ba-text-body   { color: var(--ba-text-body); }
.ba-text-muted  { color: var(--ba-text-muted); font-size: 11.5px; line-height: 1.4; font-weight: 500; }
.ba-text-dim    { color: var(--ba-text-dim); }
.ba-text-tiny   { font-size: 10px; color: var(--ba-text-dim); margin-top: 4px; }
.ba-text-small  { font-size: 12px; color: var(--ba-text-dim); line-height: 1.6; }

/* ─── IMAGE CAPTIONS ────────────────────────────────────────────────── */
.ba-caption {
  font-size: 13px;
  color: var(--ba-text-muted);
  line-height: 1.6;
  background: var(--ba-darker-bg);
  padding: 12px 16px;
  margin-top: 0;
  border-top: 2px solid var(--ba-gold);
  font-style: italic;
  display: block;
}
.ba-caption strong {
  color: var(--ba-gold);
  font-style: normal;
}

.ba-link--cyan {
  color: var(--ba-cyan);
  text-decoration: none;
  font-weight: 700;
}

.ba-link--gold {
  color: var(--ba-gold);
  font-style: normal;
  font-weight: 600;
}

/* Numbered list marker */
.ba-num--cyan {
  color: var(--ba-cyan);
  font-weight: 700;
  min-width: 24px;
  flex-shrink: 0;
}

.ba-num--gold {
  color: var(--ba-gold);
  font-weight: 700;
  min-width: 24px;
  flex-shrink: 0;
}

/* ─── CTA BUTTON ────────────────────────────────────────────────────── */
.ba-btn--gold {
  display: inline-block;
  background: var(--ba-gold);
  color: #000e3a;
  font-weight: 700;
  font-size: 12px;
  padding: 9px 22px;
  border-radius: 8px;
  text-decoration: none;
}

/* ─── SUPERSCRIPT FOOTNOTE ──────────────────────────────────────────── */
.ba-sup {
  font-size: 10px;
  line-height: 0;
  position: relative;
  vertical-align: super;
  margin-left: 1px;
}

/* ─── CHART / DATA BLOCK UTILITIES ──────────────────────────────── */
.ba-chart-body    { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.ba-chart-subhead { font-size: 17px; font-weight: 700; color: #ffffff; margin-bottom: 8px; }
.ba-premium-heading { font-size: 22px; font-weight: 700; font-style: italic; color: #ffffff; margin-bottom: 16px; }
.ba-stat-arrow    { font-size: 28px; color: #6b7fa8; align-self: center; }
.ba-stat-big      { color: var(--ba-cyan); font-size: 40px; font-weight: 700; }

.ba-bar-label       { width: 160px; font-size: 13px; color: #c8d0e8; flex-shrink: 0; line-height: 1.3; }
.ba-bar-label--wide { width: 200px; }
.ba-bar-label--bold { font-weight: 700; color: var(--ba-red); }
.ba-bar-value       { font-size: 12px; color: #6b7fa8; width: 100px; }
.ba-bar-value--red  { color: var(--ba-red); font-weight: 700; }

.ba-bar-text        { font-size: 12px; font-weight: 700; color: #ffffff; line-height: 1.3; white-space: nowrap; }
.ba-bar-text--dark  { color: #000e3a; }
.ba-bar-text--lg    { font-size: 13px; font-weight: 700; color: #ffffff; }

.ba-bar-track--faint     { background: rgba(255,91,91,0.07) !important; }
.ba-bar-track--faintest  { background: rgba(255,91,91,0.05) !important; }
.ba-bar-track--tall      { height: 34px !important; }

.ba-bar-fill--red-dim     { background: rgba(255,91,91,0.7); }
.ba-bar-fill--red-faint   { background: rgba(255,91,91,0.5); }
.ba-bar-fill--red-faintest { background: rgba(255,91,91,0.35); }

.ba-num--lg         { font-size: 28px; width: 40px; line-height: 1; }
.ba-stakeholder-label { font-weight: 700; color: #e8ecf4; min-width: 160px; }

.ba-author-line     { margin-top: 20px; font-size: 14px; color: var(--ba-gold); font-weight: 600; }

.ba-text-cyan-dim   { color: var(--ba-cyan-dim); }

/* ─── LINK NAV BUTTON ──────────────────────────────────────────── */
.ba-link--nav {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid rgba(6,229,236,0.4);
  border-radius: 6px;
  padding: 5px 14px;
}

/* ─── RED HEADER STRIPS ─────────────────────────────────────────────── */
.ba-strip--red-top {
  background: rgba(255,91,91,0.07);
  border-top: 1px solid rgba(255,91,91,0.2);
  padding: 14px 24px;
}

.ba-strip--red-bottom {
  background: rgba(255,91,91,0.08);
  border-bottom: 1px solid rgba(255,91,91,0.2);
  padding: 16px 24px;
}

/* ====== ARTICLE COMPONENTS — RESPONSIVE ====== */

/* Ensure nothing overflows the 672px article body */
.article-body .ba-stat-block,
.article-body .ba-stat-block--dark,
.article-body .ba-stat-block--navy,
.article-body .ba-stat-block--premium,
.article-body .ba-stat-block--premium-alt,
.article-body .ba-stat-block--gold-grad,
.article-body .ba-callout--cyan,
.article-body .ba-callout--gold,
.article-body .ba-callout--red,
.article-body .ba-callout--red-lg,
.article-body .ba-callout--purple,
.article-body .ba-nav-strip,
.article-body .ba-pullquote {
  max-width: 100%;
  box-sizing: border-box;
}

/* Tablet — 760px */
@media (max-width: 760px) {
  .ba-stat-block,
  .ba-stat-block--dark,
  .ba-stat-block--premium,
  .ba-stat-block--premium-alt {
    padding: 20px 18px;
  }
  .ba-callout--cyan,
  .ba-callout--gold,
  .ba-callout--red,
  .ba-callout--purple { padding: 14px 16px; }
  .ba-pullquote { font-size: 18px; padding: 14px 20px; }
  .ba-stat-big { font-size: 32px; }
  .ba-flex-center { gap: 10px; }
}

/* Mobile — 600px */
@media (max-width: 600px) {

  /* Nav strip: stack vertically */
  .ba-nav-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }
  .ba-link--nav { align-self: flex-start; }

  /* Bar chart rows: shrink label, keep track readable */
  .ba-flex-row {
    gap: 8px;
  }
  .ba-bar-label {
    width: 110px;
    font-size: 11.5px;
  }
  .ba-bar-label--wide { width: 130px; }
  .ba-bar-text { font-size: 10.5px; }

  /* Stat block: tighter */
  .ba-stat-block,
  .ba-stat-block--dark,
  .ba-stat-block--navy {
    padding: 16px 14px;
  }
  .ba-stat-block--premium,
  .ba-stat-block--premium-alt {
    padding: 20px 16px;
  }

  /* Stat comparisons: single column */
  .ba-stat-grid { grid-template-columns: 1fr 1fr; }
  .ba-flex-center { flex-direction: column; align-items: center; gap: 8px; }
  .ba-stat-arrow { transform: rotate(90deg); font-size: 20px; }

  /* Callouts: tighter */
  .ba-callout--cyan,
  .ba-callout--gold,
  .ba-callout--red,
  .ba-callout--purple { padding: 12px 14px; }
  .ba-callout--red-lg { padding: 18px 16px; font-size: 15px; }

  /* Pull quote */
  .ba-pullquote { font-size: 17px; padding: 12px 16px; }

  /* Source rows */
  .ba-source-row { font-size: 11px; }

  /* Chart body inner padding */
  .ba-chart-body { padding: 12px 14px; }

  /* Strip headers in charts */
  .ba-strip--red-bottom,
  .ba-strip--red-top { padding: 12px 14px; font-size: 13px; }

  /* Bar data rows */
  .ba-data-row--red { gap: 8px; }
  .ba-data-row { gap: 10px; flex-wrap: wrap; }
}

/* Small mobile table — 520px */
@media (max-width: 520px) {
  .article-body table th {
    font-size: 10px;
    padding: 6px 8px;
  }
  .article-body table td {
    font-size: 12px;
    padding: 6px 8px;
  }
}

/* Small mobile — 400px */
@media (max-width: 400px) {
  /* Stack bar chart rows vertically on tiny screens */
  .ba-flex-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .ba-bar-label {
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    color: #c8d0e8;
  }
  .ba-bar-track,
  .ba-bar-track--cyan,
  .ba-bar-track--gold { width: 100%; }

  .ba-stat-grid { grid-template-columns: 1fr; }
  .ba-stat-big { font-size: 28px; }
}

/* ─── COMMENTS ──────────────────────────────────────────────────────── */
.ba-comments {
  max-width: 720px;
  margin: 56px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--ba-border-dim);
}

.ba-comments-title {
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 24px;
}

.ba-comments-closed {
  color: var(--ba-text-muted);
  font-style: italic;
}

.ba-comment-list, .ba-comment-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ba-comment-list ul {
  margin-left: 28px;
  padding-left: 20px;
  border-left: 2px solid var(--ba-border-dim);
}

.ba-comment {
  background: var(--ba-darker-bg);
  border: 1px solid var(--ba-border-dim);
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.ba-comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ba-comment-avatar {
  border-radius: 50%;
  display: block;
}

.ba-comment-meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ba-comment-author {
  font-weight: 700;
  color: #ffffff;
  font-size: 14px;
}

.ba-comment-date a {
  font-size: 11px;
  color: var(--ba-text-dim);
  text-decoration: none;
}

.ba-comment-pending {
  color: var(--ba-gold);
  font-size: 12px;
  margin: 0 0 10px;
}

.ba-comment-content {
  color: var(--ba-text-body);
  font-size: 15px;
  line-height: 1.7;
}

.ba-comment-content p:last-child { margin-bottom: 0; }

.ba-comment-reply {
  margin-top: 10px;
}

.ba-comment-reply a {
  font-size: 12px;
  font-weight: 700;
  color: var(--ba-cyan);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Comment form */
#respond {
  background: var(--ba-navy-bg);
  border: 1px solid var(--ba-border-dim);
  border-radius: 8px;
  padding: 28px 26px;
  margin-top: 32px;
}

#respond .comment-reply-title {
  color: #ffffff;
  font-size: 18px;
  margin: 0 0 18px;
}

#respond .comment-reply-title small a {
  color: var(--ba-cyan);
  font-size: 12px;
  margin-left: 10px;
}

.ba-comment-field-half {
  display: inline-block;
  width: calc(50% - 8px);
  vertical-align: top;
}

.ba-comment-field-half:first-of-type { margin-right: 16px; }

.ba-comment-input,
.ba-comment-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ba-border-dim);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--ba-text-body);
  font-family: inherit;
  font-size: 14px;
}

.ba-comment-textarea {
  min-height: 120px;
  resize: vertical;
  margin-top: 14px;
}

.ba-comment-input:focus,
.ba-comment-textarea:focus {
  outline: none;
  border-color: var(--ba-cyan);
}

#respond .form-submit { margin-top: 16px; }

#respond input[type="submit"].ba-btn--gold {
  background: var(--ba-gold);
  color: #0A1628;
  border: none;
  border-radius: 6px;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

#respond input[type="submit"].ba-btn--gold:hover { background: #ddb95a; }

@media (max-width: 480px) {
  .ba-comment-field-half {
    width: 100%;
    display: block;
  }
  .ba-comment-field-half:first-of-type { margin-right: 0; margin-bottom: 12px; }
}
