/* The Magna Bureau — Factbook real world map (v6 light theme)
   BBC palette: white #FFFFFF, ink #161616, BBC red #B80000.
   Overrides the old dark dot-map styles from styles.css; linked after it. */

.map-shell { background: #ffffff; border: 1px solid #e4e4e4; border-radius: 0.6rem;
  padding: clamp(10px, 2.5vw, 20px); }
.map-shell svg { width: 100%; height: auto; background: #ffffff; display: block; }

/* country polygons */
.magna-country { cursor: pointer; transition: fill 0.15s ease, stroke-width 0.15s ease; }
.magna-country:hover { stroke: #161616; stroke-width: 1.6; }
.magna-country.magna-active { stroke: #B80000; stroke-width: 2; }

/* continent legend */
.map-legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  margin-top: 12px; font-size: 0.72rem; color: #5a5a5a; text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 600; }
.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.12); margin-right: 0; }

.map-note { color: #6b6b6b; font-size: 0.85rem; margin-top: 12px; text-align: center; }

/* no-geometry entities (opened via search) */
.mg-nogeom { display: block; margin-top: 6px; font-size: 0.72rem; font-style: italic;
  color: #8a8a8a; letter-spacing: 0.02em; }

/* ---------- Magna Grade badge ---------- */
.magna-grade { background: #ffffff; border: 1px solid #e4e4e4; border-top: 3px solid #B80000;
  border-radius: 0.6rem; padding: 14px 16px; margin: 18px 0; }
.mg-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.mg-label { font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: #161616; }
.mg-badge { display: inline-block; padding: 4px 12px; border-radius: 0.35rem;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.08em; }
.mg-score { font-size: 0.85rem; font-weight: 600; color: #5a5a5a; }

.grade-MAA .mg-badge { background: #d4af37; color: #161616; }
.grade-MAB .mg-badge { background: #c9a227; color: #161616; }
.grade-MBA .mg-badge { background: #b08d2e; color: #161616; }
.grade-MBB .mg-badge { background: #8f7a3a; color: #ffffff; }
.grade-MCB .mg-badge { background: #6e6647; color: #ffffff; }
.grade-MCC .mg-badge { background: #55534a; color: #ffffff; }
.grade-MCD .mg-badge { background: #3d3c38; color: #ffffff; }

.mg-dims { display: grid; gap: 7px; margin-bottom: 10px; }
.mg-dim { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 10px; }
.mg-dim span { font-size: 0.75rem; color: #5a5a5a; }
.mg-dim i { display: block; height: 7px; border-radius: 4px; background: #B80000;
  opacity: 0.85; max-width: 100%; }
.mg-dim b { font-size: 0.78rem; font-variant-numeric: tabular-nums; color: #161616;
  text-align: right; }
.mg-note { font-size: 0.75rem; color: #8a8a8a; }
.mg-note a { color: #B80000; }

/* retired provisional stub — keep for the not-scored message */
.grade-stub { background: #f6f6f6; border: 1px dashed #c9c9c9; border-radius: 0.6rem;
  padding: 12px 14px; font-size: 0.85rem; color: #6b6b6b; margin: 18px 0;
  overflow-wrap: anywhere; }

/* ---------- Model projections ---------- */
.mg-forecast { background: #ffffff; border: 1px solid #e4e4e4; border-radius: 0.6rem;
  padding: 14px 16px; margin: 18px 0; }
.mg-forecast h4 { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: #161616; margin: 0 0 12px; }
.mg-model-tag { display: inline-block; background: #B80000; color: #ffffff;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; padding: 3px 8px;
  border-radius: 0.3rem; vertical-align: 2px; margin-left: 6px; }
.mg-ftable { width: 100%; border-collapse: collapse; margin: 0 0 8px; font-size: 0.85rem; }
.mg-ftable th, .mg-ftable td { text-align: left; padding: 6px 8px;
  border-bottom: 1px solid #ececec; }
.mg-ftable th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: #8a8a8a; font-weight: 700; }
.mg-ftable td:first-child { font-weight: 600; color: #161616; white-space: nowrap; }
.mg-ftable td { font-variant-numeric: tabular-nums; color: #333; }
.mg-band { color: #8a8a8a; font-size: 0.78rem; white-space: nowrap; }
.mg-fnote { font-size: 0.75rem; color: #8a8a8a; margin: 0 0 8px; line-height: 1.5; }
.mg-fdisclaimer { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid #ececec;
  font-style: italic; }

/* profile panel: keep it light and airy on small screens too */
@media (max-width: 640px) {
  .mg-dim { grid-template-columns: 110px 1fr 40px; }
  .mg-forecast, .magna-grade { padding: 12px; }
}
