/* Homepage market section. All styles are scoped to avoid changing other pages. */
#markets { background: #fff; padding: clamp(64px, 7vw, 112px) 0; overflow: hidden; scroll-margin-top: 84px; }
#markets .mg-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 44px; }
#markets .mg-copy { position: relative; z-index: 2; }
#markets .mg-eyebrow { display: block; margin-bottom: 20px; color: #23834c; font-size: 12px; font-weight: 600; letter-spacing: .14em; }
#markets h2 { margin: 0; color: #122c21; font-size: clamp(34px, 3.4vw, 50px); line-height: 1.25; letter-spacing: -.035em; }
#markets .mg-intro { margin: 22px 0 28px; color: #64746b; font-size: 16px; line-height: 1.9; }
#markets .mg-list-label { margin: 0 0 12px; color: #52685c; font-size: 12px; }
#markets .mg-market-list { display: flex; flex-wrap: wrap; gap: 8px; max-width: 455px; }
#markets .mg-market { min-height: 40px; padding: 8px 15px; border: 1px solid #e1e9e3; border-radius: 5px; background: #fff; color: #4d6255; font: inherit; font-size: 13px; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
#markets .mg-market:hover { background: #eff6f0; border-color: #8ebd9d; }
#markets .mg-market[aria-pressed="true"] { background: #20834a; color: #fff; border-color: #20834a; }
#markets button:focus-visible, #markets a:focus-visible, #markets .mg-stage:focus-visible { outline: 3px solid #21884d; outline-offset: 4px; }
#markets .mg-detail { margin-top: 24px; padding: 20px 22px; border-left: 3px solid #278952; background: #f3f7f4; min-height: 145px; max-width: 455px; }
#markets .mg-detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#markets .mg-detail h3 { margin: 0; font-size: 19px; color: #183b28; }
#markets .mg-detail-heading > span { font-size: 11px; color: #607566; }
#markets .mg-detail p { font-size: 13px; line-height: 1.8; color: #607266; margin: 10px 0 12px; }
#markets .mg-detail a { color: #207b47; font-size: 13px; font-weight: 600; text-decoration: none; }
#markets .mg-detail a span { margin-left: 10px; }
#markets .mg-visual { min-width: 0; }
#markets .mg-stage { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 600px; isolation: isolate; }
#markets .mg-stage[data-renderer="fallback"] { aspect-ratio: 1620 / 745; }
#markets .mg-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#markets .mg-stage canvas:active { cursor: grabbing; }
#markets .mg-fallback { position: absolute; inset: 0; margin: auto; width: 100%; height: auto; }
#markets .mg-ready .mg-fallback { display: none; }
#markets .mg-pins { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
#markets .mg-pin { position: absolute; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: transparent; pointer-events: auto; cursor: pointer; }
#markets .mg-pin::before { content: ''; display: block; width: 10px; height: 10px; border: 2px solid white; border-radius: 50%; background: #25884e; box-shadow: 0 0 0 4px #23834c22, 0 2px 6px #0c422b25; }
#markets .mg-pin[aria-pressed="true"]::before { width: 13px; height: 13px; background: #0b6937; box-shadow: 0 0 0 7px #23834c25; }
#markets .mg-pin > span { position: absolute; left: 36px; white-space: nowrap; border: 1px solid #dce8df; border-radius: 4px; padding: 7px 10px; color: #195c36; background: #fffffff5; box-shadow: 0 4px 14px #21452d0c; font: 500 12px/1.4 Inter, sans-serif; opacity: 0; pointer-events: none; }
#markets .mg-pin:hover > span, #markets .mg-pin:focus-visible > span, #markets .mg-pin[aria-pressed="true"] > span, #markets .mg-pin[data-headquarters] > span { opacity: 1; }
#markets .mg-pin[hidden] { display: none; }
#markets .mg-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 4px 8px 0; }
#markets .mg-toolbar p { margin: 0; color: #6b7c70; font-size: 12px; }
#markets .mg-toolbar > div { display: flex; gap: 8px; flex-shrink: 0; }
#markets .mg-toolbar button { min-height: 40px; padding: 8px 13px; border: 1px solid #dce6df; border-radius: 4px; color: #40634e; font: inherit; font-size: 12px; background: #fff; cursor: pointer; }
#markets .mg-toolbar button:hover { background: #f1f7f2; }
#markets .mg-toolbar button:disabled { opacity: .5; cursor: default; }
#markets .mg-caption { margin: 18px 0 0; text-align: center; color: #6d7f73; font-size: 11px; letter-spacing: .04em; }
@media (max-width: 1000px) {
  #markets .mg-layout { gap: 22px; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
  #markets .mg-toolbar { flex-direction: column; gap: 10px; }
  #markets .mg-market { padding-inline: 12px; }
  #markets .mg-desktop-break { display: none; }
}
@media (max-width: 740px) {
  #markets { padding: 56px 0; }
  #markets .mg-layout { grid-template-columns: 1fr; gap: 20px; }
  #markets .mg-eyebrow { font-size: 11px; margin-bottom: 16px; }
  #markets h2 { font-size: 36px; }
  #markets .mg-intro { margin: 16px 0 24px; font-size: 14px; }
  #markets .mg-market-list, #markets .mg-detail { max-width: none; }
  #markets .mg-market { min-height: 44px; }
  #markets .mg-detail { min-height: 140px; padding: 16px 18px; }
  #markets .mg-stage { max-width: 490px; margin: 0 auto; }
  #markets .mg-toolbar { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 0; }
  #markets .mg-toolbar button { min-height: 44px; }
  #markets .mg-caption { margin-top: 14px; }
  #markets .mg-pin > span { font-size: 11px; padding: 5px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  #markets * { transition: none !important; }
}
