/* ============================================================
   Stock Technical Analyzer v3 — Premium Module Styles
   Inspired by refined financial dictionary aesthetic.
   Fonts loaded via wp_enqueue_style in main plugin file.
   ============================================================ */

/* ── CSS RESET inside wrapper ── */
.sta-wrap,
.sta-wrap * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.sta-wrap button { cursor: pointer; font-family: inherit; }
.sta-hide { display: none !important; }

/* ══════════════════════════════════════════════════════════
   HERO MODULE
══════════════════════════════════════════════════════════ */
.sta-wrap {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  max-width: 980px;
  margin: 0 auto;
  color: #1c2b3a;
}

.sta-hero-module {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #b8c8d8;
  box-shadow: 0 8px 40px rgba(28, 60, 100, .12), 0 1px 4px rgba(28,60,100,.08);
  margin-bottom: 32px;
}

/* Gradient background — layered like the reference */
.sta-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% -10%, rgba(196,214,232,.9) 0%, transparent 70%),
    linear-gradient(175deg, #dde8f0 0%, #edf2f7 40%, #f5f0e5 100%);
  z-index: 0;
}

/* Inner content sits above bg */
.sta-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 44px 40px 28px;
}

/* Circle icon — matches reference */
.sta-circle-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1.5px solid rgba(100,140,180,.35);
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #2c5282;
  box-shadow: 0 2px 12px rgba(44,82,130,.12);
}

/* Title */
.sta-hero-title {
  font-family: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: capitalize;
  color: #1c2b3a;
  margin-bottom: 10px;
  line-height: 1.2;
}

/* Subtitle */
.sta-hero-sub {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  color: #6b8099;
  letter-spacing: .3px;
  margin-bottom: 18px;
}

/* Ornament divider */
.sta-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #b89a5c;
  margin-bottom: 0;
}
.sta-orn-line {
  display: block;
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

/* ── Category pills ── */
.sta-cat-pills {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 18px 40px 0;
  flex-wrap: wrap;
}

.sta-cat {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .8px;
  padding: 6px 20px;
  border-radius: 100px;
  border: 1.5px solid rgba(100,140,180,.3);
  background: rgba(255,255,255,.5);
  color: #3a5470;
  transition: all .18s ease;
  backdrop-filter: blur(4px);
}
.sta-cat:hover {
  background: rgba(255,255,255,.85);
  border-color: rgba(44,82,130,.5);
  color: #1c2b3a;
}
.sta-cat.active {
  background: #2c5282;
  border-color: #2c5282;
  color: #fff;
  box-shadow: 0 2px 10px rgba(44,82,130,.25);
}

/* ── Search bar ── */
.sta-search-zone {
  position: relative;
  z-index: 1;
  padding: 20px 40px 0;
}

.sta-search-bar {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.88);
  border: 1.5px solid rgba(100,140,180,.4);
  border-radius: 10px;
  padding: 4px 4px 4px 16px;
  backdrop-filter: blur(8px);
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 2px 12px rgba(44,82,130,.07);
}
.sta-search-bar:focus-within {
  border-color: #2c5282;
  box-shadow: 0 0 0 3px rgba(44,82,130,.1), 0 2px 12px rgba(44,82,130,.1);
  background: rgba(255,255,255,.98);
}

.sta-search-icon {
  color: #8aa4c0;
  flex-shrink: 0;
  margin-right: 10px;
}

.sta-input {
  flex: 1;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  border: none;
  background: transparent;
  color: #1c2b3a;
  outline: none;
  padding: 12px 0;
  min-width: 0;
}
.sta-input::placeholder {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  letter-spacing: .3px;
  text-transform: none;
  color: #aabccc;
  font-weight: 400;
}

.sta-search-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #2c5282;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, transform .12s;
  box-shadow: 0 2px 8px rgba(44,82,130,.3);
}
.sta-search-btn:hover  { background: #1a3a5c; }
.sta-search-btn:active { transform: scale(.95); }
.sta-search-btn:disabled { background: #8aa4c0; box-shadow: none; cursor: not-allowed; }

/* ── Popular chips row (bottom bar) ── */
.sta-recent-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(255,255,255,.45);
  border-top: 1px solid rgba(100,140,180,.2);
  padding: 14px 40px;
  margin-top: 20px;
}
.sta-recent-lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #8aa4c0;
}
.sta-chip {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 4px 12px;
  background: transparent;
  border: 1px solid rgba(100,140,180,.35);
  border-radius: 100px;
  color: #4a6a84;
  transition: all .15s;
}
.sta-chip:hover {
  background: #2c5282;
  border-color: #2c5282;
  color: #fff;
}

