/* /premiums/by-country/ — By country: view styles. Owner: wave H2 (owner #65). Loaded only on this page, after hub.css,
   premium-charts.css and premiums.css; every rule is scoped under .bpt--country and reuses the shared tokens (--ink,
   --muted, --line, --paper, --primary, --gold) and chart variables (--bpc-*).
   Map: hand-drawn land (#DCE5E0) on a pale sea (#F3F7F5); tiles shaded with the shared sequential gold ramp
   (--bpc-heat-lo → --bpc-heat-hi, 12–60% of the way: lighter = lower premium; never red; ink text ≥ 4.6:1 on every
   step), hatched white when the country has no product in the shaded size. Tiles are ≥ 44 px tall everywhere (WCAG 2.5.5 on phones). Teal stays reserved for "we lowered
   our premium". Phones (< 900 px): the world map gives way to region panels in a swipe row. */

.bpt--country { --bpm-sea: #F3F7F5; --bpm-land: #DCE5E0; }

/* ---------------------------------------------------------------- chip rows (44 px targets on phones) */
.bpt--country .bpm-chiprow { display: flex; flex-wrap: wrap; gap: 0 22px; }
.bpt--country .bpm-chiprow .bpc-chips { margin-bottom: 12px; }
@media (max-width: 767px) {
	/* One swipeable row per chip group (the label leads it); the row scrolls, never the page. */
	.bpt--country .bpc-chip { flex: 0 0 auto; padding: 0 14px; white-space: nowrap; }
	.bpt--country .bpc-chips { flex-wrap: nowrap; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
	.bpt--country .bpc-chips::-webkit-scrollbar { display: none; }
	.bpt--country .bpc-chips__label { flex: 0 0 auto; margin: 0 4px 0 0; }
	.bpt--country .bpm-chiprow { display: block; }
	.bpt--country .bpm-rk .bpc-sub { display: inline; margin-left: 6px; }
}

/* ---------------------------------------------------------------- map section */
.bpt--country .bpm-caption { max-width: 900px; margin: -2px 0 14px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.bpt--country .bpm-caption strong { color: var(--ink); font-weight: 700; }
.bpt--country .bpm-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 1300px) {
	.bpt--country .bpm-stage { grid-template-columns: minmax(0, 1fr) 340px; }
	.bpt--country .bpm-panel { position: sticky; top: calc(var(--bpt-swbar-top, 0px) + 72px); max-height: calc(100vh - 96px); overflow: auto; }
}
.bpt--country .bpm-mapcol { position: relative; min-width: 0; }
.bpt--country .bpm-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.bpt--country .bpm-map { position: relative; width: 100%; border-radius: 12px; background: var(--bpm-sea); box-shadow: inset 0 0 0 1px rgba(24, 43, 43, .06); }
.bpt--country .bpm-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 12px; }
.bpt--country .bpm-lead { stroke: rgba(24, 43, 43, .5); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bpt--country .bpm-pin { fill: var(--ink, #182B2B); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.bpt--country .bpm-pin.is-sel { fill: var(--ink, #182B2B); stroke-width: 3; }

/* Tiles: links (name + premium), centred on their position. */
.bpt--country .bpm-tiles { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.bpt--country .bpm-tiles > li { position: absolute; margin: 0; padding: 0; transform: translate(-50%, -50%); }
.bpt--country .bpm-tile { --t: .5; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box; min-width: 56px; height: 44px; padding: 0 6px; border-radius: 9px;
	background: var(--bpc-heat-lo, #FBF5E8); background: color-mix(in oklab, var(--bpc-heat-lo, #FBF5E8), var(--bpc-heat-hi, #6E4C12) calc(var(--t) * 100%));
	box-shadow: 0 0 0 1px rgba(24, 43, 43, .2), 0 1px 3px rgba(24, 43, 43, .14); color: var(--ink, #182B2B) !important; line-height: 1.12; text-align: center; text-decoration: none !important;
	transition: transform .14s, box-shadow .14s; }
.bpt--country .bpm-tile:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(24, 43, 43, .45), 0 4px 10px rgba(24, 43, 43, .18); }
.bpt--country .bpm-tile:focus-visible { outline: 2px solid var(--gold, #A87B30); outline-offset: 3px; }
.bpt--country .bpm-tile__n { font-size: 12px; font-weight: 700; white-space: nowrap; }
.bpt--country .bpm-tile__v { font-size: 13.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bpt--country .bpm-tile.is-na { background: #fff repeating-linear-gradient(135deg, transparent 0 5px, rgba(24, 43, 43, .07) 5px 6px); color: var(--muted, #56645F) !important; box-shadow: 0 0 0 1px rgba(24, 43, 43, .2); }
.bpt--country .bpm-tile.is-na .bpm-tile__v { font-weight: 500; }
.bpt--country .bpm-tile[aria-current="true"] { z-index: 2; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink, #182B2B), 0 6px 14px rgba(24, 43, 43, .2); }
.bpt--country .bpm-tiles > li:has(> [aria-current="true"]) { z-index: 3; }

/* Region panels (phones): a swipe row with tabs once the script runs. */
.bpt--country .bpm-phone { display: none; }
.bpt--country .bpm-rtabs { display: flex; gap: 6px; margin: 0 0 10px; overflow-x: auto; scrollbar-width: none; }
.bpt--country .bpm-rtabs::-webkit-scrollbar { display: none; }
.bpt--country .bpm-rtab { flex: 0 0 auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--line, #DCE5E0); border-radius: 999px; background: #fff; color: var(--ink, #182B2B); font: 650 14px/1 var(--bt-font-body, Satoshi, Arial, sans-serif); cursor: pointer; }
.bpt--country .bpm-rtab[aria-pressed="true"] { border-color: var(--ink, #182B2B); background: var(--ink, #182B2B); color: #fff; }
.bpt--country .bpm-rtab:focus-visible { outline: 2px solid var(--gold, #A87B30); outline-offset: 2px; }
.bpt--country .bpm-crops { position: relative; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.bpt--country .bpm-crops::-webkit-scrollbar { display: none; }
.bpt--country .bpm-crops:focus-visible { outline: 2px solid var(--gold, #A87B30); outline-offset: 3px; }
.bpt--country .bpm-crop { position: relative; flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.bpt--country .bpm-crop__label { position: absolute; z-index: 1; left: 10px; top: 8px; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #56645F); pointer-events: none; }
@media (max-width: 899px) {
	.bpt--country .bpm-map--world { display: none; }
	.bpt--country .bpm-phone { display: block; }
}

/* Legend (below the map) and off-map tiles. */
.bpt--country .bpm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 10px; font-size: 12.5px; color: var(--muted, #56645F); }
.bpt--country .bpm-legend__ramp { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink, #182B2B); font-variant-numeric: tabular-nums; }
.bpt--country .bpm-legend__ramp i { width: 140px; height: 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(24, 43, 43, .1);
	background: linear-gradient(90deg, color-mix(in oklab, var(--bpc-heat-lo, #FBF5E8), var(--bpc-heat-hi, #6E4C12) 12%), color-mix(in oklab, var(--bpc-heat-lo, #FBF5E8), var(--bpc-heat-hi, #6E4C12) 60%)); }
.bpt--country .bpm-legend__item { display: inline-flex; align-items: center; gap: 7px; }
.bpt--country .bpm-legend__na { width: 18px; height: 12px; border-radius: 3px; background: #fff repeating-linear-gradient(135deg, transparent 0 3px, rgba(24, 43, 43, .14) 3px 4px); box-shadow: inset 0 0 0 1px rgba(24, 43, 43, .25); }
.bpt--country .bpm-legend__pin { position: relative; width: 18px; height: 12px; }
.bpt--country .bpm-legend__pin::before { content: ""; position: absolute; left: 0; top: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink, #182B2B); box-shadow: 0 0 0 1.5px #fff; }
.bpt--country .bpm-legend__pin::after { content: ""; position: absolute; left: 6px; top: 5px; width: 12px; border-top: 1px solid rgba(24, 43, 43, .5); }
.bpt--country .bpm-off { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.bpt--country .bpm-off__label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #56645F); }
.bpt--country .bpm-off__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bpt--country .bpm-off__list .bpm-tile { min-width: 120px; padding: 0 12px; }

/* Panel beside (desktop) or below (phones) the map: the selected country's card. */
.bpt--country .bpm-panel { min-width: 0; padding: 16px 18px; border: 1px solid var(--line, #DCE5E0); border-radius: 12px; background: #fff; }
.bpt--country .bpm-panel:focus { outline: none; }
.bpt--country .bpm-panel__h { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #56645F); }
.bpt--country .bpm-panel__intro p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; }
.bpt--country .bpm-panel__intro p:last-child { margin-bottom: 0; }
.bpt--country .bpm-panel__intro a, .bpt--country .bpm-panel__bar a { font-weight: 650; }
.bpt--country .bpm-panel__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #56645F); }
.bpt--country .bpm-panel .bpm-card { padding: 0; border: 0; border-radius: 0; }
.bpt--country .bpm-linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--primary, #185C53); font: 650 14px/1 var(--bt-font-body, Satoshi, Arial, sans-serif); letter-spacing: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bpt--country .bpm-linkbtn:focus-visible { outline: 2px solid var(--gold, #A87B30); outline-offset: 2px; }

/* ---------------------------------------------------------------- ranked bars */
.bpt--country .bpm-rk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 6px 36px; }
.bpt--country .bpm-rk { min-width: 0; padding-bottom: 8px; }
.bpt--country .bpm-rk__h { margin: 14px 0 10px; font-size: 16.5px; }
.bpt--country .bpm-rk__h span { font-size: 13px; font-weight: 600; color: var(--muted, #56645F); }
.bpt--country .bpm-rk .bpc-bars__row.is-hl { border-radius: 6px; background: var(--paper, #F1F5F3); box-shadow: 0 0 0 4px var(--paper, #F1F5F3); }
.bpt--country .bpm-rk .bpc-bars__row.is-hl .bpc-bars__label a { color: var(--ink, #182B2B); text-decoration-color: currentColor; }
.bpt--country .bpm-rk__empty { margin: 4px 0 0; font-size: 14.5px; color: var(--muted, #56645F); }

/* ---------------------------------------------------------------- table filters */
.bpt--country .bpm-filters .bpc-chips { margin-bottom: 10px; }
.bpt--country .bpm-filters .bpc-chips[data-bpc-chips="tsize"] { max-width: 1100px; }
.bpt--country .bpm-tstatus { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 2px 0 0; font-size: 14px; font-weight: 600; }
.bpt--country .bpm-tnone { margin: 8px 0 0; font-size: 14.5px; color: var(--muted, #56645F); }
.bpt--country .bpm-tablesec { margin-bottom: 0; }
.bpt--country tr.is-sel > th, .bpt--country tr.is-sel > td { background: var(--paper, #F1F5F3); }

/* ---------------------------------------------------------------- country cards */
.bpt--country .bpm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.bpt--country .bpm-card { gap: 12px; scroll-margin-top: 90px; }
.bpt--country .bpm-card__head { display: flex; align-items: flex-start; gap: 12px; }
.bpt--country .bpm-card__head .bpm-flag { margin-top: 3px; }
.bpt--country .bpm-card__head .bpt-card__name { font-size: 21px; }
.bpt--country .bpm-card__head .bpt-card__about { margin: 2px 0 0; }
.bpt--country .bpm-flag { display: block; flex: 0 0 auto; width: 36px; height: 24px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(24, 43, 43, .16); }
.bpt--country .bpm-card__k { display: block; margin: 0 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #56645F); }
.bpt--country .bpm-card__makers { margin: 0; font-size: 14px; line-height: 1.5; }
.bpt--country .bpm-card__makers a, .bpt--country .bpt-card__shop a { font-weight: 650; }
.bpt--country .bpm-card__sizes, .bpt--country .bpm-card__low { margin: 0; }
.bpt--country .bpm-sz { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.bpt--country .bpm-sz li { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; align-items: baseline; gap: 10px; padding: 5px 0; border-top: 1px solid #EEF2F0; font-size: 14px; }
.bpt--country .bpm-sz li:first-child { border-top: 0; }
/* R3: light size rows (label text, <b> typical, <small> 2-year median); "All N sizes" is built from the table rows. */
.bpt--country .bpm-sz b { font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
.bpt--country .bpm-sz small { font-size: 12px; text-align: right; color: var(--muted, #56645F); font-variant-numeric: tabular-nums; }
.bpt--country .bpm-sz small::before { content: "2-yr "; }
.bpt--country .bpm-more__nojs, .bpt--country .bpm-rk__nojs { margin: 6px 0 0; font-size: 13.5px; color: var(--muted, #56645F); }
.bpt--country .bpm-more summary { display: flex; align-items: center; min-height: 40px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--primary, #185C53); }
.bpt--country .bpm-more .bpm-sz li:first-child { border-top: 1px solid #EEF2F0; }
.bpt--country .bpm-low { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bpt--country .bpm-low li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; font-size: 14px; line-height: 1.4; }
.bpt--country .bpm-low__k { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--muted, #56645F); }
.bpt--country .bpm-low__p { min-width: 0; }
.bpt--country .bpm-low__p a { font-weight: 650; }
.bpt--country .bpm-low__v { font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
.bpt--country .bpm-low .bpt-lowered { grid-column: 1 / -1; margin-top: 0; }
.bpt--country .bpm-card .bpt-chart__label { margin: 2px 0 -6px; }
.bpt--country .bpm-card .bpt-card__shop { margin-top: auto; font-size: 14px; line-height: 1.6; }
.bpt--country .bpm-card .bpt-card__shop .bpm-card__k { display: inline; margin-right: 6px; }

@media (max-width: 767px) {
	.bpt--country .bpm-caption { font-size: 14px; }
	.bpt--country .bpm-legend__ramp i { width: 96px; }
	.bpt--country .bpm-panel { padding: 14px; }
	.bpt--country .bpm-card__head .bpt-card__name { font-size: 19px; }
	.bpt--country .bpm-sz li { grid-template-columns: minmax(0, 1fr) auto 70px; }
	.bpt--country .bpm-rk__h { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
	.bpt--country .bpm-tile { transition: none; }
	.bpt--country .bpm-crops { scroll-behavior: auto; }
}
@media (forced-colors: active) {
	.bpt--country .bpm-tile { forced-color-adjust: none; border: 1px solid CanvasText; }
	.bpt--country .bpm-tile[aria-current="true"] { outline: 3px solid Highlight; }
}

