/* Healthcare Cost by Country (generated by scripts/build-healthcare-cost.mjs). Loaded after site.css, cost-of-living.css,
   big-mac-index.css and buy-vs-rent-abroad.css and reuses their tokens and components (.bvr-calc, .bvr-grid, .bvr-field,
   .bvr-range, .bvr-result, .bvr-cards, .bvr-table, .bvr-assumptions, .bvr-defaults, .bm-section, .bm-stats, .bm-faq).
   No new colours and no inline styles anywhere (CSP). */

.hc [hidden] { display: none !important; }

/* ---------- Destination pickers (searchable) ---------- */
.hc-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; }
.hc-slot { min-width: 0; }
.hc-slot__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hc-remove { margin: 0 0 7px; padding: 0; font: inherit; font-size: 13px; font-weight: 800; color: var(--muted); background: none; border: 0; cursor: pointer; }
.hc-remove:hover { color: var(--lime); }
.hc-remove:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 6px; }
.hc-combo { position: relative; }
.hc-combo::after { content: ""; position: absolute; inset-inline-end: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--lime); border-bottom: 2px solid var(--lime); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.hc-combo__input { width: 100%; padding: 13px 40px 13px 14px; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); background-color: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
[dir="rtl"] .hc-combo__input { padding: 13px 14px 13px 40px; }
.hc-combo__input:focus { outline: 2px solid var(--lime); outline-offset: 2px; border-color: var(--lime); }
.hc-combo__list { position: absolute; z-index: 4; inset-inline: 0; top: calc(100% + 6px); max-height: 280px; margin: 0; padding: 6px; overflow-y: auto; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.hc-combo__list li { padding: 11px 12px; border-radius: 10px; font-size: 15.5px; font-weight: 600; cursor: pointer; }
.hc-combo__list li[aria-selected="true"], .hc-combo__list li[role="option"]:hover { background: var(--lime); color: var(--on-lime); }
.hc-combo__list .hc-combo__empty { color: var(--muted); cursor: default; }
.hc-add { align-self: flex-start; margin-top: 14px; }

/* ---------- Pill toggles ---------- */
.hc-group { border: 0; margin: 0; padding: 0; }
.hc-group legend { padding: 0; margin-bottom: 7px; color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; }
.hc-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; align-self: flex-start; max-width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 26px; }
.hc-pills input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.hc-pills label { flex: 1 1 auto; margin: 0; min-width: 84px; padding: 10px 18px; justify-content: center; border-radius: 999px; color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: 0; text-transform: none; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.hc-pills input:checked + label { background: var(--lime); color: var(--on-lime); }
.hc-pills input:focus-visible + label { outline: 2px solid var(--lime); outline-offset: 2px; }
.hc-form-note { margin: 16px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* ---------- Headline result ---------- */
.hc-result[data-tone="save"], .hc-result[data-tone="same"] { border-inline-start-color: var(--lime); }
.hc-result[data-tone="more"] { border-inline-start-color: var(--amber); }
.hc-result p { margin: 0; }
.hc-result__label { color: var(--ink); font-size: 16.5px; font-weight: 800; }
.hc-result__value { margin-top: 2px !important; color: var(--lime); font-size: clamp(40px, 7vw, 64px); font-weight: 900; letter-spacing: -1.5px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hc-result__breakdown { color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.hc-result__home { margin-top: 14px !important; color: var(--ink); font-size: 16.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hc-result__diff { margin-top: 2px !important; font-size: clamp(20px, 2.8vw, 26px); font-weight: 900; letter-spacing: -.3px; font-variant-numeric: tabular-nums; color: var(--lime); }
.hc-result[data-tone="more"] .hc-result__diff { color: var(--amber); }
.hc-result__profile { margin-top: 12px !important; color: var(--muted); font-size: 13.5px; }
.hc-age-note { margin: 12px 0 0; padding: 14px 18px; border: 1px dashed rgba(221, 164, 60, 0.5); border-radius: 18px; color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.hc-age-note b { color: var(--amber); }
.hc-compare { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.hc-compare [data-tone="more"] b { color: var(--amber); }
.hc-compare [data-tone="home"] b { color: var(--ink); }

/* ---------- Bar chart ---------- */
.hc-figure { margin: 22px 0 0; padding: 20px 22px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.hc-figure figcaption { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.hc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }
.hc-legend > span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.hc-legend__key { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.hc-legend__key--home { background: var(--muted); }
.hc-legend__key--dest { background: var(--lime); }
.hc-legend__key--more { background: var(--amber); }
.hc-chart__item { padding: 14px 0; border-top: 1px solid var(--line); }
.hc-chart__item:first-child { border-top: 0; }
.hc-chart__item h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 800; }
.hc-bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 84px; align-items: center; gap: 12px; padding: 3px 0; }
.hc-bar-row__name { color: var(--muted); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-bar-row__val { font-size: 15px; font-weight: 800; text-align: end; font-variant-numeric: tabular-nums; }
.hc-bar { display: block; width: 100%; height: 14px; border-radius: 999px; background: rgba(234, 242, 230, 0.06); overflow: hidden; }
.hc-bar__fill--home { fill: var(--muted); }
.hc-bar__fill--dest { fill: var(--lime); }
.hc-bar__fill--more { fill: var(--amber); }

/* ---------- Per-destination detail: access badge + table ---------- */
.hc-detail { margin-top: 26px; }
.hc-detail > h3 { margin: 0 0 10px; font-size: 20px; font-weight: 900; letter-spacing: -.3px; }
.hc-access { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.hc-badge { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; padding: 8px 16px; border: 1px solid rgba(198, 239, 60, 0.45); border-radius: 999px; background: rgba(198, 239, 60, 0.07); }
.hc-badge b { color: var(--lime); font-size: 14.5px; font-weight: 800; }
.hc-badge span { color: var(--muted); font-size: 13.5px; }
.hc-badge[data-access="twoTier"] { border-color: rgba(221, 164, 60, 0.5); background: none; }
.hc-badge[data-access="twoTier"] b { color: var(--amber); }
.hc-access__note { flex: 1 1 320px; margin: 0; color: var(--ink); font-size: 15px; line-height: 1.55; }
.hc-table { min-width: 640px; }
.hc-table th:first-child { width: auto; }
.hc-table tbody th { color: var(--ink); }
.hc-table__total > * { border-top: 2px solid var(--line) !important; font-weight: 900 !important; }
.hc-table__total td:nth-child(2) { color: var(--lime); }

/* ---------- Quick answer and related tools ---------- */
.hc-quick { margin-top: 0; }
.hc-quick p { margin: 0; font-size: 16px; line-height: 1.6; }
.hc-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hc-related a { display: block; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.hc-related a:hover { border-color: rgba(198, 239, 60, 0.65); transform: translateY(-1px); }
.hc-related a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.hc-related b { display: block; font-size: 16.5px; font-weight: 800; line-height: 1.3; }
.hc-related b span { color: var(--lime); }
.hc-related a > span { display: block; margin-top: 6px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

@media (max-width: 900px) {
  .hc-related { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hc-pills { display: flex; align-self: stretch; }
  .hc-pills label { min-width: 0; padding: 12px 10px; }
  .hc-figure { padding: 16px 14px 8px; }
  .hc-bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 6px 0; }
  .hc-bar-row__name { order: 1; }
  .hc-bar-row__val { order: 2; }
  .hc-bar { order: 3; grid-column: 1 / -1; }
  .hc-add { align-self: stretch; }
}
