/* ============================================================================
   BLAZINGSTAR BLOG - CONSOLIDATED INJECTION CSS
   ============================================================================
   Single source of truth for bill text, report text, and table styling.
   Include via: <link rel="stylesheet" href="https://liatris.blazingstaranalytics.com/static/css/injection.css">
   ============================================================================ */

/* ============================================================================
   CSS CUSTOM PROPERTIES
   ============================================================================ */
:root {
  /* Font stacks */
  --font-body: century_supra_b, Georgia, serif;
  --font-caps: century_supra_b_tab_caps, century_supra_b, Georgia, serif;
  --font-table: concourse_2, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-diagram: concourse_4, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Bill text styling (purple theme) */
  --bill-bg: #fdfcfe;
  --bill-border: #69539E;

  /* Report text styling (green theme) */
  --report-bg: #f8fdf8;
  --report-border: #4a7c59;
  --report-dots: #666;

  /* Highlight colors */
  --hl-gold: #fff3cd;
  --hl-blue: #cce5ff;
  --hl-purple: #e8e0f0;
  --hl-pink: #f8d7da;
  --hl-coral: #ffddd2;
}

/* ============================================================================
   FONT DECLARATIONS - CENTURY SUPRA
   ============================================================================ */
@font-face {
  font-family: century_supra_b;
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/century_supra/century_supra_b_regular.woff2') format('woff2');
}

@font-face {
  font-family: century_supra_b;
  font-style: italic;
  font-weight: normal;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/century_supra/century_supra_b_italic.woff2') format('woff2');
}

@font-face {
  font-family: century_supra_b;
  font-style: normal;
  font-weight: bold;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/century_supra/century_supra_b_bold.woff2') format('woff2');
}

@font-face {
  font-family: century_supra_b;
  font-style: italic;
  font-weight: bold;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/century_supra/century_supra_b_bold_italic.woff2') format('woff2');
}

@font-face {
  font-family: century_supra_b_tab_caps;
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/century_supra/century_supra_b_tab_caps_regular.woff2') format('woff2');
}

@font-face {
  font-family: century_supra_b_tab_caps;
  font-style: normal;
  font-weight: bold;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/century_supra/century_supra_b_tab_caps_bold.woff2') format('woff2');
}

/* ============================================================================
   FONT DECLARATIONS - CONCOURSE 2 (for data tables)
   ============================================================================ */
@font-face {
  font-family: concourse_2;
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/concourse/concourse_2_regular.woff2') format('woff2');
}

@font-face {
  font-family: concourse_2;
  font-style: italic;
  font-weight: normal;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/concourse/concourse_2_italic.woff2') format('woff2');
}

@font-face {
  font-family: concourse_2;
  font-style: normal;
  font-weight: bold;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/concourse/concourse_2_bold.woff2') format('woff2');
}

@font-face {
  font-family: concourse_2;
  font-style: italic;
  font-weight: bold;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/concourse/concourse_2_bold_italic.woff2') format('woff2');
}

/* ============================================================================
   FONT DECLARATIONS - CONCOURSE 4 (heavier weight for diagrams)
   ============================================================================ */
@font-face {
  font-family: concourse_4;
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/concourse/concourse_4_tab_regular.woff2') format('woff2');
}

@font-face {
  font-family: concourse_4;
  font-style: italic;
  font-weight: normal;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/concourse/concourse_4_tab_italic.woff2') format('woff2');
}

@font-face {
  font-family: concourse_4;
  font-style: normal;
  font-weight: bold;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/concourse/concourse_4_tab_bold.woff2') format('woff2');
}

@font-face {
  font-family: concourse_4;
  font-style: italic;
  font-weight: bold;
  font-display: swap;
  src: url('https://liatris.blazingstaranalytics.com/static/fonts/concourse/concourse_4_tab_bold_italic.woff2') format('woff2');
}

/* ============================================================================
   BILL TEXT - BASE CONTAINER (purple theme)
   ============================================================================ */
.bill-text {
  font-family: var(--font-body);
  font-size: 1em;
  line-height: 1.6;
  background: var(--bill-bg);
  border-left: 3px solid var(--bill-border);
  padding: 1em 1.25em;
  margin: 1.5em 0;
  text-indent: 2em;
}

/* ============================================================================
   BILL TEXT - HEADINGS
   ============================================================================ */
.bill-text .heading {
  font-family: var(--font-caps);
  display: block;
  margin-bottom: 0.5em;
  text-align: center;
  text-indent: 0;
}

.bill-text .heading-bold {
  font-family: var(--font-caps);
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  text-align: center;
  text-indent: 0;
}

.bill-text .heading-bold-allcaps {
  font-family: var(--font-caps);
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  text-align: center;
  text-transform: uppercase;
  text-indent: 0;
}

.bill-text .heading-bold-left {
  font-family: var(--font-caps);
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  text-align: left;
  text-indent: 0;
}

.bill-text .smcaps {
  font-family: var(--font-caps);
}

