/* Country cards, 2026-11-28 (owner's request). One engine, seven independent switches per storefront (site_chrome
   CARD_STYLE -> html classes). Flags are local SVG files (/static/flags/xx.svg, MIT flag-icons), never emoji.
     cm-  what marks the country: flag | code | both (flag above the two letters)
     cl-  card layout: row rev left center banner list split
     fs-  flag shape: round square rect ring pill        fz-  size: s m l
     cd-  card decoration: flat shadow fill top left dash under
     bd-  stock badge: pill tag text outline bar         dp-  dial code: under inline top
   The country name and the stock figure are always shown, never clipped to one line or hidden. */
html.cx{--fh:34px}
html.cx.fz-s{--fh:26px}html.cx.fz-l{--fh:46px}
html.cx .grp .grid{display:grid!important;gap:12px!important}
html.cx .cty{display:grid!important;position:relative;box-sizing:border-box;min-width:0;text-align:start;align-items:center;justify-items:stretch;
  gap:6px 12px!important;padding:14px!important;flex-direction:initial!important;overflow:hidden;border-radius:var(--r,12px)!important;
  background:var(--surface)!important;border:1px solid var(--line)!important;box-shadow:none!important;transform:none!important;
  grid-template-areas:"fl meta" "fl stk";grid-template-columns:auto minmax(0,1fr)}
html.cx .cty:hover{border-color:var(--gold)!important}
html.cx .cty.dim{opacity:.62}
html.cx .cty.avail{outline:1.5px solid color-mix(in srgb,var(--gold) 55%,transparent);outline-offset:-1px}
html.cx .cty .fc{grid-area:fl;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0}
html.cx .cty .meta{grid-area:meta;min-width:0;display:flex;flex-direction:column;gap:2px;flex:none}
html.cx .cty .n{display:block!important;white-space:normal!important;overflow:visible!important;-webkit-line-clamp:unset!important;line-height:1.3;
  overflow-wrap:anywhere;font-weight:650;font-size:15px}
html.cx .cty .en{display:block;font-size:12px;color:var(--text-2);white-space:normal;margin:0;line-height:1.25}
html.cx .cty .d{font-size:12px;color:var(--text-3);font-family:var(--mono);white-space:nowrap;margin:0}
html.cx .cty .stk{grid-area:stk;justify-self:start;white-space:nowrap}
html.cx .tag-live{white-space:nowrap}
/* flags */
html.cx .cty .fl,html.cx .fcard .fl{display:flex!important}
html.cx .fl{display:flex;line-height:0;font-size:0;filter:none!important;width:auto;height:auto;background:none!important;border-radius:0!important}
html.cx .fl img.flag{display:block;height:var(--fh);width:calc(var(--fh)*1.333);object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.14);background:#fff}
html.cx.fs-round .fl img.flag{width:var(--fh);border-radius:50%}
html.cx.fs-square .fl img.flag{width:var(--fh);border-radius:9px}
html.cx.fs-rect .fl img.flag{border-radius:3px}
html.cx.fs-ring .fl img.flag{width:var(--fh);border-radius:50%;box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--gold);margin:4px}
html.cx.fs-pill .fl img.flag{width:calc(var(--fh)*1.7);height:calc(var(--fh)*.95);border-radius:99px}
/* code: under the flag (both) or on its own (code) */
html.cx .cc{display:block;font-family:var(--mono);font-weight:700;font-size:11px;letter-spacing:.1em;line-height:1;color:var(--text-2);background:none!important;border:0!important;padding:0!important;width:auto!important;text-align:center;border-radius:0}
html.cx .cc::before,html.cx .cc::after{content:none!important}
html.cx .cty .cc,html.cx .fcard .cc{display:block!important}
html.cx.cm-flag .cc{display:none!important}
html.cx.cm-code .fl{display:none!important}
html.cx.cm-code .cty .cc,html.cx.cm-code .fcard .cc{display:grid!important;place-items:center;min-width:calc(var(--fh)*1.35);height:calc(var(--fh)*1.05);padding:0 8px!important;font-size:calc(var(--fh)*.42);
  background:color-mix(in srgb,var(--gold) 15%,transparent)!important;color:var(--gold)!important;border-radius:8px}