/* ══════════════════════════════════════════════════════════
   LOADING
══════════════════════════════════════════════════════════ */
.sta-loading {
  background: #faf8f4;
  border: 1px solid #ddd5c8;
  border-radius: 12px;
  padding: 48px;
  text-align: center;
  margin-bottom: 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.sta-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 38px;
  margin-bottom: 20px;
}
.sta-bar {
  width: 6px;
  background: #2c5282;
  border-radius: 3px;
  animation: sta-bounce 1s ease-in-out infinite;
}
.sta-bar:nth-child(1){animation-delay:0s;   height:16px}
.sta-bar:nth-child(2){animation-delay:.1s;  height:26px}
.sta-bar:nth-child(3){animation-delay:.2s;  height:38px}
.sta-bar:nth-child(4){animation-delay:.3s;  height:26px}
.sta-bar:nth-child(5){animation-delay:.4s;  height:16px}
@keyframes sta-bounce {
  0%,100% { transform: scaleY(.5); opacity: .4; }
  50%      { transform: scaleY(1);  opacity: 1;  }
}
.sta-loading p     { font-size: 16px; color: #1c2b3a; margin-bottom: 6px; }
.sta-loading small { font-size: 12px; color: #6b8099; }

/* ══════════════════════════════════════════════════════════
   ERROR
══════════════════════════════════════════════════════════ */
.sta-error {
  background: #fde8e6;
  border: 1px solid #f5c6c2;
  border-radius: 10px;
  padding: 14px 18px;
  color: #c0392b;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
}

/* ══════════════════════════════════════════════════════════
   REPORT
══════════════════════════════════════════════════════════ */
.sta-report { animation: sta-fadein .35s ease; }
@keyframes sta-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* CSS vars for report */
.sta-report {
  --r-bg:      #faf8f4;
  --r-card:    #fff;
  --r-border:  #e0d8cc;
  --r-text:    #1a1814;
  --r-muted:   #6b6560;
  --r-red:     #c0392b;
  --r-green:   #2d7a4f;
  --r-amber:   #c87f0a;
  --r-blue:    #2c5282;
  --r-radius:  10px;
}

/* Company bar */
.sta-company-bar {
  background: var(--r-card);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius) var(--r-radius) 0 0;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: none;
}
.sta-company-info { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sta-company-name {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 20px; font-weight: 700; color: var(--r-text);
}
.sta-company-meta { font-size: 12px; color: var(--r-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.sta-company-meta span { display: flex; align-items: center; gap: 4px; }
.sta-sector-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px; background: #eef2f7; color: var(--r-blue);
}

/* Hero price block */
.sta-hero {
  background: var(--r-card);
  border: 1px solid var(--r-border);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-top: none;
  border-bottom: none;
}
.sta-tklbl {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--r-muted); margin-bottom: 7px;
}
.sta-price-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sta-price {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 42px; font-weight: 700; color: var(--r-text); line-height: 1;
}
.sta-chg { font-size: 14px; font-weight: 500; }
.sta-chg.pos { color: var(--r-green); }
.sta-chg.neg { color: var(--r-red); }
.sta-bias-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; padding: 6px 14px; border-radius: 6px;
}
.sta-bias-tag.bearish { background: #fde8e6; color: var(--r-red); }
.sta-bias-tag.bullish { background: #e6f4ec; color: var(--r-green); }
.sta-bias-tag.neutral { background: #f0ece4; color: var(--r-muted); }

/* Stats strip */
.sta-stats {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 1px; background: var(--r-border);
  border: 1px solid var(--r-border); border-top: none;
  border-radius: 0 0 var(--r-radius) var(--r-radius);
  overflow: hidden; margin-bottom: 24px;
}
.sta-stat { background: var(--r-card); padding: 12px 14px; text-align: center; }
.sta-slbl {
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--r-muted); margin-bottom: 5px;
}
.sta-sval {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 14px; font-weight: 500; color: var(--r-text);
}
.sta-sval.red   { color: var(--r-red); }
.sta-sval.green { color: var(--r-green); }
.sta-sval.amber { color: var(--r-amber); }
.sta-sval.blue  { color: var(--r-blue); }

/* Section labels */
.sta-sec-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--r-muted);
  border-bottom: 1px solid var(--r-border);
  padding-bottom: 9px; margin: 22px 0 12px;
}
.sta-ma-align {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  padding: 3px 9px; border-radius: 4px; display: inline-block;
}
.sta-ma-align.bearish { background: #fde8e6; color: var(--r-red); }
.sta-ma-align.bullish { background: #e6f4ec; color: var(--r-green); }
.sta-ma-align.mixed   { background: #f0ece4; color: var(--r-muted); }

/* Pattern cards */
.sta-pcard {
  background: var(--r-card); border: 1px solid var(--r-border);
  border-left: 3px solid var(--r-red);
  border-radius: 0 var(--r-radius) var(--r-radius) 0;
  padding: 14px 18px; margin-bottom: 10px;
}
.sta-pcard.bullish { border-left-color: var(--r-green); }
.sta-pcard.neutral { border-left-color: var(--r-amber); }
.sta-ptitle { font-size: 14px; font-weight: 600; color: var(--r-text); margin-bottom: 5px; }
.sta-pdesc  { font-size: 13px; color: var(--r-muted); line-height: 1.6; }

/* Tables */
.sta-tbl {
  width: 100%; border-collapse: collapse; background: var(--r-card);
  border: 1px solid var(--r-border); border-radius: var(--r-radius);
  overflow: hidden; margin-bottom: 4px;
}
.sta-tbl tr { border-bottom: 1px solid var(--r-border); }
.sta-tbl tr:last-child { border-bottom: none; }
.sta-tbl td { padding: 11px 16px; font-size: 13px; vertical-align: middle; }
.sta-tbl td:first-child { color: var(--r-text); font-weight: 500; width: 35%; }
.sta-tbl td:last-child  { text-align: right; }
.sta-mono { font-family: 'IBM Plex Mono','Courier New',monospace; font-size: 12px; color: var(--r-muted); }
.sta-note { font-size: 12px; color: var(--r-muted); font-style: italic; }

/* Badges */
.sta-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .5px; padding: 2px 9px; border-radius: 4px;
}
.sta-badge.buy      { background: #e6f4ec; color: var(--r-green); }
.sta-badge.sell     { background: #fde8e6; color: var(--r-red); }
.sta-badge.watch    { background: #fff3e0; color: var(--r-amber); }
.sta-badge.bearish  { background: #fde8e6; color: var(--r-red); }
.sta-badge.bullish  { background: #e6f4ec; color: var(--r-green); }
.sta-badge.neutral  { background: #f0ece4; color: var(--r-muted); }
.sta-badge.extended { background: #fff3e0; color: var(--r-amber); }
.sta-badge.squeeze  { background: #fff3e0; color: var(--r-amber); }
.sta-badge.normal   { background: #f0ece4; color: var(--r-muted); }
.sta-badge.strong   { background: #e6f4ec; color: var(--r-green); }
.sta-badge.weak     { background: #fde8e6; color: var(--r-red); }

/* Key levels */
.sta-levels td:last-child {
  text-align: left;
  font-family: 'IBM Plex Mono','Courier New',monospace;
  font-size: 13px; color: var(--r-text);
}
.sta-cur td { background: #f5f0e8; font-weight: 600; }

/* ATR */
.sta-atr { font-size: 12px; color: var(--r-muted); margin: 10px 0 4px; }

/* Sparkline */
.sta-chart-wrap {
  background: var(--r-card); border: 1px solid var(--r-border);
  border-radius: var(--r-radius); padding: 16px 20px 10px; margin-bottom: 4px;
}
.sta-chart-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.sta-chart-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--r-muted);
}
.sta-chart-range { display: flex; gap: 4px; }
.sta-range-btn {
  font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 4px;
  background: transparent; border: 1px solid var(--r-border); color: var(--r-muted); transition: all .15s;
}
.sta-range-btn.active,
.sta-range-btn:hover { background: var(--r-text); border-color: var(--r-text); color: #fff; }
.sta-chart-svg-wrap { position: relative; height: 100px; }
#sta-sparkline { width: 100%; height: 100%; overflow: visible; }
.sta-chart-sma-legend { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.sta-sma-dot { width: 8px; height: 2px; border-radius: 1px; display: inline-block; margin-right: 4px; vertical-align: middle; }
.sta-sma-legend-item { font-size: 10px; color: var(--r-muted); display: flex; align-items: center; }

/* Analyst */
.sta-analyst-wrap {
  background: var(--r-card); border: 1px solid var(--r-border);
  border-radius: var(--r-radius); overflow: hidden; margin-bottom: 4px;
}
.sta-analyst-top {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--r-border); border-bottom: 1px solid var(--r-border);
}
.sta-analyst-cell { background: var(--r-card); padding: 16px 20px; }
.sta-analyst-cell-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--r-muted); margin-bottom: 8px;
}
.sta-target-price {
  font-family: 'Cormorant Garamond','Georgia',serif;
  font-size: 28px; font-weight: 700; color: var(--r-text);
}
.sta-target-range { font-size: 12px; color: var(--r-muted); margin-top: 2px; }
.sta-rec-bar-wrap { padding: 14px 20px; }
.sta-rec-bar {
  display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 6px 0 10px; gap: 2px;
}
.sta-rec-seg { border-radius: 2px; }
.sta-rec-seg.sb { background: #1a5f3a; }
.sta-rec-seg.b  { background: var(--r-green); }
.sta-rec-seg.h  { background: var(--r-amber); }
.sta-rec-seg.s  { background: #e05a3a; }
.sta-rec-seg.ss { background: var(--r-red); }
.sta-rec-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.sta-rec-legend-item { font-size: 11px; color: var(--r-muted); display: flex; align-items: center; gap: 5px; }
.sta-rec-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sta-consensus-note { font-size: 12px; color: var(--r-muted); margin-top: 8px; line-height: 1.5; }
.sta-upside {
  display: inline-block; font-size: 13px; font-weight: 600;
  padding: 3px 10px; border-radius: 6px; margin-top: 6px;
}
.sta-upside.pos { background: #e6f4ec; color: var(--r-green); }
.sta-upside.neg { background: #fde8e6; color: var(--r-red); }

/* Earnings */
.sta-earnings-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px;
}
.sta-earnings-card {
  background: var(--r-card); border: 1px solid var(--r-border);
  border-radius: var(--r-radius); padding: 14px 16px; text-align: center;
}
.sta-earnings-card-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--r-muted); margin-bottom: 6px;
}
.sta-earnings-date {
  font-family: 'Cormorant Garamond','Georgia',serif;
  font-size: 17px; font-weight: 600; color: var(--r-text);
}

/* Fundamentals grid */
.sta-fund-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
}
.sta-fund-card {
  background: var(--r-card); border: 1px solid var(--r-border);
  border-radius: var(--r-radius); padding: 14px 16px;
}
.sta-fund-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--r-muted); margin-bottom: 6px;
}
.sta-fund-val {
  font-family: 'IBM Plex Mono','Courier New',monospace;
  font-size: 17px; font-weight: 500; color: var(--r-text);
}
.sta-fund-sub { font-size: 11px; color: var(--r-muted); margin-top: 3px; }

/* Company bio */
.sta-bio {
  background: var(--r-card); border: 1px solid var(--r-border);
  border-radius: var(--r-radius); padding: 16px 20px;
}
.sta-bio p { font-size: 13px; color: var(--r-muted); line-height: 1.7; }

/* Summary */
.sta-summary {
  background: var(--r-card); border: 1px solid var(--r-border);
  border-radius: var(--r-radius); padding: 22px 26px; margin: 22px 0 10px;
}
.sta-summary h3 {
  font-family: 'Cormorant Garamond','Georgia',serif;
  font-size: 18px; font-weight: 700; color: var(--r-text); margin-bottom: 16px;
}
.sta-sblock { margin-bottom: 14px; }
.sta-sblock:last-child { margin-bottom: 0; }
.sta-sblock strong { font-size: 13px; font-weight: 600; color: var(--r-text); display: block; margin-bottom: 4px; }
.sta-sblock p { font-size: 13px; color: var(--r-muted); line-height: 1.7; }

.sta-bottomline {
  background: #1c2b3a; color: #fff; border-radius: var(--r-radius);
  padding: 18px 22px; margin-bottom: 14px;
}
.sta-bottomline strong {
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,.45); display: block; margin-bottom: 7px;
}
.sta-bottomline p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.82); }

.sta-disclaimer {
  font-size: 11px; color: var(--r-muted); font-style: italic;
  text-align: center; padding: 12px; border-top: 1px solid var(--r-border);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .sta-hero-content { padding: 32px 20px 20px; }
  .sta-hero-title   { font-size: 24px; }
  .sta-search-zone  { padding: 16px 16px 0; }
  .sta-cat-pills    { padding: 16px 16px 0; }
  .sta-recent-row   { padding: 12px 16px; }
  .sta-stats        { grid-template-columns: repeat(3,1fr); }
  .sta-stats .sta-stat:nth-child(n+5) { display: none; }
  .sta-analyst-top  { grid-template-columns: 1fr; }
  .sta-fund-grid    { grid-template-columns: repeat(2,1fr); }
  .sta-price        { font-size: 32px; }
}

/* ── Claude AI Analyst Commentary ─────────────────────────────────────────── */
/* ── AI Analyst Commentary -- Atahualpa-hardened ──────────────────────────────
   All rules scoped to #sta-report and use !important to beat Atahualpa's
   global .button { height:24px; padding:0 2px } and other overrides.
   ─────────────────────────────────────────────────────────────────────────── */
#sta-report .sta-ai-section {
    margin: 0 !important;
    border-top: 1px solid #e8e2da !important;
    background: #fafaf8 !important;
    padding: 0 !important;
}
#sta-report .sta-ai-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 24px !important;
    border-bottom: 1px solid #ede8e0 !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin: 0 !important;
    background: transparent !important;
}
#sta-report .sta-ai-title {
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    color: #1e3a5f !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
}
#sta-report .sta-ai-icon {
    color: #b8860b !important;
    font-size: 14px !important;
}
/* Button -- fully hardened against Atahualpa .button { height:24px; padding:0 2px } */
#sta-report .sta-ai-btn {
    background: #1e3a5f !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 10px 20px !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    height: auto !important;
    min-height: 38px !important;
    line-height: 1.4 !important;
    width: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    text-decoration: none !important;
    margin: 0 !important;
}
#sta-report .sta-ai-btn:hover {
    background: #2d5282 !important;
    color: #ffffff !important;
}
#sta-report .sta-ai-btn:disabled {
    opacity: 0.6 !important;
    cursor: wait !important;
}
#sta-report .sta-ai-body {
    padding: 20px 24px !important;
    min-height: 60px !important;
    margin: 0 !important;
}
#sta-report .sta-ai-placeholder {
    font-size: 13px !important;
    color: #8a7f74 !important;
    font-style: italic !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}
