/* History of Kosovo — overrides loaded after core/css/style.css: the
   inline SVG logo, ten rulers-tab icons, eleven At a Glance ages in one
   row, the heads of state, heads of government and Party leaders in "Who Was
   in Power", and the "Kosovo Through Time" map layers
   (js/kosovo-map.js), which reuse core's .cm-* map page. */

/* 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 — tab icons for antiquity (temple), the medieval rulers
   (monastery dome), Ottoman Kosovo (crescent), kings (imperial crown),
   occupations (helmet), Yugoslavia (star outline), the autonomous province
   (shield and mountain), UNMIK (globe), presidents (flag) and Party leaders
   (star in a circle); site.php gives those tabs icon 'none', so they are
   drawn here in the tab's text colour.
════════════════════════════════════════ */
.rp-tab[data-tab="antiquity"]::before,
.rp-tab[data-tab="medieval"]::before,
.rp-tab[data-tab="ottoman"]::before,
.rp-tab[data-tab="kings"]::before,
.rp-tab[data-tab="occupation"]::before,
.rp-tab[data-tab="yugoslav"]::before,
.rp-tab[data-tab="province"]::before,
.rp-tab[data-tab="unmik"]::before,
.rp-tab[data-tab="presidents"]::before,
.rp-tab[data-tab="party"]::before {
  content:''; flex-shrink:0; width:14px; height:14px;
  background-color:currentColor;
  -webkit-mask:var(--ko-tab-icon) center / contain no-repeat;
  mask:var(--ko-tab-icon) center / contain no-repeat;
}
.rp-tab[data-tab="antiquity"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 6.4L8 2.4l6 4zM3 14h10M4.6 8v4.6M8 8v4.6M11.4 8v4.6' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="medieval"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 14.5h10M4 14.5V9.4h8v5.1M4.2 9.4C4.2 6.4 6 4.8 8 4.8s3.8 1.6 3.8 4.6M8 4.8V1.5M6.7 2.8h2.6M7 14.5v-2.2a1 1 0 0 1 2 0v2.2' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="ottoman"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10.2 2.2a6 6 0 1 0 3.4 8.6 4.8 4.8 0 0 1-3.4-8.6z' fill='%23000'/%3E%3Cpath d='M11.20 4.70L11.61 5.83L12.82 5.87L11.87 6.62L12.20 7.78L11.20 7.10L10.20 7.78L10.53 6.62L9.58 5.87L10.79 5.83Z' fill='%23000'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="kings"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 13.2h11M3 13.2l-.9-7 3.4 2.8L8 3.8l2.5 5.2 3.4-2.8-.9 7M8 3.8V2.4M2.1 6.2V5M13.9 6.2V5' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="occupation"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 2.5L11.2 11.2M9.3 13.1l3.8-3.8M11.2 11.2l2.6 2.6M13.5 2.5L4.8 11.2M6.7 13.1L2.9 9.3M4.8 11.2l-2.6 2.6' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="yugoslav"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8.00 2.00L9.59 6.42L14.28 6.56L10.57 9.43L11.88 13.94L8.00 11.30L4.12 13.94L5.43 9.43L1.72 6.56L6.41 6.42Z' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="province"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l5.2 1.8v4.4c0 3.1-2.2 5.2-5.2 6.8-3-1.6-5.2-3.7-5.2-6.8V3.3zM4.9 9.9L7.1 6.6l1.4 1.9 1.1-1.3 1.6 2.7' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="unmik"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.8a6.2 6.2 0 1 0 0 12.4A6.2 6.2 0 0 0 8 1.8zM1.9 8h12.2M8 1.8c2.2 1.9 3.2 3.9 3.2 6.2S10.2 12.3 8 14.2C5.8 12.3 4.8 10.3 4.8 8S5.8 3.7 8 1.8z' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="presidents"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 14.6V1.6M3.5 2.4h9.3l-2.2 3.1 2.2 3.1H3.5' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="party"] {
  --ko-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.6a6.4 6.4 0 1 0 0 12.8A6.4 6.4 0 0 0 8 1.6z' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M8.00 4.50L8.88 6.99L11.52 7.06L9.43 8.66L10.17 11.19L8.00 9.70L5.83 11.19L6.57 8.66L4.48 7.06L7.12 6.99Z' fill='%23000'/%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)); }
@media (max-width:1100px) {
  .bib-groups { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* ════════════════════════════════════════
   "Who Was in Power" — the ruler beside co-rulers and the heads of
   government (prime minister, Party leader); 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; }
.em-power-party {
  display:flex; align-items:center; gap:6px;
  font-family:var(--f-ui); font-size:13px; line-height:1.3; color:var(--white-dim);
}
.em-power-party i { width:9px; height:9px; border-radius:50%; flex:none; }

/* ════════════════════════════════════════
   MAP — "Kosovo Through Time" (js/kosovo-map.js), as in the
   prototype data/kosovo-map.html: a dark background, the land behind
   the shapes, Kosovo's 30 municipalities and the 11 neighbouring regions,
   independent Kosovo's outline (from 2008 on) and the municipality names,
   which show once the map is zoomed in.
════════════════════════════════════════ */
.cm-sphere { fill:#0b1420; }
.cm-grat { fill:none; stroke:rgba(201,168,68,0.22); stroke-width:1.1; stroke-dasharray:1 3; vector-effect:non-scaling-stroke; }
.cm-bgland { fill:#16141d; stroke:rgba(201,168,68,0.18); stroke-width:0.6; vector-effect:non-scaling-stroke; pointer-events:none; }
.cm-country { fill:#24212c; stroke:#0a0810; stroke-width:0.6; vector-effect:non-scaling-stroke; }
.cm-coast { fill:none; stroke:rgba(201,168,68,0.45); stroke-width:1; vector-effect:non-scaling-stroke; pointer-events:none; }
.cm-border {
  fill:none; stroke:#f4ecd6; stroke-width:2; vector-effect:non-scaling-stroke;
  pointer-events:none; opacity:0; transition:opacity 0.8s ease;
}
.cm-border.on { opacity:0.9; }
.cm-county-label {
  font-family:var(--f-ui); fill:rgba(255,255,255,0.55); text-anchor:middle; pointer-events:none;
  paint-order:stroke; stroke:rgba(5,3,8,0.6); transition:opacity 0.4s ease;
}
/* Ruling powers: only those on the map in the year shown are listed. */
.cm-lg--trad span { cursor:default; }
#cm-lg-trad span.off { display:none; }

/* A tall map: a taller stage than the world map, ten era buttons. */
.cm-stage { height:calc(100cqw * 8.6 / 16 + 50px); min-height:620px; max-height:max(620px, 88vh); }
.cm-eras { grid-template-columns:repeat(10, minmax(0, 1fr)); }
.cm-eras button { padding-left:4px; padding-right:4px; }
/* 20 chapters: kosovo-map.js marks the year labels that would
   collide (the current one always shows). */
.cm-tick-labels button.thin:not(.cur) { visibility:hidden; }
.cm-tick-labels button:first-child { transform:none; }
.cm-tick-labels button:last-child { transform:translateX(-100%); }
@media (max-width:900px) {
  .cm-stage svg { aspect-ratio:4 / 4.6; }
  .cm-eras { grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