/* ============================================================================
   BILL TEXT - INDENTATION
   ============================================================================ */
/* Single indent - for Provided further continuations */
.bill-text .indent {
  display: block;
  margin-left: 1.5em;
  text-indent: 0;
}

/* Double indent - for numbered paragraphs (1), (2), etc. */
.bill-text .indent-2 {
  display: block;
  margin-left: 3em;
  text-indent: 2em;
}

/* Subsection style - first-line indent, wrap to margin */
.bill-text .subsection {
  text-indent: 1.5em;
  margin-left: 0;
  padding-left: 0;
  display: block;
  margin-bottom: 0.75em;
}

/* Nested subsection - deeper indent for (i), (ii), (iii) */
.bill-text .subsection-nested {
  text-indent: 2.5em;
  margin-left: 0;
  padding-left: 0;
  display: block;
  margin-bottom: 0.5em;
}

/* ============================================================================
   BILL TEXT - HIGHLIGHTS
   ============================================================================ */
.bill-text .hl-gold   { background: var(--hl-gold); }
.bill-text .hl-blue   { background: var(--hl-blue); }
.bill-text .hl-purple { background: var(--hl-purple); }
.bill-text .hl-pink   { background: var(--hl-pink); }
.bill-text .hl-coral  { background: var(--hl-coral); }

/* ============================================================================
   BILL TEXT - INLINE VARIANTS
   ============================================================================ */
.bill-text-inline {
  font-family: var(--font-body);
  font-size: 0.9em;
  line-height: 1.6;
  margin: 1.5em 0;
}

.bill-text-inline-caps {
  font-family: var(--font-caps);
  font-size: 0.9em;
  line-height: 1.6;
  margin: 1.5em 0;
}

.bill-text-inline-header {
  font-family: var(--font-caps);
  font-size: 0.9em;
  line-height: 1.6;
  margin: 1.5em 0;
  text-align: center;
}

/* ============================================================================
   REPORT TEXT - BASE CONTAINER (green theme)
   ============================================================================ */
.report-text {
  font-family: var(--font-body);
  font-size: 1em;
  line-height: 1.6;
  background: var(--report-bg);
  border-left: 3px solid var(--report-border);
  padding: 1em 1.25em;
  margin: 1.5em 0;
}

/* ============================================================================
   REPORT TEXT - HEADINGS
   ============================================================================ */
.report-text .heading,
.report-text .heading-bold,
.report-text .heading-bold-allcaps,
.report-text .heading-bold-left,
.report-text .section-header,
.report-text .smcaps {
  font-family: var(--font-caps);
}

.report-text .heading {
  display: block;
  margin-bottom: 0.5em;
  text-align: center;
}

.report-text .heading-bold {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  text-align: center;
}

.report-text .heading-bold-allcaps {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  text-align: center;
  text-transform: uppercase;
}

.report-text .heading-bold-left {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  text-align: left;
}

.report-text .section-header {
  display: block;
  text-align: center;
  font-weight: normal;
  letter-spacing: 0.05em;
  margin: 1.5em 0 1em 0;
}

/* ============================================================================
   REPORT TEXT - INDENTATION
   ============================================================================ */
.report-text .indent {
  display: block;
  margin-left: 1.5em;
  text-indent: 0;
}

.report-text .indent-2 {
  display: block;
  margin-left: 3em;
  text-indent: 0;
}

/* ============================================================================
   REPORT TEXT - PARAGRAPHS
   ============================================================================ */
.report-text .report-para {
  text-indent: 1.5em;
  margin-bottom: 0.75em;
}

.report-text .report-para-first {
  text-indent: 0;
  margin-bottom: 0.75em;
}

.report-text .topic {
  font-style: italic;
}

/* ============================================================================
   REPORT TEXT - HIGHLIGHTS
   ============================================================================ */
.report-text .hl-gold   { background: var(--hl-gold); }
.report-text .hl-blue   { background: var(--hl-blue); }
.report-text .hl-purple { background: var(--hl-purple); }
.report-text .hl-pink   { background: var(--hl-pink); }
.report-text .hl-coral  { background: var(--hl-coral); }

/* ============================================================================
   REPORT TEXT - FUNDING TABLE (dot leaders)
   ============================================================================ */
.report-text .funding-table {
  width: 100%;
  font-size: 0.8em;
  line-height: 1;
  margin: 1em 0 1.5em 0;
  border-collapse: collapse;
}

.report-text .funding-table td {
  padding: 0.1em 0;
  vertical-align: bottom;
}

.report-text .funding-table .label {
  white-space: nowrap;
}

.report-text .funding-table .dots {
  width: 100%;
  border-bottom: 1px dotted var(--report-dots);
}

.report-text .funding-table .amount {
  text-align: right;
  padding-left: 1em;
  white-space: nowrap;
}

.report-text .funding-table .indent-row td:first-child {
  padding-left: 1.5em;
}

/* ============================================================================
   REPORT TEXT - DATA TABLE (Concourse - for back matter)
   ============================================================================ */
