/* History of Liechtenstein — overrides loaded after core/css/style.css: the
   inline SVG logo, four rulers-tab icons, eleven At a Glance ages in one
   row, the deputies and heads of government in "Who Was in Power", and the
   "Liechtenstein Through Time" map layers (js/liechtenstein-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 — Lords & Counts (castle), Princes (princely hat),
   Landvögte (key), Landesverweser (seal) tab icons; site.php gives those
   tabs icon 'none', so they are drawn here in the tab's text colour.
════════════════════════════════════════ */
.rp-tab[data-tab="counts"]::before,
.rp-tab[data-tab="princes"]::before,
.rp-tab[data-tab="landvogte"]::before,
.rp-tab[data-tab="landesverweser"]::before {
  content:''; flex-shrink:0; width:14px; height:14px;
  background-color:currentColor;
  -webkit-mask:var(--li-tab-icon) center / contain no-repeat;
  mask:var(--li-tab-icon) center / contain no-repeat;
}
.rp-tab[data-tab="counts"] {
  --li-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.2V5.5h2V7h1.5V5.5h3V7H11V5.5h2v8.7zM6.4 14.2v-2.6a1.6 1.6 0 0 1 3.2 0v2.6M1.8 14.2h12.4' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="princes"] {
  --li-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 12.5h10M3.4 12.5L2.6 7.2C4.2 4.4 6 3.4 8 3.4s3.8 1 5.4 3.8l-.8 5.3M8 3.4V1.6M7 2.3h2M5.4 8.4h5.2' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="landvogte"] {
  --li-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='5' cy='8' r='3' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3Cpath d='M8 8h6.2M11.8 8v2.4M13.6 8v1.8' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
}
.rp-tab[data-tab="landesverweser"] {
  --li-tab-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.8 14.2h12.4M1.5 6.2L8 3l6.5 3.2zM3 6.2h10M4 7.5v5M6.7 7.5v5M9.3 7.5v5M12 7.5v5M2.5 12.6h11' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='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)); }
@media (max-width:1100px) {
  .bib-groups { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* ════════════════════════════════════════
   "Who Was in Power" — the prince beside his deputy and the head of
   government (Landvogt, Landesverweser, Regierungschef); 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 — "Liechtenstein Through Time" (js/liechtenstein-map.js), as in the
   prototype data/liechtenstein-map.html: a dark background, the land behind
   the shapes, the country lines, the 11 municipalities and the neighbouring
   Austrian states and Swiss cantons, the principality's outline (from 1719
   on) and the unit 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, eight 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(8, minmax(0, 1fr)); }
.cm-eras button { padding-left:4px; padding-right:4px; }
/* 20 chapters: liechtenstein-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(4, minmax(0, 1fr)); }
}
