/* Heirson country picker. Uses the page's brand tokens (--ink, --signal, --lime, --line, --paper, --body, --head). */
.cp { position: relative; display: inline-block; vertical-align: baseline; }
.cp-btn { display: inline-flex; align-items: center; gap: .32em; font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; }
.cp-btn .fi { flex: none; border-radius: .12em; background-size: cover; box-shadow: 0 0 0 1px rgba(16,35,26,.1); }
.cp-nw { white-space: nowrap; }
.cp-chev { flex: none; display: inline-grid; place-items: center; background: var(--ink); transition: transform .25s var(--ease, ease), background .15s; }
.cp-chev::before { content: ""; width: 34%; height: 34%; border-right: 2px solid var(--lime); border-bottom: 2px solid var(--lime); transform: translateY(-22%) rotate(45deg); }
.cp.open .cp-chev { transform: rotate(180deg); }

/* Headline variant: sits inside the H1 */
.cp--headline .cp-btn { position: relative; z-index: 0; white-space: normal; display: inline; padding: 0 .08em; border-radius: .08em; transition: background .15s; }
.cp--headline .cp-btn::after { content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .2em; background: var(--lime); z-index: -1; transition: height .2s var(--ease, ease); }
.cp--headline .cp-btn:hover::after, .cp--headline.open .cp-btn::after { height: .92em; }
.cp--headline .cp-btn .fi { display: inline-block; width: .74em; height: .55em; margin-right: .16em; vertical-align: -.02em; line-height: 0; }
.cp .fi::before { content: none; }
.cp--headline .cp-btn .cp-val { box-decoration-break: clone; -webkit-box-decoration-break: clone; background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 88% / 100% .2em; transition: background-size .2s; }
.cp--headline .cp-btn:hover .cp-val, .cp--headline.open .cp-val { background-size: 100% 80%; }
.cp--headline .cp-btn::after { display: none; }
.cp--headline .cp-chev { display: inline-grid; width: .42em; height: .42em; margin-left: .14em; vertical-align: .08em; }

/* Field variant: a compact branded control */
.cp--field .cp-btn { gap: 10px; font: 600 15px/1.2 var(--body); color: var(--ink); background: var(--white, #fff); border: 1.5px solid var(--line-2, #CDD2CA); border-radius: 10px; padding: 9px 10px 9px 12px; min-height: 42px; transition: border-color .15s; }
.cp--field .cp-btn:hover, .cp--field.open .cp-btn { border-color: var(--ink); }
.cp--field .cp-btn .fi { width: 22px; height: 16px; }
.cp--field .cp-chev { display: inline-grid; width: 18px; height: 18px; border-radius: 5px; margin-left: 10px; vertical-align: -4px; }
.cp--dark .cp-btn { background: var(--ink); color: #fff; border-color: var(--ink-4, #2E4A3D); }
.cp--dark .cp-btn:hover, .cp--dark.open .cp-btn { border-color: var(--lime); }
.cp--dark .cp-chev { background: var(--lime); }
.cp--dark .cp-chev::before { border-color: var(--ink); }

/* Popover */
.cp-pop { position: absolute; z-index: 70; top: calc(100% + 12px); left: 0; width: min(372px, calc(100vw - 32px)); display: block;
  background: #fff; color: var(--ink); border: 1px solid var(--line, #E3E5DE); border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 0 rgba(16,35,26,.04), 0 30px 70px -24px rgba(16,35,26,.45);
  font: 400 15px/1.4 var(--body); letter-spacing: 0; text-align: left; white-space: normal;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.985); transform-origin: top left;
  transition: opacity .18s, transform .22s var(--ease, ease), visibility 0s .22s; }
.cp.open .cp-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .22s var(--ease, ease); }
.cp-search { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line, #E3E5DE); }
.cp-search svg { flex: none; width: 18px; height: 18px; }
.cp-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 16px/1.3 var(--body); color: var(--ink); padding: 4px 0; }
.cp-search input::placeholder { color: #8A938D; }
.cp-search kbd { font: 600 11px/1 var(--body); color: var(--muted); border: 1px solid var(--line-2, #CDD2CA); border-bottom-width: 2px; border-radius: 5px; padding: 4px 6px; }
.cp-list { display: block; max-height: 330px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 8px; scrollbar-width: thin; scrollbar-color: #C9CEC6 transparent; }
.cp-list::-webkit-scrollbar { width: 8px; }
.cp-list::-webkit-scrollbar-thumb { background: #D5D9D2; border-radius: 8px; border: 2px solid #fff; }
.cp-group { display: flex; align-items: center; gap: 8px; font: 600 11px/1 var(--body); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 14px 10px 7px; }
.cp-group::before { content: ""; width: 7px; height: 7px; background: var(--signal); }
.cp-opt { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.cp-opt .fi { width: 24px; height: 18px; border-radius: 3px; background-size: cover; box-shadow: 0 0 0 1px rgba(16,35,26,.1); }
.cp-opt.act { background: var(--paper, #F7F7F2); }
.cp-opt[aria-selected="true"] { font-weight: 600; }
.cp-opt[aria-selected="true"]::after { content: ""; width: 14px; height: 8px; border-left: 2.5px solid var(--signal-deep); border-bottom: 2.5px solid var(--signal-deep); transform: rotate(-45deg) translate(1px, -2px); }
.cp-opt mark { background: var(--lime); color: inherit; border-radius: 2px; padding: 0 1px; }
.cp-opt small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.cp-tag { font: 600 11px/1 var(--body); padding: 4px 6px; border-radius: 5px; white-space: nowrap; }
.cp-tag.no { background: #FDECEA; color: #B42318; }
.cp-tag.us { background: #FFF6D6; color: #6B5510; }
.cp-tag.here { background: var(--lime-soft, #EEF9CF); color: var(--signal-deep); }
.cp-empty { display: block; padding: 22px 12px; color: var(--muted); font-size: 14px; }
.cp-foot { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line, #E3E5DE); background: var(--paper, #F7F7F2); font-size: 12px; color: var(--muted); }
.cp-foot::before { content: ""; width: 6px; height: 6px; background: var(--signal); flex: none; }
.cp-scrim { display: none; }

@media (max-width: 620px) {
  .cp.open .cp-scrim { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(16,35,26,.45); }
  .cp-pop { position: fixed; top: auto; bottom: 0; left: 0 !important; right: 0; width: auto; border-radius: 20px 20px 0 0; transform: translateY(24px); }
  .cp-pop::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-2, #CDD2CA); margin: 10px auto 2px; }
  .cp-list { max-height: 58vh; }
  .cp-search kbd { display: none; }
}
/* A closed popover takes no space, so it can never widen the page on narrow screens */
.cp:not(.open) .cp-pop { display: none; }
@starting-style { .cp.open .cp-pop { opacity: 0; transform: translateY(-6px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .cp-pop, .cp-chev, .cp-btn::after { transition: none !important; } }

/* Hint and footer text come from CSS so they never count as heading text */
.cp-search kbd::before, .cp-foot::before { content: attr(data-t); }