.report-text .report-table {
  font-family: var(--font-table);
  width: 100%;
  font-size: 0.85em;
  line-height: 1.4;
  margin: 1em 0 1.5em 0;
  border-collapse: collapse;
}

.report-text .report-table th {
  font-weight: normal;
  font-size: 0.85em;
  text-align: left;
  padding: 0.5em 0.75em;
  border-bottom: 1px solid #999;
  vertical-align: bottom;
  white-space: nowrap;
}

.report-text .report-table th.num {
  text-align: right;
}

.report-text .report-table td {
  padding: 0.3em 0.75em;
  vertical-align: top;
}

.report-text .report-table td.num {
  text-align: right;
  white-space: nowrap;
}

.report-text .report-table .title-row {
  font-weight: bold;
}

.report-text .report-table .title-row td {
  padding-top: 1em;
}

.report-text .report-table .account-row td:first-child {
  padding-left: 1.5em;
}

/* ============================================================================
   REPORT TEXT - INLINE VARIANTS
   ============================================================================ */
.report-text-inline {
  font-family: var(--font-body);
  font-size: 0.9em;
  line-height: 1.6;
  margin: 1.5em 0;
}

.report-text-inline-caps,
.report-text-inline-header {
  font-family: var(--font-caps);
  font-size: 0.9em;
  line-height: 1.6;
  margin: 1.5em 0;
}

.report-text-inline-header {
  text-align: center;
}

/* ============================================================================
   FUNDING TREE DIAGRAMS
   Visual representation of appropriation account structure
   Uses Concourse 4 (heavier weight) for clarity in dense diagrams

   Color palette (colorblind-safe, consistent with highlights):
   - Gold (#fff3cd): Dollar amounts
   - Coral (#ffddd2): 1-year availability (urgency)
   - Blue (#cce5ff): Multi-year availability (intermediate)
   - Purple (#e8e0f0): No-year availability (stable)
   ============================================================================ */

.funding-tree {
  font-family: var(--font-diagram);
  font-size: 1.25rem;
  line-height: 1.8;
  background: #f8f9fa;
  border-left: 4px solid var(--bill-border);
  padding: 1.25rem 1.5rem;
  margin: 1.5em 0;
  overflow-x: auto;
}

/* Account header line */
.funding-tree .ft-account {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

/* Individual tree nodes */
.funding-tree .ft-node {
  display: block;
  padding: 0.25rem 0;
}

/* Tree branch characters (│├└) */
.funding-tree .ft-branch {
  color: var(--bill-border);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  white-space: pre;
}

/* Dollar amounts - GOLD */
.funding-tree .ft-amount {
  font-weight: 600;
  color: #7a5d00;
  background: var(--hl-gold);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

/* Availability tags - base styling */
.funding-tree .ft-avail {
  font-size: 0.9em;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.3rem;
}

/* 1-year availability - CORAL (urgency, expires soon) */
.funding-tree .ft-avail-1y {
  background: var(--hl-coral);
  color: #8b3a2f;
}

/* 2-year / multi-year availability - BLUE (intermediate) */
.funding-tree .ft-avail-my {
  background: var(--hl-blue);
  color: #004085;
}

/* No-year availability - PURPLE (stable, no pressure) */
.funding-tree .ft-avail-ny {
  background: var(--hl-purple);
  color: #4a3872;
}

/* Purpose description */
.funding-tree .ft-purpose {
  color: #333;
}

/* Arrow separator */
.funding-tree .ft-arrow {
  color: var(--bill-border);
  margin: 0 0.25rem;
}

/* Constraint indicators */
.funding-tree .ft-floor {
  color: #155724;
  font-weight: 500;
}

.funding-tree .ft-ceiling {
  color: #721c24;
  font-weight: 500;
}

.funding-tree .ft-exact {
  color: #004085;
  font-weight: 500;
}

/* Numbered paragraph markers */
.funding-tree .ft-para {
  color: var(--bill-border);
  font-weight: 600;
}

/* Proviso notes section */
.funding-tree .ft-proviso {
  font-style: italic;
  color: #666;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #ccc;
}

/* Sub-constraint notation (e.g., max $200K/clinic) */
.funding-tree .ft-sub {
  font-size: 0.88em;
  color: #666;
  background: #f0f0f0;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-left: 0.3rem;
}

/* Inherited availability indicator */
.funding-tree .ft-inherited {
  font-size: 0.85em;
  color: #888;
  font-style: italic;
}

/* Legend for funding trees (optional, for explainer posts) */
.funding-tree-legend {
  font-family: var(--font-diagram);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem 0;
  padding: 0.5rem;
  background: #fafafa;
  border-radius: 4px;
}

.funding-tree-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.funding-tree-legend .swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.funding-tree-legend .swatch-gold { background: var(--hl-gold); }
.funding-tree-legend .swatch-coral { background: var(--hl-coral); }
.funding-tree-legend .swatch-blue { background: var(--hl-blue); }
.funding-tree-legend .swatch-purple { background: var(--hl-purple); }