#sta-report .sta-ai-loading {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 13px !important;
    color: #5a5450 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#sta-report .sta-ai-spinner {
    width: 16px !important;
    height: 16px !important;
    border: 2px solid #ddd !important;
    border-top-color: #1e3a5f !important;
    border-radius: 50% !important;
    animation: sta-spin 0.7s linear infinite !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
@keyframes sta-spin { to { transform: rotate(360deg); } }
#sta-report .sta-ai-commentary {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}
#sta-report .sta-ai-badge {
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: #b8860b !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}
#sta-report .sta-ai-text {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
    color: #2c2825 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#sta-report .sta-ai-footer {
    font-size: 10px !important;
    color: #a09890 !important;
    font-style: italic !important;
    padding-top: 6px !important;
    border-top: 1px solid #ede8e0 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}
#sta-report .sta-ai-error {
    font-size: 13px !important;
    color: #9b1c2e !important;
    background: #fdf3f4 !important;
    border: 1px solid #f0c4c8 !important;
    padding: 10px 14px !important;
    border-radius: 4px !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}
#sta-report .sta-ai-error a { color: #1e3a5f !important; }
#sta-report .sta-ai-upgrade {
    padding: 16px 24px !important;
    font-size: 13px !important;
    color: #5a5450 !important;
    background: #fffdf5 !important;
    border-top: 1px dashed #d4c9a8 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}
#sta-report .sta-ai-upgrade a { color: #1e3a5f !important; text-decoration: underline !important; }
#sta-report .sta-ai-upgrade strong { color: #2c2825 !important; }