html.cx.cm-code.fs-round .cc,html.cx.cm-code.fs-ring .cc{border-radius:50%;width:calc(var(--fh)*1.25)!important;min-width:0;height:calc(var(--fh)*1.25);padding:0!important}
html.cx.cm-code.fs-ring .cc{background:transparent!important;border:2px solid var(--gold)!important}
html.cx.cm-code.fs-rect .cc{border-radius:2px;background:transparent!important;border:1.5px solid var(--gold)!important}
html.cx.cm-code.fs-pill .cc{border-radius:99px;background:var(--gold)!important;color:var(--gold-ink)!important}
html.cx.cm-code.fs-square .cc{border-radius:10px}
/* layouts */
html.cx.cl-row .grp .grid{grid-template-columns:repeat(auto-fill,minmax(270px,1fr))!important}
html.cx.cl-rev .grp .grid{grid-template-columns:repeat(auto-fill,minmax(270px,1fr))!important}
html.cx.cl-rev .cty{grid-template-areas:"meta fl" "stk fl";grid-template-columns:minmax(0,1fr) auto}
html.cx.cl-left .grp .grid{grid-template-columns:repeat(auto-fill,minmax(188px,1fr))!important}
html.cx.cl-left .cty{grid-template-areas:"fl" "meta" "stk";grid-template-columns:minmax(0,1fr);gap:8px!important}
html.cx.cl-left .cty .fc{align-items:flex-start;flex-direction:row;gap:10px}
html.cx.cl-center .grp .grid{grid-template-columns:repeat(auto-fill,minmax(176px,1fr))!important}
html.cx.cl-center .cty{grid-template-areas:"fl" "meta" "stk";grid-template-columns:minmax(0,1fr);text-align:center;justify-items:center;gap:8px!important;padding:18px 12px!important}
html.cx.cl-center .cty .meta{align-items:center}html.cx.cl-center .cty .stk{justify-self:center}
html.cx.cl-banner .grp .grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))!important}
html.cx.cl-banner .cty{grid-template-areas:"fl" "meta" "stk";grid-template-columns:minmax(0,1fr);padding:0 0 12px!important;gap:8px!important}
html.cx.cl-banner .cty .fc{flex-direction:column;align-items:stretch;gap:0}
html.cx.cl-banner .cty .fl{width:100%!important;height:68px;justify-content:center;align-items:center;background:color-mix(in srgb,var(--gold) 9%,var(--surface-2))!important;border-bottom:1px solid var(--line)}
html.cx.cl-banner .cty .fl img.flag{height:46px;width:auto!important;max-width:86%;object-fit:contain;border-radius:3px;box-shadow:0 2px 8px rgba(0,0,0,.25)}
html.cx.cl-banner.fz-s .cty .fl{height:56px}html.cx.cl-banner.fz-s .cty .fl img.flag{height:36px}
html.cx.cl-banner.fz-l .cty .fl{height:84px}html.cx.cl-banner.fz-l .cty .fl img.flag{height:60px}
html.cx.cl-banner .cty .cc{padding:7px 12px 0!important;text-align:start}
html.cx.cl-banner.cm-code .cty .cc{margin:12px 12px 0;justify-self:start}
html.cx.cl-banner .cty .meta,html.cx.cl-banner .cty .stk{margin-inline:12px}
html.cx.cl-list .grp .grid{grid-template-columns:repeat(auto-fill,minmax(380px,1fr))!important;gap:0 28px!important}
html.cx.cl-list .cty{grid-template-areas:"fl meta stk";grid-template-columns:auto minmax(0,1fr) auto;padding:10px 4px!important;border-radius:0!important;background:transparent!important;
  border:0!important;border-bottom:1px solid var(--line-2)!important}
