/* History of Romania — overrides loaded after core/css/style.css: the
   inline SVG logo, the prime-ministers tab icon, eleven At a Glance ages in
   one row, the president, prime-minister, co-ruler and concurrent-ruler
   cards in "Who Was in Power", and the map's live legend. The map itself
   uses core's .cm-* styles (js/romania-map.js is the christianity map
   engine). */

/* Inline SVG logo (partials/logo.php, site.php logo_partial) — sized like
   the image logo of the other sites. */
#app-logo.app-logo-svg { height:auto; overflow:visible; }

/* ════════════════════════════════════════
   Rulers page — the Prime Ministers tab (briefcase) icon; site.php gives
   that tab icon 'none', so it is drawn here in the tab's text colour.
════════════════════════════════════════ */
.rp-tab[data-tab="cabinet"]::before {
  content:''; flex-shrink:0; width:14px; height:14px;
  background-color:currentColor;
  -webkit-mask:var(--br-tab-icon) center / contain no-repeat;
  mask:var(--br-tab-icon) center / contain no-repeat;
}
.rp-tab[data-tab="cabinet"] {
  --br-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.8' y='5' width='12.4' height='8.6' rx='1.3' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3Cpath d='M5.8 5V3.6a1 1 0 0 1 1-1h2.4a1 1 0 0 1 1 1V5M1.8 8.8h12.4M7 8.8v1.4h2V8.8' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ════════════════════════════════════════
   At a Glance — eleven ages: one column per age, all in a single row (core
   lays out eight); bibliography in four columns.
════════════════════════════════════════ */
@media (min-width:901px) {
  .ag-era-list { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); }
}
.bib-groups { grid-template-columns:repeat(4, minmax(0, 1fr)); }

/* ════════════════════════════════════════
   "Who Was in Power" — the ruler (Dacian king, emperor, voivode, prince, king, party leader or president)
   beside the president (from 1980), the prime minister (1907–1989), the
   co-rulers, rival claimants and the other dynasties ruling at the same
   time: the event's `primeMinister` card(s); the columns stack once each
   would drop below ~200px.
════════════════════════════════════════ */
.em-power {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap:12px 20px;
  align-items:start;
}
.em-power > .em-power-heading { grid-column:1 / -1; margin-bottom:1px; }
a.em-power-card--pm { color:inherit; text-decoration:none; }

/* ════════════════════════════════════════
   MAP — "Romania Through Time": the legend lists only the powers shown in
   the year on screen (js/romania-map.js sets .is-off).
════════════════════════════════════════ */
.cm-lg span.is-off { display:none; }

/* Many chapters (44): label every other tick of the story slider. */
.cm-tick-labels button:nth-child(even):not(.cur) {display:none;}
