/* Compare page in the new navy look, matching the home page (navy.css): quiet panels with no outlines or coloured
   edges, Inter titles, IBM Plex Mono labels, red only for the debt figures of the later era. Loaded last on
   compare.html; every rule is scoped to html:not(.kdc-classic) so the classic look is untouched. The page carries
   data-styled, so site-chrome.js's colour pass leaves it alone. Many elements here carry inline colours and sizes,
   which is why most rules need !important. The chart's own colours are set in the page script (new look only). */

/* Page frame: full width with the header's side padding. */
html:not(.kdc-classic) body.page-compare .page-main { max-width: none; margin: 0; padding: 14px var(--kdc-pad) 20px; color: #d4dde8; }
html:not(.kdc-classic) body.page-compare .page-main a { color: #7cc4ff !important; text-decoration: none; }
html:not(.kdc-classic) body.page-compare .page-main a:hover { text-decoration: underline; }
html:not(.kdc-classic) body.page-compare .page-main strong { color: #f2f5f9; }

/* Heading: mono eyebrow, 28px white title, body-size intro. */
html:not(.kdc-classic) body.page-compare .section-header { text-align: left; margin: 0 0 14px; }
html:not(.kdc-classic) body.page-compare .page-eyebrow { font: 500 11px/1.4 'IBM Plex Mono', monospace !important; letter-spacing: 0.08em; text-transform: uppercase; color: #8fa1b7; margin: 0 0 4px; }
html:not(.kdc-classic) body.page-compare .page-main .page-title { font: 800 28px/1.15 'Inter', sans-serif !important; letter-spacing: -0.02em; color: #f2f5f9; margin: 0 0 6px; }
html:not(.kdc-classic) body.page-compare .section-header p { max-width: 1100px; font-size: 14px; line-height: 1.55; color: #d4dde8; }

/* One panel style for everything: translucent navy, 12px corners, no outline, no coloured top or left edge. */
html:not(.kdc-classic) body.page-compare :is(.fc-era-panel.pre, .fc-era-panel.post, .fc-insight, .fc-chart-wrap) {
  background: rgba(19, 38, 61, 0.65) !important; border: 0 !important; border-radius: 12px !important; box-shadow: none !important; padding: 16px 18px; }
/* Mono labels on every panel (era labels, the insight tag, the chart kicker), whatever colour they had inline. */
html:not(.kdc-classic) body.page-compare :is(.fc-era-label, .fc-insight-tag, .fc-chart-wrap .cmp-kicker) {
  font: 500 11px/1.4 'IBM Plex Mono', monospace !important; letter-spacing: 0.08em !important; text-transform: uppercase; color: #8fa1b7 !important; margin: 0 0 6px !important; }

/* Era comparison: two panels side by side; inside each, the four figures as a 2 x 2 strip with thin dividers. */
html:not(.kdc-classic) body.page-compare .fc-era-grid { grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 14px; }
html:not(.kdc-classic) body.page-compare .fc-vs { display: none; }
html:not(.kdc-classic) body.page-compare .fc-era-panel { display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
html:not(.kdc-classic) body.page-compare :is(.fc-era-label, .fc-era-title, .fc-era-note) { grid-column: 1 / -1; }
html:not(.kdc-classic) body.page-compare .fc-era-title { font: 800 17px/1.3 'Inter', sans-serif !important; color: #f2f5f9; margin: 0 0 10px; }
html:not(.kdc-classic) body.page-compare .fc-stat { margin: 0; padding: 10px 0; border: 0; border-top: 1px solid #243950; }
html:not(.kdc-classic) body.page-compare .fc-stat:nth-child(odd) { padding-right: 14px; border-right: 1px solid #243950; }
html:not(.kdc-classic) body.page-compare .fc-stat:nth-child(even) { padding-left: 14px; }
html:not(.kdc-classic) body.page-compare .fc-stat-val { font: 800 24px/1.15 'Inter', sans-serif !important; letter-spacing: -0.02em; color: #f2f5f9 !important; font-variant-numeric: tabular-nums; }
/* The later era's debt figures carry the accent red, as they did in red before. */
html:not(.kdc-classic) body.page-compare .fc-era-panel.post .fc-stat-val { color: #ef3e4a !important; }
html:not(.kdc-classic) body.page-compare .fc-stat-lbl { font-size: 12.5px; line-height: 1.45; color: #8fa1b7; margin-top: 4px; }
html:not(.kdc-classic) body.page-compare .fc-era-note { font-size: 13.5px; line-height: 1.55; color: #d4dde8; margin: 0; padding: 10px 0 0; border: 0; border-top: 1px solid #243950; }

/* The argument panel. */
html:not(.kdc-classic) body.page-compare .fc-insight { margin: 0 0 14px; }
html:not(.kdc-classic) body.page-compare .fc-insight p { font-size: 14px; line-height: 1.6; color: #d4dde8; max-width: 1180px; }

/* Chart panel: title, small-print description, the chart, a plain legend. */
html:not(.kdc-classic) body.page-compare .fc-chart-wrap { margin: 0 0 14px; }
html:not(.kdc-classic) body.page-compare .fc-chart-wrap .cmp-title { font: 800 16px/1.3 'Inter', sans-serif !important; color: #f2f5f9 !important; margin: 0 0 4px !important; }
html:not(.kdc-classic) body.page-compare .fc-chart-wrap .cmp-desc { font-size: 12px !important; line-height: 1.5 !important; color: #8fa1b7 !important; margin: 0 0 12px !important; max-width: 1180px; }
html:not(.kdc-classic) body.page-compare .fc-chart-legend { gap: 6px 20px; margin-top: 10px; }
html:not(.kdc-classic) body.page-compare .fc-chart-legend span { font-size: 12px; color: #8fa1b7; }
html:not(.kdc-classic) body.page-compare .fc-chart-legend .leg-safe::before { background: rgba(124, 160, 205, 0.55); }
html:not(.kdc-classic) body.page-compare .fc-chart-legend .leg-risk::before { background: rgba(239, 62, 74, 0.4); }
html:not(.kdc-classic) body.page-compare .fc-chart-legend .leg-threshold::before { border-top: 1px dashed #d4dde8; }
/* The word "red" in the legend is true only in the classic look (there the anchor line is red); hidden here. */
html:not(.kdc-classic) body.page-compare .fc-chart-legend .cmp-classic-only { display: none !important; }

/* Presidents table: the site-wide table style. Rows and cells carry inline backgrounds, colours and centring. */
html:not(.kdc-classic) body.page-compare .fc-norm-table .table-scroll { background: rgba(19, 38, 61, 0.65); border: 0; border-radius: 12px; margin: 0; overflow-x: auto; }
html:not(.kdc-classic) body.page-compare .fc-norm-table table { min-width: 0; width: 100%; background: transparent !important; border: 0 !important; border-radius: 0; font-variant-numeric: tabular-nums; }
html:not(.kdc-classic) body.page-compare .fc-norm-table thead tr { background: #182f4a !important; }
html:not(.kdc-classic) body.page-compare .fc-norm-table th { background: #182f4a !important; color: #8fa1b7 !important; font: 500 11px/1.3 'IBM Plex Mono', monospace !important;
  letter-spacing: 0.06em !important; text-transform: uppercase !important; padding: 9px 12px !important; text-align: right !important; border: 0 !important; white-space: nowrap; }
html:not(.kdc-classic) body.page-compare .fc-norm-table tbody tr { background: transparent !important; border: 0 !important; }
html:not(.kdc-classic) body.page-compare .fc-norm-table td { background: transparent !important; color: #d4dde8 !important; font-size: 13.5px !important; font-weight: 500 !important; line-height: 1.35;
  padding: 9px 12px !important; text-align: right !important; border: 0 !important; border-bottom: 1px solid #243950 !important; vertical-align: middle; }
html:not(.kdc-classic) body.page-compare .fc-norm-table tbody tr:last-child td { border-bottom: 0 !important; }
html:not(.kdc-classic) body.page-compare .fc-norm-table tbody tr:hover td { background: rgba(124, 196, 255, 0.06) !important; }
/* First column (president and term) and last column (verdict) are words, so left-aligned. */
html:not(.kdc-classic) body.page-compare .fc-norm-table :is(th, td):is(:first-child, :last-child) { text-align: left !important; }
html:not(.kdc-classic) body.page-compare .fc-norm-table td:first-child { color: #f2f5f9 !important; font-weight: 700 !important; white-space: nowrap; }
html:not(.kdc-classic) body.page-compare .fc-norm-table td:first-child span { font: 500 11px/1.4 'IBM Plex Mono', monospace !important; color: #8fa1b7 !important; letter-spacing: 0.04em; }
/* Figures: plain text in the body colour (no coloured pills); the rising-debt figures (red before) stay red. */
html:not(.kdc-classic) body.page-compare .fc-norm-table td span:not(:first-child) { font-size: 13.5px !important; font-weight: 600 !important; }
html:not(.kdc-classic) body.page-compare .fc-norm-table :is(.fc-tag-safe, .fc-tag-high, .fc-tag-crit) { background: none !important; padding: 0 !important; border-radius: 0; font-size: 13.5px !important; font-weight: 600; color: #d4dde8 !important; white-space: nowrap; }
html:not(.kdc-classic) body.page-compare .fc-norm-table td span[style*="#006600"], html:not(.kdc-classic) body.page-compare .fc-norm-table td span[style*="#cc6600"] { color: #d4dde8 !important; }
html:not(.kdc-classic) body.page-compare .fc-norm-table td:not(:last-child) .fc-tag-crit, html:not(.kdc-classic) body.page-compare .fc-norm-table td span[style*="#cc0000"] { color: #ef3e4a !important; }
html:not(.kdc-classic) body.page-compare .fc-norm-table td:last-child span { font-weight: 500 !important; }
/* Notes and sources under the table. */
html:not(.kdc-classic) body.page-compare .fc-norm-table .cmp-note { font-size: 12px !important; line-height: 1.55 !important; color: #8fa1b7 !important; margin-top: 10px !important; }

/* Phones: one column; the table keeps a readable width and scrolls sideways inside its panel. */
@media (max-width: 900px) {
  html:not(.kdc-classic) body.page-compare .fc-era-grid { grid-template-columns: 1fr; }
  html:not(.kdc-classic) body.page-compare .fc-norm-table table { min-width: 720px; }
}
@media (max-width: 600px) {
  html:not(.kdc-classic) body.page-compare .page-main { padding: 14px 16px 18px; }
  html:not(.kdc-classic) body.page-compare .page-main .page-title { font-size: 26px !important; }
  html:not(.kdc-classic) body.page-compare .section-header p, html:not(.kdc-classic) body.page-compare .fc-insight p, html:not(.kdc-classic) body.page-compare .fc-era-note { font-size: 13.5px; }
  html:not(.kdc-classic) body.page-compare :is(.fc-era-panel.pre, .fc-era-panel.post, .fc-insight, .fc-chart-wrap) { padding: 14px; }
  html:not(.kdc-classic) body.page-compare .fc-stat-val { font-size: 20px !important; }
  html:not(.kdc-classic) body.page-compare .fc-stat:nth-child(odd) { padding-right: 10px; }
  html:not(.kdc-classic) body.page-compare .fc-stat:nth-child(even) { padding-left: 10px; }
  html:not(.kdc-classic) body.page-compare .fc-chart-wrap .cmp-plot { height: 220px !important; }
}
