:root {
  --rule: #e3e3dc;
  --muted: #6b6b64;
  --accent: #7a4a2b;
}
:lang(ka), :lang(ka) * {
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Georgian", "BPG Nino Mtavruli", Roboto, sans-serif;
}
/* Playfair Display's own "&" glyph is a much more ornate, cursive-style character
   than its upright letterforms — a real feature of the typeface, not a bug — which
   reads as broken at heading size. escapeHeading() (website.ts) / escapeHeading()
   (porto-chrome.ts) wrap just that character in this class so it renders in Sintony's
   plain ampersand instead, leaving the rest of the heading in Playfair Display. */
.amp-plain { font-family: Sintony, sans-serif; }

/* One box per topic section — KPIs on top, news rows below (2026-08-29 redesign,
   replacing the old page-of-big-cards layout the section headings used to open onto
   directly). */
.insights-box {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.insights-box h2 { margin-top: 0; }

.insights-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.kpi-tile { background: #ebe7db; border-radius: 8px; padding: 0.85rem 1rem; text-align: center; }
/* min-height, not just this grid's own row-stretch, is what keeps .kpi-value starting
   at the same line across tiles in one row — row-stretch alone equalises each tile's
   outer height, not where the number sits inside it, so a 1-line label next to a
   2-line one would otherwise leave their numbers at different heights. */
.kpi-label { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.35rem; min-height: 2.2em; line-height: 1.1; }
.kpi-period { opacity: 0.75; }
.kpi-value { font-size: 1.4rem; font-weight: 600; margin: 0; }
.kpi-trend { font-size: 0.75em; vertical-align: middle; }
.kpi-trend-up { color: #2C7A3F; }
.kpi-trend-down { color: #C0392B; }
.kpi-trend-flat { color: #C7891F; }

.news-list { display: flex; flex-direction: column; }
.news-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.news-list .news-row:first-child { border-top: none; }
.news-row-spark { flex: none; line-height: 0; }
.news-row-spark svg { display: block; }
.news-row-text { display: flex; flex-direction: column; min-width: 0; }
.news-row-title { font-weight: 600; color: var(--accent); }
.news-row:hover .news-row-title { text-decoration: underline; }
.news-row-date { font-size: 0.8rem; color: var(--muted); }

/* Native <details>/<summary> — no script needed for "show older" to actually work. */
.news-older { margin-top: 0.25rem; }
.news-older summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
  padding-top: 0.6rem;
  list-style: none;
}
.news-older summary::-webkit-details-marker { display: none; }
.news-older summary::before { content: "+ "; }
.news-older[open] summary::before { content: "\2212 "; }

.insights-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0; }
.filter-pill {
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--muted);
}
.filter-pill.active, .filter-pill:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.section-more { font-size: 0.9rem; color: var(--muted); margin: -1rem 0 2rem; }
.tags { color: var(--muted); font-size: 0.85rem; margin-top: 1rem; }
.tags span::before { content: "#"; opacity: 0.5; }
.provenance {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.9rem;
}
.provenance .note { color: var(--muted); margin: 0 0 0.75rem; }
.provenance ul { list-style: none; margin: 0; padding: 0; }
.provenance li { margin-bottom: 0.3rem; }
.provenance code { font-size: 0.85em; color: var(--accent); }
.provenance .src { color: var(--muted); }
.empty { color: var(--muted); padding: 3rem 0; text-align: center; }
[hidden] { display: none !important; }

/* 3 columns, not 2 — the user's own explicit 3x3 grid spec (RATIO_PANELS'
   own doc comment, core/riskProfile.ts): row 1 fiscal/FDI-to-GDP/FDI-CA-
   share, row 2 currency-stability/growth/banking-health (growth centred),
   row 3 the rest. A wider breakpoint than the teaser's own 38rem — three
   full-size (360px) charts need more room than the teaser's compact 220px
   ones — and no intermediate 2-column state: a partial row would break the
   deliberate row grouping, so this goes straight from stacked to 3-wide. */
.rp-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 1.5rem 0; }
@media (min-width: 60rem) { .rp-grid { grid-template-columns: repeat(3, 1fr); } }
.rp-panel { border: 1px solid var(--rule); border-radius: 6px; padding: 1rem; }
.rp-panel h2 { margin: 0 0 0.6rem; }
.rp-metric + .rp-metric { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--rule); }
.rp-metric h3 { margin: 0 0 0.4rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
.rp-chart { width: 100%; }
.rp-chart svg { width: 100%; height: auto; display: block; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin: 0.75rem 0; font-size: 0.85rem; }
.rp-legend > div { display: flex; flex-direction: column; }
.rp-legend dt { display: flex; align-items: center; gap: 0.35rem; color: var(--muted); }
.rp-legend dd { margin: 0.1rem 0 0 1.1rem; font-weight: 600; }
.rp-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; }
.rp-period { font-weight: 400; color: var(--muted); }
.rp-blurb { margin: 0.75rem 0 0; padding-left: 0.75rem; border-left: 3px solid; font-size: 0.95rem; }
.rp-conclusion { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 1.25rem; }

/* The homepage's own compact risk-panel grid (renderRiskProfileTeaser) — same chart
   engine and grading colors as .rp-grid above, smaller and without the blurb text. */
/* Fixed 3 columns (2 rows for the current 6 panels), not auto-fit — the user's own
   explicit layout call. Narrower than ~38rem drops to 1 column first, same mobile-first
   reasoning as .rp-grid's own media query above, rather than cramming 3 tiny charts
   onto a phone screen. */
.rp-teaser-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin: 0.75rem 0; }
@media (min-width: 38rem) { .rp-teaser-grid { grid-template-columns: repeat(3, 1fr); } }
.rp-teaser-panel { border: 1px solid var(--rule); border-left-width: 3px; border-radius: 6px; padding: 0.6rem 0.75rem; }
.rp-teaser-panel h3 { margin: 0 0 0.3rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.02em; }
.rp-teaser-metric + .rp-teaser-metric { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed var(--rule); }
.rp-teaser-metric-label { margin: 0 0 0.2rem; font-size: 0.7rem; color: var(--muted); }
/* Compact version of .rp-legend above — a row of three, not a wrapping flex list,
   since a teaser panel is far narrower than a full article panel. */
.rp-teaser-legend { display: flex; justify-content: space-between; gap: 0.5rem; margin: 0.3rem 0 0; font-size: 0.7rem; }
.rp-teaser-legend dt { display: flex; align-items: center; gap: 0.25rem; color: var(--muted); white-space: nowrap; }
.rp-teaser-legend dd { margin: 0.1rem 0 0 0.85rem; font-weight: 600; }
