/* ============================================
   terancejiang.com — Report Component Styles

   Scoped under .report-body to avoid conflicts
   with the site-level style.css
   ============================================ */

/* --- Report Variables (override site defaults inside reports) --- */
.report-body {
  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

/* === Header === */
.report-body .header {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 24px;
  margin-bottom: 40px;
}
.report-body .header .ticker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.report-body .header h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 6px 0 4px;
  letter-spacing: -0.5px;
}
.report-body .header .date {
  font-size: 13px;
  color: var(--text3);
}

/* === Verdict === */
.report-body .verdict {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--bg2);
  border-radius: 8px;
  border-left: 4px solid var(--green);
}
.report-body .verdict.v-green { border-left-color: var(--green); }
.report-body .verdict.v-amber { border-left-color: var(--amber); }
.report-body .verdict.v-red   { border-left-color: var(--red); }
.report-body .verdict-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  font-weight: 500;
}
.report-body .verdict-text {
  font-size: 15px;
  font-weight: 500;
}

/* === Headings === */
.report-body h2 {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text3);
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.report-body h2:first-of-type { margin-top: 0; }
.report-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 10px;
}
.report-body h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  margin: 16px 0 8px;
}

/* === Text === */
.report-body p { margin-bottom: 14px; color: var(--text2); }
.report-body p strong { color: var(--text); font-weight: 500; }
.report-body ul, .report-body ol { margin: 8px 0 14px 20px; color: var(--text2); }
.report-body li { margin: 4px 0; }
.report-body blockquote {
  border-left: 3px solid var(--border);
  padding: 8px 16px;
  margin: 14px 0;
  color: var(--text3);
  font-style: italic;
  font-size: 14px;
}

/* === Metric Cards === */
.report-body .grid { display: grid; gap: 10px; margin: 16px 0; }
.report-body .g2 { grid-template-columns: 1fr 1fr; }
.report-body .g3 { grid-template-columns: 1fr 1fr 1fr; }
.report-body .g4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
@media (max-width: 600px) {
  .report-body .g4 { grid-template-columns: 1fr 1fr; }
  .report-body .g3 { grid-template-columns: 1fr 1fr; }
}
.report-body .metric {
  background: var(--bg2);
  border-radius: 8px;
  padding: 14px 16px;
}
.report-body .metric .label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.report-body .metric .value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
}
.report-body .metric .sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
}
.report-body .metric.highlight { background: var(--green-bg); border: 1px solid rgba(26,122,90,0.15); }
.report-body .metric.highlight .value { color: var(--green); }
.report-body .metric.warn { background: var(--red-bg); border: 1px solid rgba(192,57,43,0.15); }
.report-body .metric.warn .value { color: var(--red); }
.report-body .metric.amber-hl { background: var(--amber-bg); border: 1px solid rgba(160,108,26,0.15); }
.report-body .metric.amber-hl .value { color: var(--amber); }

/* === Tables === */
.report-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}
.report-body th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 400;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.report-body th:not(:first-child) { text-align: right; }
.report-body td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.report-body td:not(:first-child) { text-align: right; font-family: var(--mono); font-size: 13px; }
.report-body tr:last-child td { border-bottom: none; }
.report-body .pos { color: var(--green); }
.report-body .neg { color: var(--red); }
.report-body .row-bold td { font-weight: 500; color: var(--text); }

/* === Tags === */
.report-body .tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.report-body .tag-green  { background: var(--green-bg);  color: var(--green); }
.report-body .tag-red    { background: var(--red-bg);    color: var(--red); }
.report-body .tag-amber  { background: var(--amber-bg);  color: var(--amber); }
.report-body .tag-blue   { background: var(--blue-bg);   color: var(--blue); }
.report-body .tag-purple { background: var(--purple-bg); color: var(--purple); }

/* Badge variants used in h2 dimension headings */
.report-body .badge-strong       { background: var(--green-bg);  color: var(--green); }
.report-body .badge-fairly-strong { background: var(--green-bg);  color: var(--green); }
.report-body .badge-medium       { background: var(--amber-bg);  color: var(--amber); }
.report-body .badge-weak         { background: var(--red-bg);    color: var(--red); }

/* === Signals === */
.report-body .signal {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}
.report-body .signal .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.report-body .dot-red   { background: var(--red); }
.report-body .dot-amber { background: var(--amber); }
.report-body .dot-green { background: var(--green); }

/* === Bars === */
.report-body .bar-section { margin: 16px 0; }
.report-body .bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}
.report-body .bar-label {
  width: 160px;
  color: var(--text3);
  flex-shrink: 0;
  font-size: 12px;
}
.report-body .bar-wrap {
  flex: 1;
  height: 20px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
}
.report-body .bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}
.report-body .bar-val {
  width: 55px;
  text-align: right;
  font-family: var(--mono);
  font-weight: 500;
  flex-shrink: 0;
  font-size: 13px;
}

/* === Callout === */
.report-body .callout {
  padding: 16px 20px;
  background: var(--bg2);
  border-radius: 8px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
}

/* === Section Panel === */
.report-body .section-panel {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--bg2);
  border-radius: 8px;
}

/* === Collapsible === */
.report-body details { margin: 16px 0; }
.report-body summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.report-body summary:hover { color: var(--text2); }
.report-body details .details-content {
  padding: 16px 0;
  font-size: 14px;
  color: var(--text2);
}

/* === Report Footer === */
.report-body .footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text3);
  line-height: 1.8;
}

/* === Print === */
@media print {
  .report-body { padding: 24px; font-size: 12px; max-width: 100%; }
  .report-body .header { margin-bottom: 20px; }
  .report-body h2 { margin-top: 28px; }
  .report-body .metric .value { font-size: 16px; }
  .report-body .verdict, .report-body .callout, .report-body .section-panel { break-inside: avoid; }
}
@page { size: A4; margin: 15mm; }