html.cx.cl-list .cty .stk{justify-self:end}
html.cx.cl-list .cty .fc{flex-direction:row;gap:8px;min-width:74px;justify-content:flex-start}
html.cx.cl-list.cm-both .cty .fc{min-width:92px}
html.cx.cl-split .grp .grid{grid-template-columns:repeat(auto-fill,minmax(290px,1fr))!important}
html.cx.cl-split .cty{grid-template-areas:"fl meta" "fl stk";grid-template-columns:86px minmax(0,1fr);padding:0 14px 0 0!important;gap:4px 12px!important}
html.cx.cl-split .cty .fc{align-self:stretch;background:color-mix(in srgb,var(--gold) 10%,var(--surface-2))!important;padding:12px 8px;border-inline-end:1px solid var(--line)}
html.cx.cl-split .cty .meta{padding-top:12px}html.cx.cl-split .cty .stk{margin-bottom:12px}
/* card decoration */
html.cx.cd-shadow .cty{border-color:transparent!important;box-shadow:0 8px 20px -10px rgba(0,0,0,.38)!important}
html.cx.cd-fill .cty{background:var(--surface-2)!important;border-color:transparent!important}
html.cx.cd-top .cty{border-top:3px solid var(--gold)!important}
html.cx.cd-left .cty{border-inline-start:4px solid var(--gold)!important}
html.cx.cd-dash .cty{border:1.5px dashed var(--line-2)!important;background:transparent!important}
html.cx.cd-under .cty{border-width:0 0 2px!important;border-color:var(--line-2)!important;border-radius:0!important;background:transparent!important}
html.cx.cl-list.cd-under .cty,html.cx.cl-list .cty{border-radius:0!important}
/* stock badge */
html.cx .cty .stk.badge{font-size:12px}
html.cx.bd-tag .cty .stk.badge{border-radius:3px;font-family:var(--mono);font-size:11.5px;letter-spacing:.02em}
html.cx.bd-text .cty .stk.badge{background:none!important;border:0!important;padding:0!important;font-weight:700;color:var(--text)}
html.cx.bd-outline .cty .stk.badge{background:transparent!important;border:1.5px solid var(--text-3)!important;color:var(--text)!important}
html.cx.bd-bar .cty .stk.badge{justify-self:stretch;justify-content:center;border-radius:6px;background:var(--soft,rgba(128,128,128,.1))!important;border:0!important;padding:5px 10px;color:var(--text)!important}
html.cx.cl-list.bd-bar .cty .stk.badge{justify-self:end}
/* dial code */
html.cx.dp-top .cty .d{order:-1;font-size:11px;letter-spacing:.04em}
html.cx.dp-inline .cty .meta{flex-direction:row;flex-wrap:wrap;align-items:baseline;column-gap:8px}
html.cx.dp-inline .cty .en{flex-basis:100%;order:3}
html.cx.dp-inline.cl-center .cty .meta{justify-content:center}
/* featured cards on the home page: same flag / code / shape switches */
html.cx .fcard .fc{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
html.cx .fcard .fl img.flag{height:calc(var(--fh)*1.25);width:calc(var(--fh)*1.667)}
html.cx.fs-round .fcard .fl img.flag,html.cx.fs-square .fcard .fl img.flag,html.cx.fs-ring .fcard .fl img.flag{width:calc(var(--fh)*1.25)}
html.cx.fs-pill .fcard .fl img.flag{width:calc(var(--fh)*2.1)}
html.cx .fcard .cc{text-align:start}
/* small inline flags (headings, chips, tables) */
@media (max-width:560px){
  html.cx.cl-left .grp .grid,html.cx.cl-center .grp .grid,html.cx.cl-banner .grp .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  html.cx.cl-row .grp .grid,html.cx.cl-rev .grp .grid,html.cx.cl-list .grp .grid,html.cx.cl-split .grp .grid{grid-template-columns:minmax(0,1fr)!important}
  html.cx.cl-left .cty .fc{flex-direction:column;align-items:flex-start;gap:4px}
}
